adrianhajdin / project_crowdfunding

With a stunning design, connected to the blockchain, metamask pairing, interaction with smart contracts, sending Ethereum through the blockchain network, and writing solidity code.
https://jsmastery.pro
680 stars 372 forks source link

using the clientId and activeChain instead the desiredChainId #74

Open alisonborba opened 8 months ago

alisonborba commented 8 months ago

I was getting an error to fetch the contract:

query.ts:446 Error: Could not fetch bytecode for contract at 0x3cEeEbd92D12345678901234567890 on chain 1, double check that the address and chainId are correct.

And consequently got the error on creating a campaign: error TypeError: Cannot read properties of undefined (reading 'call').

This merge request solves the problem using the activeChain and clientId (got at https://thirdweb.com/dashboard/settings) instead of the desiredChainId on .

jayanthpwr commented 5 months ago

Thanks for the help, king!

rahulsingh-99 commented 5 months ago

But I'm still getting errors that goerli is not supported on chains

jayanthpwr commented 5 months ago

Yes, Goerli was deprecated for test networks in 2023. I switched to Sepolia and altered the activeChain of main.jsx file accordingly to "sepolia"

rahulsingh-99 commented 5 months ago

Can you give me the code because I tried every single thing but I'm still getting that error

jayanthpwr commented 5 months ago

I'm unable to do so, as I don't have the write access. You can refer what @alisonborba has done and enter sepolia instead with your personal Thirdweb clientId

rahulsingh-99 commented 5 months ago

@alisonborba help me man I did not get any solutions after doing this activeChain and chainId I still getting this Could not fetch bytecode for contract at error

jayanthpwr commented 4 months ago

image You can refer your clientID of your contract from this URL: https://thirdweb.com/dashboard/settings/api-keys Then put in activeChain="sepolia". If you're still preferring Goerli, I think the error may persist.

rahulsingh-99 commented 4 months ago

code error Still facing the same issue

RathoreAbhiii commented 4 months ago

code error Still facing the same issue

It's not 'chainId'. Replace it with clientId='your_client_id'.