Module host

Module host 

Source

Functions§

account_balance
Get an account’s balance.
account_code
Get an account’s code.
account_code_size
Get an account’s code size.
account_codehash
Get an account’s code hash.
block_basefee
Write the block base fee.
block_coinbase
Write the block coinbase address.
block_gas_limit
Get the block gas limit.
block_number
Get the block number.
block_timestamp
Get the block timestamp.
call_contract
Execute a CALL.
chainid
Get the chain ID.
console_log
Log a value to console (debug only).
console_log_text
Log text to console (debug only).
console_tee
Log and return a value (debug only).
contract_address
Write the contract address.
create1
Deploy a contract via CREATE.
create2
Deploy a contract via CREATE2.
delegate_call_contract
Execute a DELEGATECALL.
emit_log
Emit a log.
end_benchmark
End a benchmark measurement (debug only).
evm_gas_left
Get remaining EVM gas.
evm_ink_left
Get remaining ink.
exit_early
Exit the program early with a status code.
math_add_mod
256-bit addmod.
math_div
256-bit division.
math_mod
256-bit modulo.
math_mul_mod
256-bit mulmod.
math_pow
256-bit power.
msg_reentrant
Get the reentrant counter.
msg_sender
Write the message sender address.
msg_value
Write the message value.
native_keccak256
Compute keccak256 hash.
null_host
No-op host function (debug only).
pay_for_memory_grow
Charge for WASM memory growth.
read_args
Read the program’s arguments into WASM memory.
read_return_data
Read return data into WASM memory.
return_data_size
Get the size of the return data.
start_benchmark
Start a benchmark measurement (debug only).
static_call_contract
Execute a STATICCALL.
storage_cache_bytes32
Cache a 32-byte storage value for later flushing.
storage_flush_cache
Flush the storage cache.
storage_load_bytes32
Load a 32-byte storage value.
transient_load_bytes32
Load a transient storage value.
transient_store_bytes32
Store a transient storage value.
tx_gas_price
Write the transaction gas price.
tx_ink_price
Get the ink price.
tx_origin
Write the transaction origin address.
write_result
Write the program’s result from WASM memory.