the gas limit opcode (#139)

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
Cyrill Leutwiler
2024-12-18 20:31:42 +01:00
committed by GitHub
parent d299dd1a19
commit 22070a824d
8 changed files with 412 additions and 362 deletions
+2
View File
@@ -94,6 +94,8 @@ POLKAVM_IMPORT(void, code_hash, uint32_t, uint32_t)
POLKAVM_IMPORT(void, deposit_event, uint32_t, uint32_t, uint32_t, uint32_t)
POLKAVM_IMPORT(uint64_t, gas_limit);
POLKAVM_IMPORT(void, get_immutable_data, uint32_t, uint32_t);
POLKAVM_IMPORT(uint64_t, get_storage, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)
+4 -1
View File
@@ -44,6 +44,8 @@ pub static CODE_HASH: &str = "code_hash";
pub static DEPOSIT_EVENT: &str = "deposit_event";
pub static GAS_LIMIT: &str = "gas_limit";
pub static GET_IMMUTABLE_DATA: &str = "get_immutable_data";
pub static GET_STORAGE: &str = "get_storage";
@@ -74,7 +76,7 @@ pub static WEIGHT_TO_FEE: &str = "weight_to_fee";
/// All imported runtime API symbols.
/// Useful for configuring common attributes and linkage.
pub static IMPORTS: [&str; 31] = [
pub static IMPORTS: [&str; 32] = [
SBRK,
MEMORY_SIZE,
ADDRESS,
@@ -92,6 +94,7 @@ pub static IMPORTS: [&str; 31] = [
CODE_SIZE,
CODE_HASH,
DEPOSIT_EVENT,
GAS_LIMIT,
GET_IMMUTABLE_DATA,
GET_STORAGE,
HASH_KECCAK_256,