Struct ink_engine::ext::Engine [−][src]
pub struct Engine {
pub database: Database,
pub exec_context: ExecContext,
// some fields omitted
}
Expand description
The off-chain engine.
Fields
database: Database
The environment database.
exec_context: ExecContext
The current execution context.
Implementations
Transfers value from the contract to the destination account.
Deposits an event identified by the supplied topics and data.
Writes the encoded value into the storage at the given key.
Returns the decoded contract storage at the key if any.
Removes the storage entries at the given key.
Remove the calling account and transfer remaining balance.
This function never returns. Either the termination was successful and the execution of the destroyed contract is halted. Or it failed during the termination which is considered fatal.
Returns the transferred value for the called contract.
Restores a tombstone to the original smart contract.
Params
account_id
: Encoded bytes of theAccountId
of the to-be-restored contract.code_hash
: Encoded code hash of the to-be-restored contract.rent_allowance
: The encoded rent allowance of the restored contract upon successful restoration.filtered_keys
: Storage keys that will be ignored for the tombstone hash match calculation that decide whether the original contract storage and the storage of the restorer contract is equal.
Records the given debug message and appends to stdout.
Conduct the BLAKE-2 256-bit hash and place the result into output
.
Conduct the BLAKE-2 128-bit hash and place the result into output
.
Conduct the SHA-2 256-bit hash and place the result into output
.
Conduct the KECCAK 256-bit hash and place the result into output
.
pub fn instantiate(
&mut self,
_code_hash: &[u8],
_gas_limit: u64,
_endowment: &[u8],
_input: &[u8],
_out_address: &mut &mut [u8],
_out_return_value: &mut &mut [u8],
_salt: &[u8]
) -> Result<(), Error>
pub fn call(
&mut self,
_callee: &[u8],
_gas_limit: u64,
_value: &[u8],
_input: &[u8],
_output: &mut &mut [u8]
) -> Result<(), Error>
Resets the environment.
Returns the total number of reads and writes of the contract’s storage.
Sets a caller for the next call.
Sets the callee for the next call.
Returns the amount of storage cells used by the account account_id
.
Returns None
if the account_id
is non-existent.
Returns the callee, i.e. the currently executing contract.
Returns the contents of the past performed environmental debug_message
in order.
Returns the recorded emitted events in order.
Returns the current balance of account_id
.
Sets the balance of account_id
to new_balance
.
Sets the value transferred from the caller to the callee as part of the call.