MsgHandler

Trait MsgHandler 

Source
pub trait MsgHandler {
    // Required methods
    fn get_msg_sender(&self, snapshot_id: usize) -> Result<DynSolValue>;
    fn get_msg_value(&self, snapshot_id: usize) -> Result<DynSolValue>;
}
Expand description

Handler trait for msg global variables.

Provides access to transaction context variables like msg.sender and msg.value.

Required Methods§

Source

fn get_msg_sender(&self, snapshot_id: usize) -> Result<DynSolValue>

Get the message sender address (msg.sender).

§Arguments
  • snapshot_id - The execution context identifier
§Returns

The sender address as a DynSolValue::Address

Source

fn get_msg_value(&self, snapshot_id: usize) -> Result<DynSolValue>

Get the message value (msg.value).

§Arguments
  • snapshot_id - The execution context identifier
§Returns

The message value in wei as a DynSolValue::Uint

Implementations on Foreign Types§

Source§

impl MsgHandler for Arc<SimulationDebugHandler>

Source§

fn get_msg_sender(&self, snapshot_id: usize) -> Result<DynSolValue>

Source§

fn get_msg_value(&self, snapshot_id: usize) -> Result<DynSolValue>

Implementors§