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

7702: Failed to decode transaction #2721

Closed
1 task done
chris13524 opened this issue Sep 13, 2024 · 1 comment
Closed
1 task done

7702: Failed to decode transaction #2721

chris13524 opened this issue Sep 13, 2024 · 1 comment

Comments

@chris13524
Copy link

Check existing issues

Viem Version

2.21.6

Current Behavior

When using the 7702 example here anvil (ran with anvil --hardfork=prague) returns the error "Failed to decode transaction"

Expected Behavior

The example works

Steps To Reproduce

Run the linked example against anvil --hardfork=prague

Link to Minimal Reproducible Example

https://github.com/chris13524/viem/blob/failed-to-decode-transaction/examples/7702/index.ts

Anything else?

Upon debugging myself it appears to be an RLP encoding issue: leading zero. The error is that the nonce is encoded as a zero when it should be an empty array. When using anvil_setNonce to bump the nonce to 1 then the decoding error disappears.

https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/

https://github.com/recmo/uint/blob/293d2962a3a5e54ff1cc583d4165003695e89bb5/src/support/alloy_rlp.rs#L81

@jxom jxom closed this as completed in 644f72d Sep 14, 2024
Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant