Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deny_unknown_fields attribute from CallRequest. #1252

Conversation

rimbi
Copy link
Contributor

@rimbi rimbi commented Nov 27, 2023

This is to allow unknown fields in an eth call as geth and ganache do.

Sample call:

curl http://localhost:9944 -H "Content-Type:application/json;charset=utf-8" -d \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_estimateGas",
    "params":[{
        "to": "0xDFF8E772A9B212dc4FbA19fa650B440C5c7fd7fd",
        "data": "0xc47f00270000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000543686c6f65000000000000000000000000000000000000000000000000000000",
        "hello": "world"
    }]
}'

The response before the change:

{"jsonrpc":"2.0","error":{"code":-32602,"message":"unknown field `hello` at line 1 column 279"},"id":1}

The response after the change:

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

This is to allow unknown fields in an eth call as geth and ganache do.
@rimbi rimbi requested a review from sorpaas as a code owner November 27, 2023 16:31
@sorpaas sorpaas merged commit 2d6b458 into polkadot-evm:master Jan 3, 2024
4 checks passed
frank0528 pushed a commit to DeepBrainChain/DBC-EVM that referenced this pull request Aug 29, 2024
…m#1252)

This is to allow unknown fields in an eth call as geth and ganache do.
frank0528 pushed a commit to DeepBrainChain/DBC-EVM that referenced this pull request Sep 24, 2024
…m#1252)

This is to allow unknown fields in an eth call as geth and ganache do.
atodorov pushed a commit to gluwa/frontier that referenced this pull request Dec 9, 2024
…m#1252)

This is to allow unknown fields in an eth call as geth and ganache do.
frank0528 pushed a commit to DeepBrainChain/DBC-EVM that referenced this pull request Jan 2, 2025
…m#1252)

This is to allow unknown fields in an eth call as geth and ganache do.
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