Replies: 1 comment
-
The given 0xf1a54b075fb71768ac31b33fd7c61ad8f9f7dd18 does not seem to be an ERC20 contract, that's calling the Also please remove your infura API key (better reset it from the infura dashboard), as someone might abuse it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The contract is defined like this:
this._tokenContract = new ethers.Contract(_tokenAddress, abi_1.ERC20_ABI, provider);
This is where the error occurs. (contract.balanceOf)
async getTokenBalance(tokenHolder) { return (await this._tokenContract.functions.balanceOf(tokenHolder))[0]; }
Call the function here.
await this.getTokenBalance(this._sender)
When I run the program, I get an error in the balanceOf statement.
Error: missing revert data in call exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (error={"reason":"processing response error","code":"SERVER_ERROR","body":
"{"jsonrpc":"2.0","id":45,"error":{"code":-32000,"message":"execution reverted"}}","error":{"code":-32000},"requestBody":"{"method":"eth_call","params":[{"to":"0xf1a54b075fb71768ac31
b33fd7c61ad8f9f7dd18","data":"0x70a08231000000000000000000000000661da0758cd339d17fe55a4b48e4706432adb916"},"latest"],"id":45,"jsonrpc":"2.0"}","requestMethod":"POST","url":"https://goerli.infu
ra.io/v3/4f13b4d6dcd440e28a764121a13281b8"}, data="0x", code=CALL_EXCEPTION, version=providers/5.6.0)
Please tell me how to solve it 😢 😭 😢 😭 😢 😭
Token Address : 0xf1a54b075fb71768ac31b33fd7c61ad8f9f7dd18 (goerli eth token)
RPC End point : https://goerli.infura.io/v3/4f13b4d6dcd440e28a764121a13281b8 (goerli testnet)
ABI : For Erc20 Transfer Abi, the value provided by the Flashbot team and the value provided by Erc 20 were used.
Environment:
ethers / provider : 5.6.0
node.js
Beta Was this translation helpful? Give feedback.
All reactions