Struct ink_env::call::CreateBuilder

source ·
pub struct CreateBuilder<E, ContractRef, CodeHash, GasLimit, Endowment, Args, Salt, RetType>where
    E: Environment,
{ /* private fields */ }
Expand description

Builds up contract instantiations.

Implementations§

Sets the used code hash for the contract instantiation.

Sets the maximum allowed gas costs for the contract instantiation.

Sets the value transferred upon the execution of the call.

Sets the value transferred upon the execution of the call.

Sets the value transferred upon the execution of the call.

Sets the type of the returned value upon the execution of the constructor.

Note

Constructors are not able to return arbitrary values. Instead a successful call to a constructor returns the address at which the contract was instantiated.

Therefore this must always be a reference (i.e ContractRef) to the contract you’re trying to instantiate.

Finalizes the create builder, allowing it to instantiate a contract.

Instantiates the contract and returns its account ID back to the caller.

Panics

This method panics if it encounters an ink::env::Error or an ink::primitives::LangError. If you want to handle those use the try_instantiate method instead.

Instantiates the contract and returns its account ID back to the caller.

Note

On failure this returns an outer ink::env::Error or inner ink::primitives::LangError, both of which can be handled by the caller.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.