mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-09 20:01:05 +00:00
add simulated evm math opcode syscalls
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -104,3 +104,19 @@ POLKAVM_IMPORT(uint64_t, set_storage, uint32_t, uint32_t, uint32_t, uint32_t, ui
|
||||
POLKAVM_IMPORT(void, value_transferred, uint32_t)
|
||||
|
||||
POLKAVM_IMPORT(void, weight_to_fee, uint64_t, uint64_t, uint32_t);
|
||||
|
||||
POLKAVM_IMPORT(void, div, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
POLKAVM_IMPORT(void, sdiv, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
POLKAVM_IMPORT(void, addmod, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
POLKAVM_IMPORT(void, mulmod, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
POLKAVM_IMPORT(void, mod, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
POLKAVM_IMPORT(void, smod, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
POLKAVM_IMPORT(void, exp, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
POLKAVM_IMPORT(void, signext, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
@@ -68,9 +68,27 @@ pub static VALUE_TRANSFERRED: &str = "value_transferred";
|
||||
|
||||
pub static WEIGHT_TO_FEE: &str = "weight_to_fee";
|
||||
|
||||
pub static DIV: &str = "div";
|
||||
pub static SDIV: &str = "sdiv";
|
||||
pub static ADDMOD: &str = "addmod";
|
||||
pub static MULMOD: &str = "mulmod";
|
||||
pub static MOD: &str = "mod";
|
||||
pub static SMOD: &str = "smod";
|
||||
pub static EXP: &str = "exp";
|
||||
pub static SIGNEXT: &str = "signext";
|
||||
|
||||
/// All imported runtime API symbols.
|
||||
/// Useful for configuring common attributes and linkage.
|
||||
pub static IMPORTS: [&str; 33] = [
|
||||
pub static IMPORTS: [&str; 41] = [
|
||||
DIV,
|
||||
SDIV,
|
||||
ADDMOD,
|
||||
MULMOD,
|
||||
MOD,
|
||||
SMOD,
|
||||
EXP,
|
||||
SIGNEXT,
|
||||
//
|
||||
ADDRESS,
|
||||
BALANCE,
|
||||
BALANCE_OF,
|
||||
|
||||
Reference in New Issue
Block a user