Skip to content

eth_call returning "0x" #19

@hub-il

Description

@hub-il

We are trying to use the JSON-RPC "eth_call" method to return the total supply of a token. For example:

{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
      {
        "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
        "data": "0x18160ddd"
      },
      "0x894E426"
    ],
    "id": 1
  }

But instead of getting the supply, the result is always 0:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x"
}

Is it possible to use the "eth_call" method to get the total supply? If so, what are we doing wrong, and if not, is there an alternative method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions