Repository navigation
Add steps to check and clear an EIP-7702 delegation - #673
Open
mevdao-org wants to merge 1 commit into
Open
mevdao-org wants to merge 1 commit into
mevdao-org wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The page does a good job on the risks. What it doesn't cover is the question people ask right after a 7702 drain: is my address delegated, and how do I undo it? This PR adds two short sections for that.
The first shows how to read the account code with
eth_getCodeorcast code. A delegated EOA returns 23 bytes starting with0xef0100, so it's easy to spot. It also says to repeat the check per chain, since an authorization signed with chain ID 0 can be replayed anywhere.The second covers revoking. You sign a zero address authorization with
cast wallet sign-authand let a second, clean wallet broadcast it, so you never send gas into an account a sweeper is watching. I noted the nonce + 1 rule for self-broadcast too. There's also a warning that none of this helps if the key itself leaked.Under Further reading I added the Foundry page for these commands and a longer walkthrough we wrote at MEV DAO. Drop ours if you'd rather keep that list to specs and tool docs, no problem.
Commands match the current Foundry docs. Formatting follows what's already on the page. I added
mevdao-orgtocontributors.jsonand underwrote, since these are new sections. I'm with MEV DAO, so flagging that up front. Tagging @pinalikefruit as the page's steward. Happy to discuss it in frameworks-contribs too, or right here on the PR.