ERC20 contract eth_call returns call revert exception error for a single contract #199

Closed
opened 2022-10-17 05:44:28 +00:00 by nikugogoi · 2 comments
nikugogoi commented 2022-10-17 05:44:28 +00:00 (Migrated from github.com)
  • ipld-eth-server eth_call fails for single ERC20 contract (0xe76c6c83af64e4c60245d8c7de953df673a7a33d)
  • eth_call to geth endpoint returns correct result
  • ipld-eth-server eth_call is working for other ERC20 contracts
  • Issue discovered on finding incorrect data for Token entity at height 12754862 in uniswap-watcher
  • Methods returning error:
    • decimals
    • name
    • symbol
    • totalSuppy
  • Error returned from eth_call:
    Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="decimals()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
        at Logger.makeError (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
        at Logger.throwError (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
        at Interface.decodeFunctionResult (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/abi/src.ts/interface.ts:427:23)
        at Contract.<anonymous> (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/contracts/src.ts/index.ts:400:44)
        at step (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/contracts/lib/index.js:48:23)
        at Object.next (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/contracts/lib/index.js:29:53)
        at fulfilled (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/contracts/lib/index.js:20:58)
        at processTicksAndRejections (node:internal/process/task_queues:96:5) {
      reason: null,
      code: 'CALL_EXCEPTION',
      method: 'decimals()',
      data: '0x',
      errorArgs: null,
      errorName: null,
      errorSignature: null,
      address: '0xe76c6c83af64e4c60245d8c7de953df673a7a33d',
      args: [],
      transaction: {
        data: '0x313ce567',
        to: '0xe76C6c83af64e4C60245D8C7dE953DF673a7A33D'
      }
    }
    
- ipld-eth-server `eth_call` fails for single ERC20 contract (`0xe76c6c83af64e4c60245d8c7de953df673a7a33d`) - `eth_call` to geth endpoint returns correct result - ipld-eth-server `eth_call` is working for other ERC20 contracts - Issue discovered on finding incorrect data for `Token` entity at height `12754862` in [uniswap-watcher](https://github.com/vulcanize/uniswap-watcher-ts) - Methods returning error: - decimals - name - symbol - totalSuppy - Error returned from eth_call: ``` Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="decimals()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0) at Logger.makeError (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/logger/src.ts/index.ts:269:28) at Logger.throwError (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/logger/src.ts/index.ts:281:20) at Interface.decodeFunctionResult (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/abi/src.ts/interface.ts:427:23) at Contract.<anonymous> (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/contracts/src.ts/index.ts:400:44) at step (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/contracts/lib/index.js:48:23) at Object.next (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/contracts/lib/index.js:29:53) at fulfilled (/home/nabarun/deep-stack/uniswap-watcher-ts/node_modules/@ethersproject/contracts/lib/index.js:20:58) at processTicksAndRejections (node:internal/process/task_queues:96:5) { reason: null, code: 'CALL_EXCEPTION', method: 'decimals()', data: '0x', errorArgs: null, errorName: null, errorSignature: null, address: '0xe76c6c83af64e4c60245d8c7de953df673a7a33d', args: [], transaction: { data: '0x313ce567', to: '0xe76C6c83af64e4C60245D8C7dE953DF673a7A33D' } } ```
Owner

@nikugogoi if this was resolved. Please close. Thanks. Please leave a comment here if this was not resolved. @ashwinphatak added for visibility.

@nikugogoi if this was resolved. Please close. Thanks. Please leave a comment here if this was not resolved. @ashwinphatak added for visibility.
nikugogoi commented 2023-06-19 05:52:31 +00:00 (Migrated from github.com)

This has been resolved
Checked by making CURL request from caliban

$ curl -X POST \
  -H "Content-Type: application/json" \
  --data '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
      {
        "to": "0xe76c6c83af64e4c60245d8c7de953df673a7a33d",
        "data": "0x313ce567"
      },
      "latest"
    ],
    "id": 1
  }' \
  http://vulture.vpc:8082
{"jsonrpc":"2.0","id":1,"result":"0x0000000000000000000000000000000000000000000000000000000000000012"}
This has been resolved Checked by making CURL request from `caliban` ``` $ curl -X POST \ -H "Content-Type: application/json" \ --data '{ "jsonrpc": "2.0", "method": "eth_call", "params": [ { "to": "0xe76c6c83af64e4c60245d8c7de953df673a7a33d", "data": "0x313ce567" }, "latest" ], "id": 1 }' \ http://vulture.vpc:8082 {"jsonrpc":"2.0","id":1,"result":"0x0000000000000000000000000000000000000000000000000000000000000012"} ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/ipld-eth-server#199
No description provided.