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

feat: support "input" param for verifiable tx #6019

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

rdvorkin
Copy link
Contributor

@rdvorkin rdvorkin commented Oct 3, 2023

Using contract calls in web3js, the transaction data can either be filled in the "data" parameter or "input" parameter, default is "input"

The current verified execution provider supports only "data" parameter, so code like this

const contract = new web3.eth.Contract(balanceOfABI, tokenContract)
let result = await contract.methods.balanceOf(tokenHolder).call();

doesn't work

Using contract calls in web3js, the transaction data can either be filled in the "data" parameter or "input" parameter, default is "input"

The current verified execution provider supports only "data" parameter, so code like this

const contract = new web3.eth.Contract(balanceOfABI, tokenContract)
let result = await contract.methods.balanceOf(tokenHolder).call();

doesn't work
@rdvorkin rdvorkin requested a review from a team as a code owner October 3, 2023 11:47
@CLAassistant
Copy link

CLAassistant commented Oct 3, 2023

CLA assistant check
All committers have signed the CLA.

@nazarhussain nazarhussain added the scope-light-clients All issues regarding light client development. label Oct 11, 2023
@nazarhussain nazarhussain self-assigned this Oct 11, 2023
@@ -181,7 +181,7 @@ export async function executeVMCall({
gasLimit: hexToBigInt(gas ?? block.gasLimit),
gasPrice: hexToBigInt(gasPrice ?? maxPriorityFeePerGas ?? "0x0"),
value: hexToBigInt(value ?? "0x0"),
data: data ? hexToBuffer(data) : undefined,
data: input ? hexToBuffer(input) : data ? hexToBuffer(data) : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, data is deprecated and input is the new data field for ethereum transactions.

https://github.com/ethereum/go-ethereum/blob/0004c6b229b787281760b14fb9460ffd9c2496f1/internal/ethapi/transaction_args.go#L47-L51

@nazarhussain nazarhussain merged commit 1aa6561 into ChainSafe:unstable Oct 11, 2023
15 of 16 checks passed
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.12.0 🎉

rdvorkin added a commit to rdvorkin/lodestar that referenced this pull request Nov 9, 2023
This is a continuation of ChainSafe#6019
There is an additional fix needed, where tx.input support is added in case input is used instead of data
nazarhussain pushed a commit that referenced this pull request Nov 10, 2023
This is a continuation of #6019
There is an additional fix needed, where tx.input support is added in case input is used instead of data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-light-clients All issues regarding light client development.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants