Function ink_env::eval_contract[][src]

pub fn eval_contract<T, Args, R>(
    params: &CallParams<T, Args, ReturnType<R>>
) -> Result<R> where
    T: Environment,
    Args: Encode,
    R: Decode
Expand description

Evaluates a contract message and returns its result.

Note

This is a low level way to evaluate another smart contract. Prefer to use the ink! guided and type safe approach to using this.

Errors

  • If the called account does not exist.
  • If the called account is not a contract.
  • If the called contract is a tombstone.
  • If arguments passed to the called contract message are invalid.
  • If the called contract execution has trapped.
  • If the called contract ran out of gas upon execution.
  • If the returned value failed to decode properly.