Execution
EIP-7702 delegation.
EIP-7702 (Pectra, May 2025) lets an externally-owned account borrow smart-contract code at its existing address by signing a `(chain_id, address, nonce)` authorization. Tenzro implements the protocol-level primitive in
tenzro-vm::eip7702.- STATUS
- Testnet
- CRATE
- tenzro-vm::eip7702
- STABILITY
- Stable
- TYPE
- Component
01
Signed authorization
Eip7702Authorization {
chain_id: u64, // 0 = wildcard (any chain)
delegate_address: Vec<u8>, // 20 bytes
nonce: u64,
signature: Vec<u8>, // r(32) || s(32) || y_parity(1)
}
// Signing preimage:
MAGIC(0x05) || rlp([chain_id, delegate_address, nonce])02
Registry
DelegationRegistry::install(
auth: &Eip7702Authorization,
expected_authority: [u8; 20],
current_chain_id: u64,
current_nonce: u64,
) -> DelegationPointer
// rejects: chain_id mismatch, nonce mismatch, signature recovery failure,
// authority mismatch. delegate_address = 0x0 revokes the active delegation.03
Designator
The EVM code field for an authority becomes the 23-byte designator 0xef0100 || target_address(20). The EVM executor detects this magic prefix via is_delegation_designator and calls resolve_target(authority)to fetch the pointer. The target's code runs in the authority's storage context.
04
Writes
tenzro_install7702Delegation {
authority, chain_id, delegate_address, nonce, signature
}
tenzro_revoke7702Delegation { authority } // operator-side bypass05
Reads
tenzro_get7702Delegation { authority }
// returns { delegated, target, chain_id, authority_nonce, designator }
// Stateless helpers (existed prior to the registry):
tenzro_eip7702SigningHash
tenzro_eip7702BuildDesignator
tenzro_eip7702ParseDesignator
tenzro_eip7702ProtocolInfoRelated