pub struct Context<S: GlobalStateReader, E: Executor> {Show 14 fields
pub initiator: AccountHash,
pub caller: Key,
pub callee: Key,
pub transferred_value: u64,
pub config: WasmV2Config,
pub storage_costs: StorageCosts,
pub message_limits: MessageLimits,
pub tracking_copy: TrackingCopy<S>,
pub executor: E,
pub transaction_hash: TransactionHash,
pub address_generator: Arc<RwLock<AddressGenerator>>,
pub chain_name: Arc<str>,
pub input: Bytes,
pub block_time: BlockTime,
}Expand description
Container that holds all relevant modules necessary to process an execution request.
Fields§
§initiator: AccountHashThe address of the account that initiated the contract or session code.
caller: KeyThe address of the addressable entity that is currently executing the contract or session code.
callee: KeyThe address of the addressable entity that is being called.
transferred_value: u64The state of the global state at the time of the call based on the currently executing contract or session address. The amount of tokens that were send to the contract’s purse at the time of the call.
config: WasmV2Config§storage_costs: StorageCosts§message_limits: MessageLimits§tracking_copy: TrackingCopy<S>§executor: E§transaction_hash: TransactionHash§address_generator: Arc<RwLock<AddressGenerator>>§chain_name: Arc<str>§input: Bytes§block_time: BlockTimeAuto Trait Implementations§
impl<S, E> !Freeze for Context<S, E>
impl<S, E> !RefUnwindSafe for Context<S, E>
impl<S, E> Send for Context<S, E>
impl<S, E> Sync for Context<S, E>where
E: Sync,
impl<S, E> Unpin for Context<S, E>where
E: Unpin,
impl<S, E> !UnwindSafe for Context<S, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<From, To> FallibleInto<To> for Fromwhere
To: TryFrom<From>,
impl<From, To> FallibleInto<To> for Fromwhere
To: TryFrom<From>,
fn try_into_wrapped(self) -> Result<To, VMError>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more