[−][src]Function ink_env::invoke_contract
pub fn invoke_contract<T, Args>(params: &CallParams<T, Args, ()>) -> Result<()> where
T: Environment,
Args: Encode,
Invokes a contract message.
Note
- Prefer using this over
eval_contract
if possible.invoke_contract
will generally have a better performance since it won't try to fetch any results. - This is a low level way to invoke 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.