pub trait ContractSemantics<T> {
Show 13 methods
// Required methods
fn parties(&self) -> Vec<Party>;
fn with_accounts(&self, accounts: &HashMap<(Party, Token), u128>) -> T;
fn with_account(&self, party: &Party, asset: &Token, quantity: u128) -> T;
fn with_account_role(&self, role: &str, asset: &Token, quantity: u128) -> T;
fn assert_observation(
&self,
obs: &Observation
) -> Result<(bool, Vec<TransactionWarning>), String>;
fn eval_num_value(
&self,
val: &Value
) -> Result<(i128, Vec<TransactionWarning>), String>;
fn with_min_time(&self, val: &u64) -> T;
fn process(&self) -> Result<(ContractInstance, MachineState), ProcessError>;
fn step(
&self,
force_observe: bool
) -> Result<(ContractInstance, MachineState), String>;
fn with_account_addr(
&self,
bech32_addr: &str,
asset: &Token,
quantity: u128
) -> Result<T, String>;
fn apply_input_choice(
&self,
applied_choice_name: &str,
applied_choice_owner: Party,
applied_chosen_value: i128
) -> Result<ContractInstance, ApplyInputChoiceError>;
fn apply_input_deposit(
&self,
from: Party,
asset: Token,
quantity: i128,
to: AccountId
) -> Result<ContractInstance, ApplyInputDepositError>;
fn apply_input_action(
&self,
action: InputAction
) -> Result<ContractInstance, ActionApplicationError>;
}