Skip to content

Conversation

@shamit05
Copy link
Contributor

Used uniswapv4 to create liquidity swaps for gas profiling. Tests ran using FOUNDRY_PROFILE=deploy to simulate real-world gas costs

@cb-heimdall
Copy link
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

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/
Copy link
Contributor

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;
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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


// 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;
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants