Function ink_env::instantiate_contract_v1

source ·
pub fn instantiate_contract_v1<E, ContractRef, Args, Salt, R>(
    params: &CreateParams<E, ContractRef, LimitParamsV1, 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.

§Note

This is a low level way to instantiate another smart contract, calling the legacy instantiate_v1 host function.

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

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