Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(EVM): Use static call for isSlotWarm (L-07) #1167

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading