All chains
    Preparing search index...

    Type Alias eth_instantiate_with_code

    eth_instantiate_with_code: TxDescriptor<
        {
            code: Binary;
            data: Binary;
            effective_gas_price: FixedSizeArray<4, bigint>;
            encoded_len: number;
            gas_limit: { proof_size: bigint; ref_time: bigint };
            transaction_encoded: Binary;
            value: FixedSizeArray<4, bigint>;
        },
    >

    Same as [Self::instantiate_with_code], but intended to be dispatched only by an EVM transaction through the EVM compatibility layer.

    Parameters

    • value: The balance to transfer from the origin to the newly created contract.
    • gas_limit: The gas limit enforced when executing the constructor.
    • storage_deposit_limit: The maximum amount of balance that can be charged/reserved from the caller to pay for the storage consumed.
    • code: The contract code to deploy in raw bytes.
    • data: The input data to pass to the contract constructor.
    • salt: Used for the address derivation. If Some is supplied then CREATE2 semantics are used. If None then CRATE1 is used.
    • transaction_encoded: The RLP encoding of the signed Ethereum transaction, represented as [crate::evm::TransactionSigned], provided by the Ethereum wallet. This is used for building the Ethereum transaction root.

    Calling this dispatchable ensures that the origin's nonce is bumped only once, via the CheckNonce transaction extension. In contrast, [Self::instantiate_with_code] also bumps the nonce after contract instantiation, since it may be invoked multiple times within a batch call transaction.