├── .env ├── .forge-snapshots ├── BitMathLeastSignificantBitMaxUint128.snap ├── BitMathLeastSignificantBitMaxUint256.snap ├── BitMathLeastSignificantBitSmallNumber.snap ├── BitMathMostSignificantBitMaxUint128.snap ├── BitMathMostSignificantBitMaxUint256.snap ├── BitMathMostSignificantBitSmallNumber.snap ├── ERC6909Claims approve.snap ├── ERC6909Claims burn.snap ├── ERC6909Claims mint.snap ├── ERC6909Claims transfer.snap ├── ERC6909Claims transferFrom as operator.snap ├── ERC6909Claims transferFrom with approval.snap ├── ERC6909Claims transferFrom with infinite approval.snap ├── NoDelegateCall.snap ├── SwapMath_oneForZero_exactInCapped.snap ├── SwapMath_oneForZero_exactInPartial.snap ├── SwapMath_oneForZero_exactOutCapped.snap ├── SwapMath_oneForZero_exactOutPartial.snap ├── SwapMath_zeroForOne_exactInCapped.snap ├── SwapMath_zeroForOne_exactInPartial.snap ├── SwapMath_zeroForOne_exactOutCapped.snap ├── SwapMath_zeroForOne_exactOutPartial.snap ├── TickMathGetSqrtPriceAtTick.snap ├── TickMathGetTickAtSqrtPrice.snap ├── add liquidity to already existing position with salt.snap ├── addLiquidity CA fee.snap ├── addLiquidity with empty hook.snap ├── addLiquidity with native token.snap ├── create new liquidity to a position with salt.snap ├── donate gas with 1 token.snap ├── donate gas with 2 tokens.snap ├── erc20 collect protocol fees.snap ├── extsload getFeeGrowthGlobals.snap ├── extsload getFeeGrowthInside.snap ├── extsload getLiquidity.snap ├── extsload getPositionInfo.snap ├── extsload getPositionLiquidity.snap ├── extsload getSlot0.snap ├── extsload getTickBitmap.snap ├── extsload getTickFeeGrowthOutside.snap ├── extsload getTickInfo.snap ├── extsload getTickLiquidity.snap ├── flipTick_flippingATickThatResultsInDeletingAWord.snap ├── flipTick_flippingFirstTickInWordToInitialized.snap ├── flipTick_flippingSecondTickInWordToInitialized.snap ├── getAmount0Delta_gasCostForAmount0WhereRoundUpIsFalse.snap ├── getAmount0Delta_gasCostForAmount0WhereRoundUpIsTrue.snap ├── getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse.snap ├── getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue.snap ├── getNextSqrtPriceFromInput_zeroForOneEqualsFalseGas.snap ├── getNextSqrtPriceFromInput_zeroForOneEqualsTrueGas.snap ├── getNextSqrtPriceFromOutput_zeroForOneEqualsFalseGas.snap ├── getNextSqrtPriceFromOutput_zeroForOneEqualsTrueGas.snap ├── getReserves.snap ├── initialize.snap ├── native collect protocol fees.snap ├── nextInitializedTickWithinOneWord_lteFalse_forEntireWord.snap ├── nextInitializedTickWithinOneWord_lteFalse_justBelowBoundary.snap ├── nextInitializedTickWithinOneWord_lteFalse_onBoundary.snap ├── nextInitializedTickWithinOneWord_lteTrue_forEntireWord.snap ├── nextInitializedTickWithinOneWord_lteTrue_justBelowBoundary.snap ├── nextInitializedTickWithinOneWord_lteTrue_onBoundary_gas.snap ├── poolManager bytecode size.snap ├── removeLiquidity CA fee.snap ├── removeLiquidity with empty hook.snap ├── removeLiquidity with native token.snap ├── set protocol fee.snap ├── simple addLiquidity second addition same range.snap ├── simple addLiquidity.snap ├── simple removeLiquidity some liquidity remains.snap ├── simple removeLiquidity.snap ├── simple swap with native.snap ├── simple swap.snap ├── sparse external sload.snap ├── swap CA custom curve + swap noop.snap ├── swap CA fee on unspecified.snap ├── swap against liquidity with native token.snap ├── swap against liquidity.snap ├── swap burn 6909 for input.snap ├── swap burn native 6909 for input.snap ├── swap mint native output as 6909.snap ├── swap mint output as 6909.snap ├── swap skips hook call if hook is caller.snap ├── swap with dynamic fee.snap ├── swap with hooks.snap ├── swap with lp fee and protocol fee.snap ├── swap with return dynamic fee.snap ├── tickSpacingToMaxLiquidityPerTick_gasCost60TickSpacing.snap ├── tickSpacingToMaxLiquidityPerTick_gasCostMaxTickSpacing.snap ├── tickSpacingToMaxLiquidityPerTick_gasCostMinTickSpacing.snap └── update dynamic fee in before swap.snap ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── BUG_REPORT.yml │ └── FEATURE_IMPROVEMENT.yml ├── pull_request_template.md └── workflows │ ├── coverage.yml │ ├── lint.yml │ ├── mythx.yml │ ├── semgrep.yml │ ├── tests-merge.yml │ └── tests-pr.yml ├── .gitignore ├── .gitmodules ├── .prettierignore ├── .prettierrc ├── .solhint.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docs ├── latex │ ├── main-zh.tex │ ├── main.bib │ └── main.tex ├── whitepaper-v4.pdf └── whitepaper-zh.pdf ├── echidna.config.yml ├── foundry.toml ├── justfile ├── remappings.txt ├── src ├── ERC6909.sol ├── ERC6909Claims.sol ├── Extsload.sol ├── Exttload.sol ├── NoDelegateCall.sol ├── PoolManager.sol ├── ProtocolFees.sol ├── interfaces │ ├── IExtsload.sol │ ├── IExttload.sol │ ├── IHooks.sol │ ├── IPoolManager.sol │ ├── IProtocolFeeController.sol │ ├── IProtocolFees.sol │ ├── callback │ │ └── IUnlockCallback.sol │ └── external │ │ ├── IERC20Minimal.sol │ │ └── IERC6909Claims.sol ├── libraries │ ├── BitMath.sol │ ├── CurrencyDelta.sol │ ├── CustomRevert.sol │ ├── FixedPoint128.sol │ ├── FixedPoint96.sol │ ├── FullMath.sol │ ├── Hooks.sol │ ├── LPFeeLibrary.sol │ ├── LiquidityMath.sol │ ├── Lock.sol │ ├── NonZeroDeltaCount.sol │ ├── ParseBytes.sol │ ├── Pool.sol │ ├── Position.sol │ ├── ProtocolFeeLibrary.sol │ ├── Reserves.sol │ ├── SafeCast.sol │ ├── SqrtPriceMath.sol │ ├── StateLibrary.sol │ ├── SwapMath.sol │ ├── TickBitmap.sol │ ├── TickMath.sol │ ├── TransientStateLibrary.sol │ └── UnsafeMath.sol ├── test │ ├── ActionsRouter.sol │ ├── BaseTestHooks.sol │ ├── CurrencyTest.sol │ ├── CustomCurveHook.sol │ ├── DeltaReturningHook.sol │ ├── DynamicFeesTestHook.sol │ ├── DynamicReturnFeeTestHook.sol │ ├── EmptyRevertHook.sol │ ├── EmptyTestHooks.sol │ ├── FeeTakingHook.sol │ ├── Fuzzers.sol │ ├── HooksTest.sol │ ├── LiquidityMathTest.sol │ ├── MockContract.sol │ ├── MockERC6909Claims.sol │ ├── MockHooks.sol │ ├── NoDelegateCallTest.sol │ ├── PoolClaimsTest.sol │ ├── PoolDonateTest.sol │ ├── PoolEmptyUnlockTest.sol │ ├── PoolModifyLiquidityTest.sol │ ├── PoolModifyLiquidityTestNoChecks.sol │ ├── PoolNestedActionsTest.sol │ ├── PoolSettleTest.sol │ ├── PoolSwapTest.sol │ ├── PoolTakeTest.sol │ ├── PoolTestBase.sol │ ├── ProtocolFeeControllerTest.sol │ ├── ProtocolFeesImplementation.sol │ ├── SkipCallsTestHook.sol │ ├── SqrtPriceMathEchidnaTest.sol │ ├── SwapRouterNoChecks.sol │ ├── TestERC20.sol │ ├── TestInvalidERC20.sol │ ├── TickMathEchidnaTest.sol │ ├── TickMathTest.sol │ └── TickOverflowSafetyEchidnaTest.sol └── types │ ├── BalanceDelta.sol │ ├── BeforeSwapDelta.sol │ ├── Currency.sol │ ├── PoolId.sol │ ├── PoolKey.sol │ └── Slot0.sol └── test ├── CustomAccounting.t.sol ├── DynamicFees.t.sol ├── DynamicReturnFees.t.sol ├── ERC6909Claims.t.sol ├── Extsload.t.sol ├── ModifyLiquidity.t.sol ├── NoDelegateCall.t.sol ├── PoolManager.gas.spec.ts ├── PoolManager.swap.t.sol ├── PoolManager.t.sol ├── PoolManagerInitialize.t.sol ├── ProtocolFeesImplementation.t.sol ├── Reserves.t.sol ├── SkipCallsTestHook.t.sol ├── Sync.t.sol ├── Tick.t.sol ├── bin └── v3Factory.bytecode ├── js-scripts ├── build.js ├── dist │ ├── getModifyLiquidityResult.js │ ├── getSqrtPriceAtTick.js │ └── getTickAtSqrtPrice.js ├── package-lock.json ├── package.json ├── src │ ├── getModifyLiquidityResult.ts │ ├── getSqrtPriceAtTick.ts │ ├── getTickAtSqrtPrice.ts │ └── utils │ │ └── shared.ts └── tsconfig.json ├── libraries ├── BitMath.t.sol ├── FullMath.t.sol ├── Hooks.t.sol ├── LPFeeLibrary.t.sol ├── LiquidityMath.t.sol ├── Lock.t.sol ├── NonZeroDeltaCount.t.sol ├── Pool.t.sol ├── PoolId.t.sol ├── Position.t.sol ├── ProtocolFeeLibrary.t.sol ├── SafeCast.t.sol ├── SqrtPriceMath.t.sol ├── StateLibrary.t.sol ├── SwapMath.t.sol ├── TickBitmap.t.sol ├── TickMath.t.sol └── UnsafeMath.t.sol ├── types ├── BalanceDelta.t.sol ├── Currency.t.sol └── Slot0.t.sol └── utils ├── AmountHelpers.sol ├── Constants.sol ├── CurrencySettler.sol ├── Deployers.sol ├── JavascriptFfi.sol ├── LiquidityAmounts.sol ├── Logger.sol ├── NestedActions.t.sol ├── SortTokens.sol ├── SwapHelper.t.sol └── V3Helper.sol /.env: -------------------------------------------------------------------------------- 1 | FOUNDRY_FUZZ_SEED=0x4444 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathLeastSignificantBitMaxUint128.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathLeastSignificantBitMaxUint256.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathLeastSignificantBitSmallNumber.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathMostSignificantBitMaxUint128.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathMostSignificantBitMaxUint256.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/BitMathMostSignificantBitSmallNumber.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/ERC6909Claims approve.snap: -------------------------------------------------------------------------------- 1 | 46323 -------------------------------------------------------------------------------- /.forge-snapshots/ERC6909Claims burn.snap: -------------------------------------------------------------------------------- 1 | 29389 -------------------------------------------------------------------------------- /.forge-snapshots/ERC6909Claims mint.snap: -------------------------------------------------------------------------------- 1 | 46603 -------------------------------------------------------------------------------- /.forge-snapshots/ERC6909Claims transfer.snap: -------------------------------------------------------------------------------- 1 | 51756 -------------------------------------------------------------------------------- /.forge-snapshots/ERC6909Claims transferFrom as operator.snap: -------------------------------------------------------------------------------- 1 | 54437 -------------------------------------------------------------------------------- /.forge-snapshots/ERC6909Claims transferFrom with approval.snap: -------------------------------------------------------------------------------- 1 | 59939 -------------------------------------------------------------------------------- /.forge-snapshots/ERC6909Claims transferFrom with infinite approval.snap: -------------------------------------------------------------------------------- 1 | 56770 -------------------------------------------------------------------------------- /.forge-snapshots/NoDelegateCall.snap: -------------------------------------------------------------------------------- 1 | 51 -------------------------------------------------------------------------------- /.forge-snapshots/SwapMath_oneForZero_exactInCapped.snap: -------------------------------------------------------------------------------- 1 | 1157 -------------------------------------------------------------------------------- /.forge-snapshots/SwapMath_oneForZero_exactInPartial.snap: -------------------------------------------------------------------------------- 1 | 1392 -------------------------------------------------------------------------------- /.forge-snapshots/SwapMath_oneForZero_exactOutCapped.snap: -------------------------------------------------------------------------------- 1 | 951 -------------------------------------------------------------------------------- /.forge-snapshots/SwapMath_oneForZero_exactOutPartial.snap: -------------------------------------------------------------------------------- 1 | 1506 -------------------------------------------------------------------------------- /.forge-snapshots/SwapMath_zeroForOne_exactInCapped.snap: -------------------------------------------------------------------------------- 1 | 1118 -------------------------------------------------------------------------------- /.forge-snapshots/SwapMath_zeroForOne_exactInPartial.snap: -------------------------------------------------------------------------------- 1 | 1832 -------------------------------------------------------------------------------- /.forge-snapshots/SwapMath_zeroForOne_exactOutCapped.snap: -------------------------------------------------------------------------------- 1 | 914 -------------------------------------------------------------------------------- /.forge-snapshots/SwapMath_zeroForOne_exactOutPartial.snap: -------------------------------------------------------------------------------- 1 | 1119 -------------------------------------------------------------------------------- /.forge-snapshots/TickMathGetSqrtPriceAtTick.snap: -------------------------------------------------------------------------------- 1 | 70953 -------------------------------------------------------------------------------- /.forge-snapshots/TickMathGetTickAtSqrtPrice.snap: -------------------------------------------------------------------------------- 1 | 197704 -------------------------------------------------------------------------------- /.forge-snapshots/add liquidity to already existing position with salt.snap: -------------------------------------------------------------------------------- 1 | 146557 -------------------------------------------------------------------------------- /.forge-snapshots/addLiquidity CA fee.snap: -------------------------------------------------------------------------------- 1 | 172605 -------------------------------------------------------------------------------- /.forge-snapshots/addLiquidity with empty hook.snap: -------------------------------------------------------------------------------- 1 | 275714 -------------------------------------------------------------------------------- /.forge-snapshots/addLiquidity with native token.snap: -------------------------------------------------------------------------------- 1 | 136837 -------------------------------------------------------------------------------- /.forge-snapshots/create new liquidity to a position with salt.snap: -------------------------------------------------------------------------------- 1 | 294762 -------------------------------------------------------------------------------- /.forge-snapshots/donate gas with 1 token.snap: -------------------------------------------------------------------------------- 1 | 104674 -------------------------------------------------------------------------------- /.forge-snapshots/donate gas with 2 tokens.snap: -------------------------------------------------------------------------------- 1 | 144554 -------------------------------------------------------------------------------- /.forge-snapshots/erc20 collect protocol fees.snap: -------------------------------------------------------------------------------- 1 | 57224 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getFeeGrowthGlobals.snap: -------------------------------------------------------------------------------- 1 | 704 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getFeeGrowthInside.snap: -------------------------------------------------------------------------------- 1 | 375 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getLiquidity.snap: -------------------------------------------------------------------------------- 1 | 375 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getPositionInfo.snap: -------------------------------------------------------------------------------- 1 | 874 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getPositionLiquidity.snap: -------------------------------------------------------------------------------- 1 | 375 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getSlot0.snap: -------------------------------------------------------------------------------- 1 | 375 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getTickBitmap.snap: -------------------------------------------------------------------------------- 1 | 375 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getTickFeeGrowthOutside.snap: -------------------------------------------------------------------------------- 1 | 704 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getTickInfo.snap: -------------------------------------------------------------------------------- 1 | 874 -------------------------------------------------------------------------------- /.forge-snapshots/extsload getTickLiquidity.snap: -------------------------------------------------------------------------------- 1 | 375 -------------------------------------------------------------------------------- /.forge-snapshots/flipTick_flippingATickThatResultsInDeletingAWord.snap: -------------------------------------------------------------------------------- 1 | 5113 -------------------------------------------------------------------------------- /.forge-snapshots/flipTick_flippingFirstTickInWordToInitialized.snap: -------------------------------------------------------------------------------- 1 | 22213 -------------------------------------------------------------------------------- /.forge-snapshots/flipTick_flippingSecondTickInWordToInitialized.snap: -------------------------------------------------------------------------------- 1 | 5174 -------------------------------------------------------------------------------- /.forge-snapshots/getAmount0Delta_gasCostForAmount0WhereRoundUpIsFalse.snap: -------------------------------------------------------------------------------- 1 | 247 -------------------------------------------------------------------------------- /.forge-snapshots/getAmount0Delta_gasCostForAmount0WhereRoundUpIsTrue.snap: -------------------------------------------------------------------------------- 1 | 364 -------------------------------------------------------------------------------- /.forge-snapshots/getAmount1Delta_gasCostForAmount1WhereRoundUpIsFalse.snap: -------------------------------------------------------------------------------- 1 | 198 -------------------------------------------------------------------------------- /.forge-snapshots/getAmount1Delta_gasCostForAmount1WhereRoundUpIsTrue.snap: -------------------------------------------------------------------------------- 1 | 198 -------------------------------------------------------------------------------- /.forge-snapshots/getNextSqrtPriceFromInput_zeroForOneEqualsFalseGas.snap: -------------------------------------------------------------------------------- 1 | 320 -------------------------------------------------------------------------------- /.forge-snapshots/getNextSqrtPriceFromInput_zeroForOneEqualsTrueGas.snap: -------------------------------------------------------------------------------- 1 | 543 -------------------------------------------------------------------------------- /.forge-snapshots/getNextSqrtPriceFromOutput_zeroForOneEqualsFalseGas.snap: -------------------------------------------------------------------------------- 1 | 542 -------------------------------------------------------------------------------- /.forge-snapshots/getNextSqrtPriceFromOutput_zeroForOneEqualsTrueGas.snap: -------------------------------------------------------------------------------- 1 | 209 -------------------------------------------------------------------------------- /.forge-snapshots/getReserves.snap: -------------------------------------------------------------------------------- 1 | 1552 -------------------------------------------------------------------------------- /.forge-snapshots/initialize.snap: -------------------------------------------------------------------------------- 1 | 59576 -------------------------------------------------------------------------------- /.forge-snapshots/native collect protocol fees.snap: -------------------------------------------------------------------------------- 1 | 59588 -------------------------------------------------------------------------------- /.forge-snapshots/nextInitializedTickWithinOneWord_lteFalse_forEntireWord.snap: -------------------------------------------------------------------------------- 1 | 2270 -------------------------------------------------------------------------------- /.forge-snapshots/nextInitializedTickWithinOneWord_lteFalse_justBelowBoundary.snap: -------------------------------------------------------------------------------- 1 | 2278 -------------------------------------------------------------------------------- /.forge-snapshots/nextInitializedTickWithinOneWord_lteFalse_onBoundary.snap: -------------------------------------------------------------------------------- 1 | 2285 -------------------------------------------------------------------------------- /.forge-snapshots/nextInitializedTickWithinOneWord_lteTrue_forEntireWord.snap: -------------------------------------------------------------------------------- 1 | 2262 -------------------------------------------------------------------------------- /.forge-snapshots/nextInitializedTickWithinOneWord_lteTrue_justBelowBoundary.snap: -------------------------------------------------------------------------------- 1 | 2615 -------------------------------------------------------------------------------- /.forge-snapshots/nextInitializedTickWithinOneWord_lteTrue_onBoundary_gas.snap: -------------------------------------------------------------------------------- 1 | 2291 -------------------------------------------------------------------------------- /.forge-snapshots/poolManager bytecode size.snap: -------------------------------------------------------------------------------- 1 | 23805 -------------------------------------------------------------------------------- /.forge-snapshots/removeLiquidity CA fee.snap: -------------------------------------------------------------------------------- 1 | 142125 -------------------------------------------------------------------------------- /.forge-snapshots/removeLiquidity with empty hook.snap: -------------------------------------------------------------------------------- 1 | 131597 -------------------------------------------------------------------------------- /.forge-snapshots/removeLiquidity with native token.snap: -------------------------------------------------------------------------------- 1 | 113398 -------------------------------------------------------------------------------- /.forge-snapshots/set protocol fee.snap: -------------------------------------------------------------------------------- 1 | 31702 -------------------------------------------------------------------------------- /.forge-snapshots/simple addLiquidity second addition same range.snap: -------------------------------------------------------------------------------- 1 | 98747 -------------------------------------------------------------------------------- /.forge-snapshots/simple addLiquidity.snap: -------------------------------------------------------------------------------- 1 | 161227 -------------------------------------------------------------------------------- /.forge-snapshots/simple removeLiquidity some liquidity remains.snap: -------------------------------------------------------------------------------- 1 | 92503 -------------------------------------------------------------------------------- /.forge-snapshots/simple removeLiquidity.snap: -------------------------------------------------------------------------------- 1 | 84560 -------------------------------------------------------------------------------- /.forge-snapshots/simple swap with native.snap: -------------------------------------------------------------------------------- 1 | 109712 -------------------------------------------------------------------------------- /.forge-snapshots/simple swap.snap: -------------------------------------------------------------------------------- 1 | 124538 -------------------------------------------------------------------------------- /.forge-snapshots/sparse external sload.snap: -------------------------------------------------------------------------------- 1 | 2057 -------------------------------------------------------------------------------- /.forge-snapshots/swap CA custom curve + swap noop.snap: -------------------------------------------------------------------------------- 1 | 127257 -------------------------------------------------------------------------------- /.forge-snapshots/swap CA fee on unspecified.snap: -------------------------------------------------------------------------------- 1 | 155691 -------------------------------------------------------------------------------- /.forge-snapshots/swap against liquidity with native token.snap: -------------------------------------------------------------------------------- 1 | 106660 -------------------------------------------------------------------------------- /.forge-snapshots/swap against liquidity.snap: -------------------------------------------------------------------------------- 1 | 117746 -------------------------------------------------------------------------------- /.forge-snapshots/swap burn 6909 for input.snap: -------------------------------------------------------------------------------- 1 | 129595 -------------------------------------------------------------------------------- /.forge-snapshots/swap burn native 6909 for input.snap: -------------------------------------------------------------------------------- 1 | 118816 -------------------------------------------------------------------------------- /.forge-snapshots/swap mint native output as 6909.snap: -------------------------------------------------------------------------------- 1 | 140629 -------------------------------------------------------------------------------- /.forge-snapshots/swap mint output as 6909.snap: -------------------------------------------------------------------------------- 1 | 156433 -------------------------------------------------------------------------------- /.forge-snapshots/swap skips hook call if hook is caller.snap: -------------------------------------------------------------------------------- 1 | 208496 -------------------------------------------------------------------------------- /.forge-snapshots/swap with dynamic fee.snap: -------------------------------------------------------------------------------- 1 | 140527 -------------------------------------------------------------------------------- /.forge-snapshots/swap with hooks.snap: -------------------------------------------------------------------------------- 1 | 133197 -------------------------------------------------------------------------------- /.forge-snapshots/swap with lp fee and protocol fee.snap: -------------------------------------------------------------------------------- 1 | 170330 -------------------------------------------------------------------------------- /.forge-snapshots/swap with return dynamic fee.snap: -------------------------------------------------------------------------------- 1 | 146758 -------------------------------------------------------------------------------- /.forge-snapshots/tickSpacingToMaxLiquidityPerTick_gasCost60TickSpacing.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/tickSpacingToMaxLiquidityPerTick_gasCostMaxTickSpacing.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/tickSpacingToMaxLiquidityPerTick_gasCostMinTickSpacing.snap: -------------------------------------------------------------------------------- 1 | 29 -------------------------------------------------------------------------------- /.forge-snapshots/update dynamic fee in before swap.snap: -------------------------------------------------------------------------------- 1 | 149016 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/BUG_REPORT.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/ISSUE_TEMPLATE/BUG_REPORT.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/FEATURE_IMPROVEMENT.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/ISSUE_TEMPLATE/FEATURE_IMPROVEMENT.yml -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/pull_request_template.md -------------------------------------------------------------------------------- /.github/workflows/coverage.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/workflows/coverage.yml -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/workflows/lint.yml -------------------------------------------------------------------------------- /.github/workflows/mythx.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/workflows/mythx.yml -------------------------------------------------------------------------------- /.github/workflows/semgrep.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/workflows/semgrep.yml -------------------------------------------------------------------------------- /.github/workflows/tests-merge.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/workflows/tests-merge.yml -------------------------------------------------------------------------------- /.github/workflows/tests-pr.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.github/workflows/tests-pr.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.gitmodules -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .prettierrc 2 | foundry.toml 3 | out 4 | lib/ 5 | cache/ 6 | *.sol 7 | dist/ -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.prettierrc -------------------------------------------------------------------------------- /.solhint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/.solhint.json -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/README.md -------------------------------------------------------------------------------- /docs/latex/main-zh.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/docs/latex/main-zh.tex -------------------------------------------------------------------------------- /docs/latex/main.bib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/docs/latex/main.bib -------------------------------------------------------------------------------- /docs/latex/main.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/docs/latex/main.tex -------------------------------------------------------------------------------- /docs/whitepaper-v4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/docs/whitepaper-v4.pdf -------------------------------------------------------------------------------- /docs/whitepaper-zh.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/docs/whitepaper-zh.pdf -------------------------------------------------------------------------------- /echidna.config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/echidna.config.yml -------------------------------------------------------------------------------- /foundry.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/foundry.toml -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/justfile -------------------------------------------------------------------------------- /remappings.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/remappings.txt -------------------------------------------------------------------------------- /src/ERC6909.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/ERC6909.sol -------------------------------------------------------------------------------- /src/ERC6909Claims.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/ERC6909Claims.sol -------------------------------------------------------------------------------- /src/Extsload.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/Extsload.sol -------------------------------------------------------------------------------- /src/Exttload.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/Exttload.sol -------------------------------------------------------------------------------- /src/NoDelegateCall.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/NoDelegateCall.sol -------------------------------------------------------------------------------- /src/PoolManager.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/PoolManager.sol -------------------------------------------------------------------------------- /src/ProtocolFees.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/ProtocolFees.sol -------------------------------------------------------------------------------- /src/interfaces/IExtsload.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/IExtsload.sol -------------------------------------------------------------------------------- /src/interfaces/IExttload.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/IExttload.sol -------------------------------------------------------------------------------- /src/interfaces/IHooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/IHooks.sol -------------------------------------------------------------------------------- /src/interfaces/IPoolManager.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/IPoolManager.sol -------------------------------------------------------------------------------- /src/interfaces/IProtocolFeeController.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/IProtocolFeeController.sol -------------------------------------------------------------------------------- /src/interfaces/IProtocolFees.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/IProtocolFees.sol -------------------------------------------------------------------------------- /src/interfaces/callback/IUnlockCallback.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/callback/IUnlockCallback.sol -------------------------------------------------------------------------------- /src/interfaces/external/IERC20Minimal.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/external/IERC20Minimal.sol -------------------------------------------------------------------------------- /src/interfaces/external/IERC6909Claims.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/interfaces/external/IERC6909Claims.sol -------------------------------------------------------------------------------- /src/libraries/BitMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/BitMath.sol -------------------------------------------------------------------------------- /src/libraries/CurrencyDelta.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/CurrencyDelta.sol -------------------------------------------------------------------------------- /src/libraries/CustomRevert.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/CustomRevert.sol -------------------------------------------------------------------------------- /src/libraries/FixedPoint128.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/FixedPoint128.sol -------------------------------------------------------------------------------- /src/libraries/FixedPoint96.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/FixedPoint96.sol -------------------------------------------------------------------------------- /src/libraries/FullMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/FullMath.sol -------------------------------------------------------------------------------- /src/libraries/Hooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/Hooks.sol -------------------------------------------------------------------------------- /src/libraries/LPFeeLibrary.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/LPFeeLibrary.sol -------------------------------------------------------------------------------- /src/libraries/LiquidityMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/LiquidityMath.sol -------------------------------------------------------------------------------- /src/libraries/Lock.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/Lock.sol -------------------------------------------------------------------------------- /src/libraries/NonZeroDeltaCount.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/NonZeroDeltaCount.sol -------------------------------------------------------------------------------- /src/libraries/ParseBytes.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/ParseBytes.sol -------------------------------------------------------------------------------- /src/libraries/Pool.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/Pool.sol -------------------------------------------------------------------------------- /src/libraries/Position.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/Position.sol -------------------------------------------------------------------------------- /src/libraries/ProtocolFeeLibrary.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/ProtocolFeeLibrary.sol -------------------------------------------------------------------------------- /src/libraries/Reserves.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/Reserves.sol -------------------------------------------------------------------------------- /src/libraries/SafeCast.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/SafeCast.sol -------------------------------------------------------------------------------- /src/libraries/SqrtPriceMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/SqrtPriceMath.sol -------------------------------------------------------------------------------- /src/libraries/StateLibrary.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/StateLibrary.sol -------------------------------------------------------------------------------- /src/libraries/SwapMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/SwapMath.sol -------------------------------------------------------------------------------- /src/libraries/TickBitmap.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/TickBitmap.sol -------------------------------------------------------------------------------- /src/libraries/TickMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/TickMath.sol -------------------------------------------------------------------------------- /src/libraries/TransientStateLibrary.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/TransientStateLibrary.sol -------------------------------------------------------------------------------- /src/libraries/UnsafeMath.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/libraries/UnsafeMath.sol -------------------------------------------------------------------------------- /src/test/ActionsRouter.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/ActionsRouter.sol -------------------------------------------------------------------------------- /src/test/BaseTestHooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/BaseTestHooks.sol -------------------------------------------------------------------------------- /src/test/CurrencyTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/CurrencyTest.sol -------------------------------------------------------------------------------- /src/test/CustomCurveHook.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/CustomCurveHook.sol -------------------------------------------------------------------------------- /src/test/DeltaReturningHook.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/DeltaReturningHook.sol -------------------------------------------------------------------------------- /src/test/DynamicFeesTestHook.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/DynamicFeesTestHook.sol -------------------------------------------------------------------------------- /src/test/DynamicReturnFeeTestHook.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/DynamicReturnFeeTestHook.sol -------------------------------------------------------------------------------- /src/test/EmptyRevertHook.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/EmptyRevertHook.sol -------------------------------------------------------------------------------- /src/test/EmptyTestHooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/EmptyTestHooks.sol -------------------------------------------------------------------------------- /src/test/FeeTakingHook.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/FeeTakingHook.sol -------------------------------------------------------------------------------- /src/test/Fuzzers.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/Fuzzers.sol -------------------------------------------------------------------------------- /src/test/HooksTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/HooksTest.sol -------------------------------------------------------------------------------- /src/test/LiquidityMathTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/LiquidityMathTest.sol -------------------------------------------------------------------------------- /src/test/MockContract.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/MockContract.sol -------------------------------------------------------------------------------- /src/test/MockERC6909Claims.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/MockERC6909Claims.sol -------------------------------------------------------------------------------- /src/test/MockHooks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/MockHooks.sol -------------------------------------------------------------------------------- /src/test/NoDelegateCallTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/NoDelegateCallTest.sol -------------------------------------------------------------------------------- /src/test/PoolClaimsTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolClaimsTest.sol -------------------------------------------------------------------------------- /src/test/PoolDonateTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolDonateTest.sol -------------------------------------------------------------------------------- /src/test/PoolEmptyUnlockTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolEmptyUnlockTest.sol -------------------------------------------------------------------------------- /src/test/PoolModifyLiquidityTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolModifyLiquidityTest.sol -------------------------------------------------------------------------------- /src/test/PoolModifyLiquidityTestNoChecks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolModifyLiquidityTestNoChecks.sol -------------------------------------------------------------------------------- /src/test/PoolNestedActionsTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolNestedActionsTest.sol -------------------------------------------------------------------------------- /src/test/PoolSettleTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolSettleTest.sol -------------------------------------------------------------------------------- /src/test/PoolSwapTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolSwapTest.sol -------------------------------------------------------------------------------- /src/test/PoolTakeTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolTakeTest.sol -------------------------------------------------------------------------------- /src/test/PoolTestBase.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/PoolTestBase.sol -------------------------------------------------------------------------------- /src/test/ProtocolFeeControllerTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/ProtocolFeeControllerTest.sol -------------------------------------------------------------------------------- /src/test/ProtocolFeesImplementation.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/ProtocolFeesImplementation.sol -------------------------------------------------------------------------------- /src/test/SkipCallsTestHook.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/SkipCallsTestHook.sol -------------------------------------------------------------------------------- /src/test/SqrtPriceMathEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/SqrtPriceMathEchidnaTest.sol -------------------------------------------------------------------------------- /src/test/SwapRouterNoChecks.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/SwapRouterNoChecks.sol -------------------------------------------------------------------------------- /src/test/TestERC20.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/TestERC20.sol -------------------------------------------------------------------------------- /src/test/TestInvalidERC20.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/TestInvalidERC20.sol -------------------------------------------------------------------------------- /src/test/TickMathEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/TickMathEchidnaTest.sol -------------------------------------------------------------------------------- /src/test/TickMathTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/TickMathTest.sol -------------------------------------------------------------------------------- /src/test/TickOverflowSafetyEchidnaTest.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/test/TickOverflowSafetyEchidnaTest.sol -------------------------------------------------------------------------------- /src/types/BalanceDelta.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/types/BalanceDelta.sol -------------------------------------------------------------------------------- /src/types/BeforeSwapDelta.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/types/BeforeSwapDelta.sol -------------------------------------------------------------------------------- /src/types/Currency.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/types/Currency.sol -------------------------------------------------------------------------------- /src/types/PoolId.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/types/PoolId.sol -------------------------------------------------------------------------------- /src/types/PoolKey.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/types/PoolKey.sol -------------------------------------------------------------------------------- /src/types/Slot0.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/src/types/Slot0.sol -------------------------------------------------------------------------------- /test/CustomAccounting.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/CustomAccounting.t.sol -------------------------------------------------------------------------------- /test/DynamicFees.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/DynamicFees.t.sol -------------------------------------------------------------------------------- /test/DynamicReturnFees.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/DynamicReturnFees.t.sol -------------------------------------------------------------------------------- /test/ERC6909Claims.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/ERC6909Claims.t.sol -------------------------------------------------------------------------------- /test/Extsload.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/Extsload.t.sol -------------------------------------------------------------------------------- /test/ModifyLiquidity.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/ModifyLiquidity.t.sol -------------------------------------------------------------------------------- /test/NoDelegateCall.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/NoDelegateCall.t.sol -------------------------------------------------------------------------------- /test/PoolManager.gas.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/PoolManager.gas.spec.ts -------------------------------------------------------------------------------- /test/PoolManager.swap.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/PoolManager.swap.t.sol -------------------------------------------------------------------------------- /test/PoolManager.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/PoolManager.t.sol -------------------------------------------------------------------------------- /test/PoolManagerInitialize.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/PoolManagerInitialize.t.sol -------------------------------------------------------------------------------- /test/ProtocolFeesImplementation.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/ProtocolFeesImplementation.t.sol -------------------------------------------------------------------------------- /test/Reserves.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/Reserves.t.sol -------------------------------------------------------------------------------- /test/SkipCallsTestHook.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/SkipCallsTestHook.t.sol -------------------------------------------------------------------------------- /test/Sync.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/Sync.t.sol -------------------------------------------------------------------------------- /test/Tick.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/Tick.t.sol -------------------------------------------------------------------------------- /test/bin/v3Factory.bytecode: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/bin/v3Factory.bytecode -------------------------------------------------------------------------------- /test/js-scripts/build.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/build.js -------------------------------------------------------------------------------- /test/js-scripts/dist/getModifyLiquidityResult.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/dist/getModifyLiquidityResult.js -------------------------------------------------------------------------------- /test/js-scripts/dist/getSqrtPriceAtTick.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/dist/getSqrtPriceAtTick.js -------------------------------------------------------------------------------- /test/js-scripts/dist/getTickAtSqrtPrice.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/dist/getTickAtSqrtPrice.js -------------------------------------------------------------------------------- /test/js-scripts/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/package-lock.json -------------------------------------------------------------------------------- /test/js-scripts/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/package.json -------------------------------------------------------------------------------- /test/js-scripts/src/getModifyLiquidityResult.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/src/getModifyLiquidityResult.ts -------------------------------------------------------------------------------- /test/js-scripts/src/getSqrtPriceAtTick.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/src/getSqrtPriceAtTick.ts -------------------------------------------------------------------------------- /test/js-scripts/src/getTickAtSqrtPrice.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/src/getTickAtSqrtPrice.ts -------------------------------------------------------------------------------- /test/js-scripts/src/utils/shared.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/src/utils/shared.ts -------------------------------------------------------------------------------- /test/js-scripts/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/js-scripts/tsconfig.json -------------------------------------------------------------------------------- /test/libraries/BitMath.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/BitMath.t.sol -------------------------------------------------------------------------------- /test/libraries/FullMath.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/FullMath.t.sol -------------------------------------------------------------------------------- /test/libraries/Hooks.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/Hooks.t.sol -------------------------------------------------------------------------------- /test/libraries/LPFeeLibrary.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/LPFeeLibrary.t.sol -------------------------------------------------------------------------------- /test/libraries/LiquidityMath.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/LiquidityMath.t.sol -------------------------------------------------------------------------------- /test/libraries/Lock.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/Lock.t.sol -------------------------------------------------------------------------------- /test/libraries/NonZeroDeltaCount.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/NonZeroDeltaCount.t.sol -------------------------------------------------------------------------------- /test/libraries/Pool.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/Pool.t.sol -------------------------------------------------------------------------------- /test/libraries/PoolId.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/PoolId.t.sol -------------------------------------------------------------------------------- /test/libraries/Position.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/Position.t.sol -------------------------------------------------------------------------------- /test/libraries/ProtocolFeeLibrary.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/ProtocolFeeLibrary.t.sol -------------------------------------------------------------------------------- /test/libraries/SafeCast.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/SafeCast.t.sol -------------------------------------------------------------------------------- /test/libraries/SqrtPriceMath.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/SqrtPriceMath.t.sol -------------------------------------------------------------------------------- /test/libraries/StateLibrary.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/StateLibrary.t.sol -------------------------------------------------------------------------------- /test/libraries/SwapMath.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/SwapMath.t.sol -------------------------------------------------------------------------------- /test/libraries/TickBitmap.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/TickBitmap.t.sol -------------------------------------------------------------------------------- /test/libraries/TickMath.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/TickMath.t.sol -------------------------------------------------------------------------------- /test/libraries/UnsafeMath.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/libraries/UnsafeMath.t.sol -------------------------------------------------------------------------------- /test/types/BalanceDelta.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/types/BalanceDelta.t.sol -------------------------------------------------------------------------------- /test/types/Currency.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/types/Currency.t.sol -------------------------------------------------------------------------------- /test/types/Slot0.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/types/Slot0.t.sol -------------------------------------------------------------------------------- /test/utils/AmountHelpers.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/AmountHelpers.sol -------------------------------------------------------------------------------- /test/utils/Constants.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/Constants.sol -------------------------------------------------------------------------------- /test/utils/CurrencySettler.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/CurrencySettler.sol -------------------------------------------------------------------------------- /test/utils/Deployers.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/Deployers.sol -------------------------------------------------------------------------------- /test/utils/JavascriptFfi.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/JavascriptFfi.sol -------------------------------------------------------------------------------- /test/utils/LiquidityAmounts.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/LiquidityAmounts.sol -------------------------------------------------------------------------------- /test/utils/Logger.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/Logger.sol -------------------------------------------------------------------------------- /test/utils/NestedActions.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/NestedActions.t.sol -------------------------------------------------------------------------------- /test/utils/SortTokens.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/SortTokens.sol -------------------------------------------------------------------------------- /test/utils/SwapHelper.t.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/SwapHelper.t.sol -------------------------------------------------------------------------------- /test/utils/V3Helper.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaGlimmer/Uniswap_V4/HEAD/test/utils/V3Helper.sol --------------------------------------------------------------------------------