pub fn instantiate_contract<E, ContractRef, Args, Salt, R>(
    params: &CreateParams<E, ContractRef, Args, Salt, R>
) -> Result<ConstructorResult<<R as ConstructorReturnType<ContractRef>>::Output>>where
    E: Environment,
    ContractRef: FromAccountId<E>,
    Args: Encode,
    Salt: AsRef<[u8]>,
    R: ConstructorReturnType<ContractRef>,
Expand description

Instantiates another contract.


This is a low level way to instantiate another smart contract.

Prefer to use methods on a ContractRef or the CreateBuilder through build_create instead.


  • 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.