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§
Sourcefn get_msg_sender(&self, snapshot_id: usize) -> Result<DynSolValue>
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
Sourcefn get_msg_value(&self, snapshot_id: usize) -> Result<DynSolValue>
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