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

Add helper for recovering authority #750

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Add helper for recovering authority #750

merged 2 commits into from
Oct 15, 2024

Conversation

etan-status
Copy link
Contributor

For EIP-7702 SetCode transaction, it is necessary to identify the authority issuing an authorization. Its account's code is set to proxy to the authorization address if successful.

For EIP-7702 SetCode transaction, it is necessary to identify the
authority issuing an authorization. Its account's code is set to
proxy to the authorization address if successful.
@@ -305,6 +305,23 @@ proc readTxEip4844(rlp: var Rlp, tx: var Transaction) {.raises: [RlpError].} =
rlp.read(tx.R)
rlp.read(tx.S)

func rlpEncodeEip7702(auth: Authorization): seq[byte] =
var w = initRlpWriter()
w.append(0x05'u8)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it works :) cross-checked against https://github.com/ethereum/EIPs/blob/e0d0c814bb8b240d4dc44fefc48bc7aa00792504/assets/eip-6404/convert_tests.py#L96 I got the same authorities with this nim-eth code

@jangko jangko merged commit 171531f into master Oct 15, 2024
18 checks passed
@jangko jangko deleted the dev/etan/sc-helpers branch October 15, 2024 14:44
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.

3 participants