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
When using vm.signAndAttachDelegation or vm.attachDelegation in foundry tests, querying the bytecode of the account that had the delegation attached returns the full bytecode of the delegated contract. This does not match EIP-7702 spec.
The code of the account that has the delegation should be 0xef0100 || <delegate_address> according to spec, and the code length should always be 23 for accounts that have delegates attached.
I used the SimpleDelegateContract example from the foundry docs:
@nathanglb this is similar with #9751 and fixed in nightly / v1.0 rc build, please retest (foundryup -i rc or foundryup -i nightly).
Please reopen if still an issue, thank you!
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.3.0 (5a8bd89 2024-12-20T08:45:53.204298000Z)
What version of Foundryup are you on?
foundryup: 0.3.1
What command(s) is the bug in?
No response
Operating System
None
Describe the bug
When using vm.signAndAttachDelegation or vm.attachDelegation in foundry tests, querying the bytecode of the account that had the delegation attached returns the full bytecode of the delegated contract. This does not match EIP-7702 spec.
The code of the account that has the delegation should be 0xef0100 || <delegate_address> according to spec, and the code length should always be 23 for accounts that have delegates attached.
I used the SimpleDelegateContract example from the foundry docs:
After attaching this as the delegate, the account.code query returned:
The text was updated successfully, but these errors were encountered: