MessageAccess

Trait MessageAccess 

Source
pub trait MessageAccess {
    // Required methods
    fn msg_sender(&self) -> Address;
    fn msg_reentrant(&self) -> bool;
    fn msg_value(&self) -> U256;
    fn tx_origin(&self) -> Address;
}
Expand description

Provides access to transaction details of a Stylus contract.

Required Methods§

Source

fn msg_sender(&self) -> Address

Gets the address of the account that called the program. For normal L2-to-L2 transactions the semantics are equivalent to that of the EVM’s CALLER opcode, including in cases arising from DELEGATE_CALL.

For L1-to-L2 retryable ticket transactions, the top-level sender’s address will be aliased. See Retryable Ticket Address Aliasing for more information on how this works.

Source

fn msg_reentrant(&self) -> bool

Whether the current call is reentrant.

Source

fn msg_value(&self) -> U256

Get the ETH value in wei sent to the program. The semantics are equivalent to that of the EVM’s CALLVALUE opcode.

Source

fn tx_origin(&self) -> Address

Gets the top-level sender of the transaction. The semantics are equivalent to that of the EVM’s ORIGIN opcode.

Implementors§