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. #197

Open
wants to merge 1 commit into
base: moonbeam-polkadot-v1.1.0
Choose a base branch
from

Conversation

rimbi
Copy link

@rimbi rimbi commented Nov 1, 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 review from librelois and ahmadkaouk November 1, 2023 15:02
@rimbi rimbi self-assigned this Nov 1, 2023
@rimbi
Copy link
Author

rimbi commented Nov 6, 2023

Kindly reminder

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