1

The test works fine on the local hardhat network, but when I run this test on staging i.e Goerli I get the following error in the picture.

The error seems to occur at the txResponse.wait() line as you can see all the console logs work fine before that.

Error

Here's how the full error 👇:

Error: transaction failed [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (transactionHash="0x816eb8c5abf3f9968f5bc9924919e9c37685bca41cf37038968c0a84fd413e8b", transaction={"hash":"0x816eb8c5abf3f9968f5bc9924919e9c37685bca41cf37038968c0a84fd413e8b","type":0,"accessList":null,"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x586d5835978fB8B8352DdA4D8E8Cd1668D32b440","gasPrice":{"type":"BigNumber","hex":"0x989680"},"gasLimit":{"type":"BigNumber","hex":"0x01bae258"},"to":"0xcA0D8824e43B3235486cec5C228E2E4B8CB0ddd0","value":{"type":"BigNumber","hex":"0x00"},"nonce":29,"data":"0x991466690000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002e516d5757515375504d5336615843625a4b70456a504850555a4e324e6a42335972684a5448735634583376623274000000000000000000000000000000000000","r":"0x40c922bb31a7e0e283958eb74f6f3443f3f6530fa0adffa47e35cdc9f2626eb3","s":"0x15644646ca04c8ab558ba2454a6473a37b7e137d0e23eac87f7d6377fbe0a650","v":46,"creates":null,"chainId":5}, receipt={"to":"0xcA0D8824e43B3235486cec5CNumber":7672792,"confirmations":2,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x0e6664"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x989680"},"status":0,"type":0,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.7.1) at Logger.makeError (node_modules@ethersproject\logger\src.ts\index.ts:269:28) at Logger.throwError (node_modules@ethersproject\logger\src.ts\index.ts:281:20) at EthersProviderWrapper. (node_modules@ethersproject\providers\src.ts\base-provider.ts:1549:24) at step (node_modules@ethersproject\providers\lib\base-provider.js:48:23) at Object.next (node_modules@ethersproject\providers\lib\base-provider.js:29:53) at fulfilled (node_modules@ethersproject\providers\lib\base-provider.js:20:58)

1 Answer 1

0

Check which chainId you are using. I mean which you set goerli eth or polygon matic in Metamask Wallet. If you set polygon and currently you are using eth goerli in Metamask, then you get this error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.