This is a thread to discuss the @moralisweb3/next. This package for NextJS will boost your development experience.
We are here to help! If you have any questions about how to use it or how to set it up you can ask here!
This is a thread to discuss the @moralisweb3/next. This package for NextJS will boost your development experience.
We are here to help! If you have any questions about how to use it or how to set it up you can ask here!
Hello,
how can i Sign in with Metamask using Vue.js
It could be possible to have more documentation about the available hooks and how to use them into our application?
For example I am looking to build a portfolio tracker with Next.js + Supabase and I have started to look into Moralis because you give us the getWalletTokenBalances
but the JS example that I find is dedicated to NodeJS.
I read that all the calls that Moralis makes are directed to localhost and you made us create a pages/api/moralis
folder that acts like a catch all for any API call I should make to Moralis.
It could be possibile to have a sort of jump start to help me in configuring the first API call to getWalletTokenBalances
?
PS: I know that this question could look simple but I haven’t touched React in almost two years because the company I work for now uses a different tech stack but I was really curious to start something full stack with Next.js
Hi @cupofcraft . If you want to use our next js hooks you can have a look at our quickstart next js project here https://docs.moralis.io/web3-data-api/quickstart-nextjs. In this example we showcase useEvmNativeBalance
. For getWalletTokenBalances
you can follow the same example using the useEvmWalletTokenBalances hook.
thank you so much for the quick answer and thank you for pointing me to the GitHub repo since I didn’t found it listed on npm page
Anyway found the solution in your Discord and now I am well on my way but I hope to talk you soon, especially to congratulate for the amazing service you’re offering
Hi,
I am trying to replicate the Moralis.EvmApi.nft.getNFTMetadata() function using new @moralisweb3/next hooks. I am trying this by calling the fetch() function of useEvmNFTMetadata hook in order to achieve the same result but I am getting the following error:
“Operation getNFTMetadata has invalid value for isNullable property”
Thanks
Hey @cdik,
Thanks for reaching out to us!
Can you show the full code on how you implement useEvmNFTMetadata
?
Hi @YosephKS,
Thanks for quick replay. This is the code:
const { fetch: fetchEvmNFTMetadata } = useEvmNFTMetadata()
…
const getNftDetail = async () => {
const getNftMetadataOptions: GetNFTMetadataRequest = {
address: nftAddress as EvmAddressish,
tokenId: nftId as string,
chain: chainId as EvmChainish,
format: 'decimal',
}
const result= await fetchEvmNFTMetadata(getNftMetadataOptions)
// API CALL FAILS: Internal server error (500): error: Operation getNFTMetadata //has invalid value
// for isNullable property
…
I tried different versions of getNftMetadataOptions, but nothing worked. However, call to server side getNFTMetadata function with equal parameters works fine. No version works with ‘hex’ format , including your test API page (https://docs.moralis.io/web3-data-api/reference/get-nft-metadata).
I am also having problem with the useEvmSearchNFTs hook, which returns total=null even though disableTotal = false is explicitly set.