EIP-7702: Set EOA account code for one transaction

Thanks, I’ve edited my above comment so include this option so it’s comprehensive. I don’t feel strongly on the approach used to support deterministic deployments.

To support deterministic deployments though, you’d have to only sign over code hash and not an additional address. If signing over an address you cannot rely on Nick’s Method to specify an arbitrary signature that recovers to a fixed authority, because the address containing the required code hash might differ per chain.

1 Like

Yes, this is why you only sign over the code hash and not the address. The address with the corresponding codehash is supplied to the top-level transaction instead of the codehash. So to be explicit, the codehash is only part of the 0x05 (auth) signature and the code address would only be part of the 0x04 (tx) signature. Thereby, the code location can be different on different chains, but the authentication is tied to the codehash.

  1. If nonce list item is length one, verify the nonce of authority is equal to nonce.

does it mean that the nonce of the authority will be increased?

Can anyone who knows please explain the justification for

It will In the case of multiple tuples for the same authority, set the code specified by the address in the first occurrence.

from https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md#behavior?

The most impactful improvement will be the ability to do multicall writes, e.g. doing WETH.approve() and Pool.swap() in a single TX.

Presumably the way this is supposed to work in EIP-7702 is that you set your contract code to some contract that enables this.

  1. Does this work out of the box with existing wallets (e.g. gnosis safe)?
  2. If not 1, then what does an implementation of this look like?