fix(eip7702): Add correct rlp decode/encode #1034
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
eip7702 AuthorizationList rlp format is not correct.
The format that gets encoded is:
0xf85ed801940000000000000000000000000000000000000006c101f8431ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804
That decoded is:
[["0x01","0x0000000000000000000000000000000000000006",["0x01"]],["0x1b","0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353","0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"]]
https://toolkit.abdk.consulting/ethereum#rlp
There are two inner lists that should not be there.
Removed Generic over
SignedAuthorization
as it seems it is not needed. We default to Signature (can revert back if this is not the case)