mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-05-08 18:18:03 +00:00
implement the blockhash opcode (#114)
This commit is contained in:
@@ -70,6 +70,8 @@ POLKAVM_IMPORT(void, balance, uint32_t)
|
||||
|
||||
POLKAVM_IMPORT(void, balance_of, uint32_t, uint32_t)
|
||||
|
||||
POLKAVM_IMPORT(void, block_hash, uint32_t, uint32_t)
|
||||
|
||||
POLKAVM_IMPORT(void, block_number, uint32_t)
|
||||
|
||||
POLKAVM_IMPORT(uint32_t, call, uint32_t)
|
||||
|
||||
@@ -20,6 +20,8 @@ pub static BALANCE: &str = "balance";
|
||||
|
||||
pub static BALANCE_OF: &str = "balance_of";
|
||||
|
||||
pub static BLOCK_HASH: &str = "block_hash";
|
||||
|
||||
pub static BLOCK_NUMBER: &str = "block_number";
|
||||
|
||||
pub static CALL: &str = "call";
|
||||
@@ -62,12 +64,13 @@ pub static VALUE_TRANSFERRED: &str = "value_transferred";
|
||||
|
||||
/// All imported runtime API symbols.
|
||||
/// Useful for configuring common attributes and linkage.
|
||||
pub static IMPORTS: [&str; 25] = [
|
||||
pub static IMPORTS: [&str; 26] = [
|
||||
SBRK,
|
||||
MEMORY_SIZE,
|
||||
ADDRESS,
|
||||
BALANCE,
|
||||
BALANCE_OF,
|
||||
BLOCK_HASH,
|
||||
BLOCK_NUMBER,
|
||||
CALL,
|
||||
CALLER,
|
||||
|
||||
Reference in New Issue
Block a user