Trait concordium_std::HasActions[][src]

pub trait HasActions {
    fn accept() -> Self;
fn simple_transfer(acc: &AccountAddress, amount: Amount) -> Self;
fn send(
        ca: &ContractAddress,
        receive_name: &str,
        amount: Amount,
        parameter: &[u8]
    ) -> Self;
fn and_then(self, then: Self) -> Self;
fn or_else(self, el: Self) -> Self; }

An object that can serve to construct actions.

The actions that a smart contract can produce as a result of its execution. These actions form a tree and are executed by the scheduler in the predefined order.

Required methods

fn accept() -> Self[src]

Default accept action.

fn simple_transfer(acc: &AccountAddress, amount: Amount) -> Self[src]

Send a given amount to an account.

fn send(
    ca: &ContractAddress,
    receive_name: &str,
    amount: Amount,
    parameter: &[u8]
) -> Self
[src]

Send a message to a contract.

fn and_then(self, then: Self) -> Self[src]

If the execution of the first action succeeds, run the second action as well.

fn or_else(self, el: Self) -> Self[src]

If the execution of the first action fails, try the second.

Loading content...

Implementors

impl HasActions for ActionsTree[src]

impl HasActions for Action[src]

#Implementation of actions. These actions are implemented by direct calls to host functions.

Loading content...