Skip to main content

SetCodeAuthorityStateView

Trait SetCodeAuthorityStateView 

Source
pub trait SetCodeAuthorityStateView {
    // Required method
    fn authority_account(
        &self,
        authority: Address,
    ) -> Option<SetCodeAuthorityAccount>;
}
Expand description

Caller-provided authority account-state view.

EIP-7702 treats an authority account that is absent from the state trie as an empty account with nonce 0. Implementations must synthesize SetCodeAuthorityAccount { nonce: Nonce::new(0), code: Empty, .. } for that case. Return None only when state is genuinely unavailable.

The slice implementation is intended for tests and small fixtures. Production callers with large authorization lists should use an indexed implementation to avoid repeated linear scans.

Required Methods§

Source

fn authority_account( &self, authority: Address, ) -> Option<SetCodeAuthorityAccount>

Returns account state for authority.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SetCodeAuthorityStateView for [SetCodeAuthorityAccount]

Implementors§