-
Notifications
You must be signed in to change notification settings - Fork 150
Gas profiling swaps #128
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
base: main
Are you sure you want to change the base?
Gas profiling swaps #128
Conversation
🟡 Heimdall Review Status
|
| FreshCryptoLib/=lib/webauthn-sol/lib/FreshCryptoLib/solidity/src/ | ||
| account-abstraction/=lib/account-abstraction/contracts/ | ||
| ds-test/=lib/p256-verifier/lib/forge-std/lib/ds-test/src/ | ||
| ds-test/=lib/v4-core/lib/forge-std/lib/ds-test/src/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these ds-test thrashes are weird but i'll trust what's here if it builds
| @@ -1,5 +1,5 @@ | |||
| // SPDX-License-Identifier: MIT | |||
| pragma solidity 0.8.23; | |||
| pragma solidity ^0.8.0; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't change any CoinbaseSmartWallet source code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uniswap v4 requires solidity > v0.8.26
| PoolModifyLiquidityTest modifyLiquidityRouter; | ||
| PoolKey poolKey; | ||
|
|
||
| uint160 constant SQRT_PRICE_1_1 = 79228162514264337593543950336; // sqrt(1) * 2^96 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is actually used anywhere
test/gas/EndToEnd.t.sol
Outdated
|
|
||
| // Initialize pool with 1:1000000 price ratio (accounting for USDC 6 decimals vs WETH 18 decimals) | ||
| // sqrtPriceX96 = sqrt(10^12) * 2^96 for USDC/WETH decimal adjustment | ||
| uint160 sqrtPriceX96 = 79228162514264337593543950336 * 1e6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, use named variable here
Used uniswapv4 to create liquidity swaps for gas profiling. Tests ran using
FOUNDRY_PROFILE=deployto simulate real-world gas costs