Function pro_env::instantiate_contract [−][src]
pub fn instantiate_contract<T, Args, Salt, C>(
params: &CreateParams<T, Args, Salt, C>
) -> Result<T::AccountId> where
T: Environment,
Args: Encode,
Salt: AsRef<[u8]>,
Instantiates another contract.
Note
This is a low level way to instantiate another smart contract. Prefer to use the pro! guided and type safe approach to using this.
Errors
- If the code hash is invalid.
- If the arguments passed to the instantiation process are invalid.
- If the instantiation process traps.
- If the instantiation process runs out of gas.
- If given insufficient endowment.
- If the returned account ID failed to decode properly.