Skip to content

Conversation

@hector-nguyen-vmo
Copy link

I was using ethclient to query contract in other EVMs, but mostly only support data field instead input, while ethereum support both.

Replacement input with data for eth_call in ethclient:

{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
        {
            "to": "0xdAC17F958D2ee523a2206206994597C13D831xxx",
            "input": "0x06fddxxx"
        },
        "latest"
    ],
    "id": 1
}

to

{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
        {
            "to": "0xdAC17F958D2ee523a2206206994597C13D831xxx",
            "data": "0x06fddxxx"
        },
        "latest"
    ],
    "id": 1
}

@holiman
Copy link
Contributor

holiman commented Dec 30, 2023

Previous:
This PR wanted to revert back to data: #28204
Here's where we switched to use input: #28078

I'll lift this from the older PR:

Please ping the relevant projects that they are not in sync with the spec (6 years out of sync). The simplest thing to do is on server side to accept both, and gradually transition clients to input from data. We kind of allowed 6 years transition period in Geth.

@holiman holiman closed this Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants