pub struct ImportContractTransaction<'a> { /* private fields */ }
Expand description

A Transaction-like object that allows us to specify details about importing a contract from a different network into our sandbox local network. This creates a new Transaction to be committed to the sandbox network once transact() has been called. This does not commit any new transactions from the network this object is importing from.

Implementations§

Specify at which block height to import the contract from. This is usable with any network this object is importing from, but be aware that only archival networks will have the full history while networks like mainnet or testnet only has the history from 5 or less epochs ago.

Specify at which block hash to import the contract from. This is usable with any network this object is importing from, but be aware that only archival networks will have the full history while networks like mainnet or testnet only has the history from 5 or less epochs ago.

Along with importing the contract code, this will import the state from the contract itself. This is useful for testing current network state or state at a specific block. Note that there is a limit of 50kb of state data that can be pulled down using the usual RPC service. To get beyond this, our own RPC node has to be spun up and used instead.

Specifies the balance of the contract. This will override the balance currently on the network this transaction is importing from.

Process the transaction, and return the result of the execution.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more