Skip to content
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

feat: abstract router #86

Merged
merged 106 commits into from
Jun 28, 2024
Merged

feat: abstract router #86

merged 106 commits into from
Jun 28, 2024

Conversation

ConjunctiveNormalForm
Copy link
Member

Related Issue

Picked up @ewilz's router work https://github.com/Uniswap/v4-periphery/tree/routing

Description of changes

Base automatically changed from revert-quoter to main December 20, 2023 23:21
@hensha256 hensha256 changed the base branch from main to routing June 26, 2024 12:28
hensha256 and others added 3 commits June 26, 2024 14:03
* feat: Revert style quoter (#73)

* add PoolTicksCounter library

* quoter exact input single

* quoter test

* return deltas instead

* safe casting to correct types

* QuoteExactInput skeleton

* multiple entries

* break handleRevert by type

* quoteExactInput and unit tests

* more QuoteExactInput tests

* remove lgos

* remove commented out struct

* via-ir in ci

* remove unused imports/functions

* store iteration params locally instead of editing function input

* pull out sqrtPriceLimit to its own function

* PathKey to its own library

* rename initializedTicksCrossed to initializedTicksLoaded

* remove manual abi encoding in yul :p

* fix linter warnings for Quoter

* natspec for IQuoter

* feat: update v4-core

This commit updates v4 core to latest and fixes integration issues

* fix: tests

* style fixes

* inheritdoc

* ExactInSingleBatch

* fix: update tests

* fix: test router was borked

* exact out

* fix: alice comments

* fix ExactOutput

* add ExactOput unit tests

* add quoteExactOutputBatch

* remove solhint config

* remove newline

* add QuoteExactOutput in interface

* refactor lockAcquired

* move magic numbers to constants + doc

* add more natspec

* natspec

* named imports

* self-call branching

* remove old code

* remove console2 import

* refactor PathKeyLib

* amountOutCached

* inherit ILockCallback

* add base contracts and interfaces (#75)

* remove unused errors

* test lockAcquired reverts

* remove ...Batch interface

* REASON -> RESPONSE when valid

* complete natspec

* remove SwapInfo imports

* rename to SwapParameters

* move quoter structs into IQuoter interface

* update to latest core

* use prev values

* change twamm to use pool getters

* changes after merging main

* use --via-ir in cli

* fix formatting

* fix FullRange/TWAMM hook

* update ticks counter

* update Quoter test

* typo

* typo

* simplify handleRevertSingle

* merge QuoteInput/OutputSingle structs

* combine IQuoter structs

* using ... ordering

* update snapshots

* move amountOutCached into inner call

* using PathKeyLib for PathKey

* fix amountOutCached

* remove console2 import

* resurface revert reason

* clean up validateRevert

* update natsppec

* remove unused

---------

Co-authored-by: Mark Toda <toda.mark@gmail.com>
Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: Sara Reynolds <snreynolds2506@gmail.com>

* (Quoter) Avoid IR (#93)

* avoid stack too deep

* pack local variables into structs; remove need for IR

* reorg struct

* snapshots

* forge fmt

* restore settings

* remove IR

* ensure tokens are ordered properly by using salts

* gas snapshot

* remove console logs

* chore: update v4-core:latest (#89)

* update v4-core

* update to new liquidity hooks

* forge fmt; reuse v4-core justfile

* snapshots

* rename getHooksCalls --> getHookPermissions

* enforce permanent liquidity with beforeRemoveLiquidity

* snapshot

* update v4-core (again)

* snapshots with new v4-core

* v4-core:latest

* pin 0.8.24

* merge in remote; regenerate snapshots

* remove justfile

* repin cancun

* pin token addresses using vm.etch

* snapshots

* forge fmt

* remove via-ir and custom solc from CI

* test nit

* Update v4-core submodule to use https (#97)

Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>

* chore: add semgrep (#94)

* [Chore] Update v4-core:latest (#100)

* Update v4-core

* Update various examples, BaseHook, Quoter and tests

* Remove nested locking for LimitOrder

* Fix Quoter

* update v4-core

* fix: remove getLocker as its a bool now

* update v4-core: flipped signs, push dynamic fees

* fix: flip delta signs

* flip delta signs

* flip delta signs

* flip delta signs

* fix getSlot0 calls

* snapshots

* remove deadcode

* remove unused param

* update core

* update for modifyLiquidity; misc doc updates

* correct min int256

* allow for manual fee updates

---------

Co-authored-by: saucepoint <saucepoint@protonmail.com>

* changes with core update

* fix casing

* switch versions back

* Updated lib/v4-core submodule to main branch

* switch to 0.8.19

---------

Co-authored-by: Zach Yang <zhiyuan.zach.yang@gmail.com>
Co-authored-by: Mark Toda <toda.mark@gmail.com>
Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: Sara Reynolds <snreynolds2506@gmail.com>
Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>
Co-authored-by: 0x57 <wqi@umich.edu>
Co-authored-by: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com>
Co-authored-by: 0x57 <qi.wu@coinbase.com>
Co-authored-by: saucepoint <saucepoint@protonmail.com>
Co-authored-by: Alice Henshaw <henshawalice@gmail.com>
@hensha256 hensha256 marked this pull request as ready for review June 28, 2024 12:39
@hensha256 hensha256 merged commit aa148b3 into routing Jun 28, 2024
3 checks passed
@hensha256 hensha256 deleted the routing-zach branch June 28, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants