Skip to content

Commit

Permalink
⚡ Smol Optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
z0r0z committed Feb 13, 2024
1 parent 4b0b97c commit 9c5b95f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ IETest:testBalanceInETH() (gas: 53716)
IETest:testCommandSendERC0() (gas: 114380)
IETest:testCommandSendETH() (gas: 80852)
IETest:testCommandSendUSDC() (gas: 147088)
IETest:testCommandSwapDAI() (gas: 101821)
IETest:testCommandSwapUSDC() (gas: 156812)
IETest:testDeploy() (gas: 2133114)
IETest:testCommandSwapDAI() (gas: 101806)
IETest:testCommandSwapUSDC() (gas: 156797)
IETest:testDeploy() (gas: 2132114)
IETest:testENSNameFromENSHelper() (gas: 29103)
IETest:testENSNameOwnership() (gas: 109220)
IETest:testIENameSetting() (gas: 8187)
Expand Down
4 changes: 2 additions & 2 deletions src/IE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ contract IE {
address tokenIn;
address payer;
assembly ("memory-safe") {
isETH := eq(byte(0, calldataload(data.offset)), 0x01)
zeroForOne := eq(byte(0, calldataload(add(data.offset, 1))), 0x01)
isETH := byte(0, calldataload(data.offset))
zeroForOne := byte(0, calldataload(add(data.offset, 1)))
tokenIn := shr(96, calldataload(add(data.offset, 2)))
payer := shr(96, calldataload(add(data.offset, 22)))
}
Expand Down

0 comments on commit 9c5b95f

Please sign in to comment.