Lab 3: EIP-7702 prep — batch "approve + pay" from an EOA

Time: ~40 min. Goal: see what a 7702 delegation does, locally, before XDC mainnet has Prague.

Status: Ethereum mainnet has 7702 since Pectra; XDC devnet has it, XDC Apothem activates Prague at

block 84,333,000; XDC mainnet (chain 50) is still Cancun. So: anvil / forge only.

Steps

Exercises are the numbered comments in the starter files.

(keys from makeAddrAndKey, throwaway).

forge create, then send a type-4 tx with `cast send <eoa> 'execute((address,uint256,bytes)[])' '[...]'

--auth <impl> --private-key <anvil test key of that EOA> --rpc-url anvil, then cast code <eoa> --rpc-url anvil`.

Discuss

Solution: lab3-solution.tar.gz (download link below; same layout, run the same forge install step first).

Download starter · Download solution · All workshop material