support the origin opcode (#103)

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-10-29 18:40:25 +01:00
committed by GitHub
parent a4043ecde7
commit 5b3b90db83
5 changed files with 70 additions and 3 deletions
+2
View File
@@ -96,6 +96,8 @@ POLKAVM_IMPORT(uint32_t, instantiate, uint32_t)
POLKAVM_IMPORT(void, now, uint32_t)
POLKAVM_IMPORT(void, origin, uint32_t)
POLKAVM_IMPORT(void, seal_return, uint32_t, uint32_t, uint32_t)
POLKAVM_IMPORT(uint32_t, set_storage, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)
+4 -1
View File
@@ -46,6 +46,8 @@ pub static INSTANTIATE: &str = "instantiate";
pub static NOW: &str = "now";
pub static ORIGIN: &str = "origin";
pub static RETURN: &str = "seal_return";
pub static SET_STORAGE: &str = "set_storage";
@@ -60,7 +62,7 @@ pub static VALUE_TRANSFERRED: &str = "value_transferred";
/// All imported runtime API symbols.
/// Useful for configuring common attributes and linkage.
pub static IMPORTS: [&str; 24] = [
pub static IMPORTS: [&str; 25] = [
SBRK,
MEMORY_SIZE,
ADDRESS,
@@ -79,6 +81,7 @@ pub static IMPORTS: [&str; 24] = [
INPUT,
INSTANTIATE,
NOW,
ORIGIN,
RETURN,
RETURNDATACOPY,
RETURNDATASIZE,