Skip to main content

ActorStateEthExt

Trait ActorStateEthExt 

Source
pub(crate) trait ActorStateEthExt {
    // Required methods
    fn eth_nonce<DB: Blockstore>(&self, store: &DB) -> Result<EthUint64>;
    fn eth_bytecode<DB: Blockstore>(
        &self,
        store: &DB,
    ) -> Result<Option<EthBytes>>;
    fn eth_storage_at<DB: Blockstore>(
        &self,
        store: &DB,
        position: &[u8; 32],
    ) -> Result<[u8; 32]>;
}
Expand description

Extension trait for querying Ethereum-relevant state from a Filecoin actor.

Required Methods§

Source

fn eth_nonce<DB: Blockstore>(&self, store: &DB) -> Result<EthUint64>

Returns the effective nonce: EVM nonce for EVM actors (zero once self-destructed), sequence otherwise.

Source

fn eth_bytecode<DB: Blockstore>(&self, store: &DB) -> Result<Option<EthBytes>>

Returns the deployed bytecode of an EVM actor, or None for non-EVM or self-destructed actors.

Source

fn eth_storage_at<DB: Blockstore>( &self, store: &DB, position: &[u8; 32], ) -> Result<[u8; 32]>

Returns the 32-byte storage value at position, matching the EVM actor’s GetStorageAt: a zeroed word for a non-EVM actor, a dead (tombstoned) contract, or an unset slot.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§