Skip to content

Commit

Permalink
fix(EVM): Use static call for isSlotWarm (L-07) (#1167)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov authored Dec 30, 2024
1 parent 8349c91 commit f2677bf
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 f2677bf

Please sign in to comment.