Ethereum Boilerplate Questions

Hey that worked! I was trying to change it inside of useNFTBalances, and not directly inside of NFTBalance, I donā€™t know why I didnā€™t think of simply doing that. Thanks!

How would you get 2 contracts passed in? I tried the following which I thought was the correct way, and itā€™s not working.

function NFTBalance() {
const { data: NFTBalances } = useNFTBalances({ token_addresses: [ā€œ0x2953399124f0cbb46d2cbacd8a89cf0599974963ā€ | ā€œ0x2953399124f0cbb46d2cbacd8a89cf05999cx963ā€] });

Youā€™d use an array of

["0x2953399124f0cbb46d2cbacd8a89cf0599974963", "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"]

And so on.

ok, I thought using a comma there would go to the next option after token_addresses but since we are inside of token_addresses that doesnā€™t happen. Itā€™s working the way I need it to. Thanks for your help! Its been 4 years since I looked at javascript, gosh Iā€™m rusty.

1 Like

Hello, you can upload a video where you can purchase a NFT insite of the web!

Hi. thank you for the video tutorial.
I was able to follow all steps until the yarn startā€¦
it opens and run the code, but it seems there it loads only a blank page.
I have tried several browsersā€¦, and also have enabled Javascriptā€¦ and there seems to be no other error on the VScode

do you see any errors in the browser console?

And there is a recent change in the moralis sdk package name, probably you need to updated the package name in the boilerplate.

forgot to mentioned, that I also do not see any error on the console. not sure how to change the package name either :sweat_smile:

I guess there should be some errors if it is not working as mentioned in the docs.
Did you use the correct folder name while installing and starting the localhost servers?

You can change the package like this

npm remove moralis
npm install moralis-v1
1 Like

Please help kind sers. When installing the boilerplate I get this error:

Module not found: Error: Canā€™t resolve ā€˜zlibā€™ in ā€˜/Users/kingy/Downloads/ethereum-boilerplate-main/node_modules/react-moralis/libā€™
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

Did you use yarn install to install it? For the webpack issue, a workaround is to install [email protected], otherwise you will need to add that polyfill to your webpack config.

I canā€™t replicate this on a fresh ethereum-boilerplate.

Strange! I yarn installed on my macbook and pc and both got the same issue.

In that case you can just install the older webpack/react-scripts (yarn add [email protected]).

Also there is a version 2 of the boilerplate in the works if you are willing to wait and use that instead.

I installed 4.0.3 instead and just get a blank screen with no console errrors after fighting through another error or two to get it to build.

On the forums/discord, people are having a fair bit of trouble getting this to build without errors (such as a eslint problem stopping the repo build out of the box) also like the chains component removing from the DOM after switching networks, do you know a fix for that?

Iā€™m definitely looking forward to v2 though!! Very impressed with Moralis, I built an awesome dapp in a day or two with the boilerplate. The network switch disappearing then the nfts not refreshing is a killer though. It works flawlessy on your demo as other people have stated. Get me that demo repo/lockfile haha.

also like the chains component removing from the DOM after switching networks, do you know a fix for that?

Another user and I had this issue; updating react-moralis to a newer one fixed it, may have been 1.3.5 or around there.

I removed some lines of code whilst following the tutorial for the Opensea-clone from App.jsx, I am now getting this error :

"
Compiled with problems:

ERROR

src/App.jsx
Line 50:16: ā€˜isServerInfoā€™ is defined but never used no-unused-vars
Line 77:1: Delete āŽ prettier/prettier
Line 85:20: Delete āŽāŽāŽ prettier/prettier

Search for the keywords to learn more about each error.
"

Please help.

Line 50:16: ā€˜isServerInfoā€™ is defined but never used no-unused-vars

You can ignore this warning.

Line 77:1: Delete āŽ prettier/prettier
Line 85:20: Delete āŽāŽāŽ prettier/prettier

If you run the command yarn format, it should get rid of these.

how did you fix this @gaurav or can anyone help me out please

@johnversus iā€™m stuck here can you please help me out

You are getting the estimate gas issue with ā€œCreate Market Itemā€ function? Which chain are you using? Have you tried proceeding?

You can try deploying on another chain or testnet.

hey glad

im using the rinkeby network and yes im getting the estimate gas issue with ā€œCreate Market Itemā€ function

i intend to use the marketplace on eth