use crate::{
env::{Crypto, Env},
event::Event,
storage::{ConfidentialStore, PublicStore},
types::{address::Address, message::Message, token, CallFormat, InstanceId},
};
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) -> &[token::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;
}