Building a simple NFT minting DApp for fundraising. Deployed on Polygon and Goerli, my Ethers.js integration with MetaMask triggers an ‘execution reverted’ error. Any insights appreciated.
hey there pixstar54! i’ve run into similar issues before with nft minting dapps. have you double-checked that your contract ABI is up to date? sometimes small changes can cause weird errors like that. also, what gas settings are you using? i’ve found that bumping up the gas limit a bit can sometimes help with ‘execution reverted’ errors on polygon.
btw, curious about your fundraising project - what kind of nfts are you minting? sounds like an interesting idea! let me know if you want any tips on marketing your drop, i’ve picked up some tricks from previous launches.
yo pixstar54, that sucks man. had similar bs with my dapp. check ur contract’s payable functions - sometimes they mess up if not set right. also, try switching rpc endpoints. polygon can b finicky. oh and make sure ur using the right chain id in ur code. good luck with the fundraising bro!
I’ve encountered this issue before. One thing to check is your contract’s state variables. If they’re not properly initialized or there’s a mismatch between your front-end expectations and the contract’s actual state, it can cause ‘execution reverted’ errors. Also, ensure you’re using the correct network RPC URL for each network you’re deploying on. Polygon and Goerli have different requirements.
Another potential culprit could be insufficient funds in your wallet for gas fees, especially on Polygon where transactions are cheaper but still require MATIC. Lastly, if you’re using any external libraries or dependencies, make sure they’re compatible with the networks you’re targeting. Some functions might work on one network but not another due to differences in implementation.