pub trait Context {
    type PublicStore: PublicStore;
    type ConfidentialStore: ConfidentialStore;
    type Env: Env + Crypto;

    fn instance_id(&self) -> InstanceId;
    fn instance_address(&self) -> &Address;
    fn caller_address(&self) -> &Address;
    fn deposited_tokens(&self) -> &[BaseUnits];
    fn is_read_only(&self) -> bool;
    fn call_format(&self) -> CallFormat;
    fn emit_message(&mut self, msg: Message);
    fn emit_event<E: Event>(&mut self, event: E);
    fn public_store(&mut self) -> &mut Self::PublicStore;
    fn confidential_store(&mut self) -> &mut Self::ConfidentialStore;
    fn env(&self) -> &Self::Env;
}
Expand description

Execution context.

Required Associated Types

The public store.

The confidential store.

The environment.

Required Methods

Contract instance identifier.

Contract instance address.

Caller address.

Tokens deposited by the caller.

Whether the call is read-only and must not make any storage modifications.

Call format.

Emits a message.

Emits an event.

Public contract store.

Confidential contract store.

Environment.

Implementors