You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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
The text was updated successfully, but these errors were encountered: