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 address of the caller.

Returns the balance of the executed contract.

Returns the transferred value for the called contract.

Returns the address of the executed contract.

Restores a tombstone to the original smart contract.

Params
  • account_id: Encoded bytes of the AccountId 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.

Recovers the compressed ECDSA public key for given signature and message_hash, and stores the result in output.

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.

Trait Implementations

Returns the “default value” for a type. Read more

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

Performs the conversion.

Performs the conversion.

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.