Skip to content

Commit

Permalink
Add missing brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov committed Jan 3, 2025
1 parent a539040 commit 4310bca
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
32 changes: 16 additions & 16 deletions system-contracts/contracts/EvmEmulator.yul
Original file line number Diff line number Diff line change
Expand Up @@ -1172,10 +1172,10 @@ object "EvmEmulator" {
pushEvmFrame(gasForTheCall, false)

// move needed memory slots to the scratch space
mstore(mul(10, 32), mload(sub(offset, 0x80))
mstore(mul(11, 32), mload(sub(offset, 0x60))
mstore(mul(12, 32), mload(sub(offset, 0x40))
mstore(mul(13, 32), mload(sub(offset, 0x20))
mstore(mul(10, 32), mload(sub(offset, 0x80)))
mstore(mul(11, 32), mload(sub(offset, 0x60)))
mstore(mul(12, 32), mload(sub(offset, 0x40)))
mstore(mul(13, 32), mload(sub(offset, 0x20)))

// selector: function createEvmFromEmulator(address newAddress, bytes calldata _initCode)
mstore(sub(offset, 0x80), 0xe43cec64)
Expand All @@ -1186,10 +1186,10 @@ object "EvmEmulator" {
let result := performSystemCallForCreate(value, sub(offset, 0x64), add(size, 0x64))

// move memory slots back
mstore(sub(offset, 0x80), mload(mul(10, 32))
mstore(sub(offset, 0x60), mload(mul(11, 32))
mstore(sub(offset, 0x40), mload(mul(12, 32))
mstore(sub(offset, 0x20), mload(mul(13, 32))
mstore(sub(offset, 0x80), mload(mul(10, 32)))
mstore(sub(offset, 0x60), mload(mul(11, 32)))
mstore(sub(offset, 0x40), mload(mul(12, 32)))
mstore(sub(offset, 0x20), mload(mul(13, 32)))

let gasLeft
switch result
Expand Down Expand Up @@ -4098,10 +4098,10 @@ object "EvmEmulator" {
pushEvmFrame(gasForTheCall, false)

// move needed memory slots to the scratch space
mstore(mul(10, 32), mload(sub(offset, 0x80))
mstore(mul(11, 32), mload(sub(offset, 0x60))
mstore(mul(12, 32), mload(sub(offset, 0x40))
mstore(mul(13, 32), mload(sub(offset, 0x20))
mstore(mul(10, 32), mload(sub(offset, 0x80)))
mstore(mul(11, 32), mload(sub(offset, 0x60)))
mstore(mul(12, 32), mload(sub(offset, 0x40)))
mstore(mul(13, 32), mload(sub(offset, 0x20)))

// selector: function createEvmFromEmulator(address newAddress, bytes calldata _initCode)
mstore(sub(offset, 0x80), 0xe43cec64)
Expand All @@ -4112,10 +4112,10 @@ object "EvmEmulator" {
let result := performSystemCallForCreate(value, sub(offset, 0x64), add(size, 0x64))

// move memory slots back
mstore(sub(offset, 0x80), mload(mul(10, 32))
mstore(sub(offset, 0x60), mload(mul(11, 32))
mstore(sub(offset, 0x40), mload(mul(12, 32))
mstore(sub(offset, 0x20), mload(mul(13, 32))
mstore(sub(offset, 0x80), mload(mul(10, 32)))
mstore(sub(offset, 0x60), mload(mul(11, 32)))
mstore(sub(offset, 0x40), mload(mul(12, 32)))
mstore(sub(offset, 0x20), mload(mul(13, 32)))

let gasLeft
switch result
Expand Down
16 changes: 8 additions & 8 deletions system-contracts/evm-emulator/EvmEmulatorFunctions.template.yul
Original file line number Diff line number Diff line change
Expand Up @@ -1112,10 +1112,10 @@ function _executeCreate(offset, size, value, evmGasLeftOld, isCreate2, salt) ->
pushEvmFrame(gasForTheCall, false)

// move needed memory slots to the scratch space
mstore(mul(10, 32), mload(sub(offset, 0x80))
mstore(mul(11, 32), mload(sub(offset, 0x60))
mstore(mul(12, 32), mload(sub(offset, 0x40))
mstore(mul(13, 32), mload(sub(offset, 0x20))
mstore(mul(10, 32), mload(sub(offset, 0x80)))
mstore(mul(11, 32), mload(sub(offset, 0x60)))
mstore(mul(12, 32), mload(sub(offset, 0x40)))
mstore(mul(13, 32), mload(sub(offset, 0x20)))

// selector: function createEvmFromEmulator(address newAddress, bytes calldata _initCode)
mstore(sub(offset, 0x80), 0xe43cec64)
Expand All @@ -1126,10 +1126,10 @@ function _executeCreate(offset, size, value, evmGasLeftOld, isCreate2, salt) ->
let result := performSystemCallForCreate(value, sub(offset, 0x64), add(size, 0x64))

// move memory slots back
mstore(sub(offset, 0x80), mload(mul(10, 32))
mstore(sub(offset, 0x60), mload(mul(11, 32))
mstore(sub(offset, 0x40), mload(mul(12, 32))
mstore(sub(offset, 0x20), mload(mul(13, 32))
mstore(sub(offset, 0x80), mload(mul(10, 32)))
mstore(sub(offset, 0x60), mload(mul(11, 32)))
mstore(sub(offset, 0x40), mload(mul(12, 32)))
mstore(sub(offset, 0x20), mload(mul(13, 32)))

let gasLeft
switch result
Expand Down

0 comments on commit 4310bca

Please sign in to comment.