Function ink_env::invoke_contract_v1
source · pub fn invoke_contract_v1<E, Args, R>(
params: &CallParams<E, CallV1<E>, Args, R>,
) -> Result<MessageResult<R>>where
E: Environment,
Args: Encode,
R: Decode,
Expand description
Invokes 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.
This will call into the original version of the host function. It is recommended to
use invoke_contract
to use the latest version if the target runtime supports it.
§Errors
- If the called account does not exist.
- If the called account is not a contract.
- 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.