Skip to content

Commit

Permalink
Use static call for isSlotWarm
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov committed Dec 30, 2024
1 parent f9824ea commit 0184065
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions system-contracts/contracts/EvmEmulator.yul
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,7 @@ object "EvmEmulator" {
// non-standard selector 0x01
mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000)
mstore(1, key)
// should be call since we use TSTORE in gas manager
let success := call(gas(), EVM_GAS_MANAGER_CONTRACT(), 0, 0, 33, 0, 0)
let success := staticcall(gas(), EVM_GAS_MANAGER_CONTRACT(), 0, 33, 0, 0)

if iszero(success) {
// This error should never happen
Expand Down Expand Up @@ -3746,8 +3745,7 @@ object "EvmEmulator" {
// non-standard selector 0x01
mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000)
mstore(1, key)
// should be call since we use TSTORE in gas manager
let success := call(gas(), EVM_GAS_MANAGER_CONTRACT(), 0, 0, 33, 0, 0)
let success := staticcall(gas(), EVM_GAS_MANAGER_CONTRACT(), 0, 33, 0, 0)

if iszero(success) {
// This error should never happen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,7 @@ function isSlotWarm(key) -> isWarm {
// non-standard selector 0x01
mstore(0, 0x0100000000000000000000000000000000000000000000000000000000000000)
mstore(1, key)
// should be call since we use TSTORE in gas manager
let success := call(gas(), EVM_GAS_MANAGER_CONTRACT(), 0, 0, 33, 0, 0)
let success := staticcall(gas(), EVM_GAS_MANAGER_CONTRACT(), 0, 33, 0, 0)

if iszero(success) {
// This error should never happen
Expand Down

0 comments on commit 0184065

Please sign in to comment.