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

(Quoter) Avoid IR #93

Merged
merged 10 commits into from
Feb 17, 2024
Merged

(Quoter) Avoid IR #93

merged 10 commits into from
Feb 17, 2024

Conversation

saucepoint
Copy link
Collaborator

@saucepoint saucepoint commented Jan 11, 2024

Related Issue

Closes #92

Description of changes

Ensured test tokens are ordered properly to prevent nondeterministic test failures on Quoter.t.sol

Reorganized the Quoter's local variables into a struct, to avoid stack-too-deep / viaIR

Cleaned up LimitOrder to avoid stack-too-deep

Cleaned up PoolTicksCounter to avoid stack-too-deep

@saucepoint saucepoint changed the title Avoid IR (Quoter) Avoid IR Jan 11, 2024
@saucepoint
Copy link
Collaborator Author

drafting this because with optimizer_runs = 1000000, the quoter assertions are failing catastrophically 🤔

@saucepoint saucepoint marked this pull request as ready for review February 15, 2024 22:31
@saucepoint
Copy link
Collaborator Author

saucepoint commented Feb 15, 2024

update on catastrophic test failures:

token2 wasn't deployed with a salt. This lead to inconsistent testing behavior, since the quoter assumed a particular direction (zeroForOne vs oneForZero) for some multi-pool quoting

@saucepoint saucepoint mentioned this pull request Feb 15, 2024
4 tasks
Copy link
Contributor

@hensha256 hensha256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@saucepoint saucepoint merged commit e40e7f0 into Uniswap:main Feb 17, 2024
2 checks passed
@saucepoint saucepoint deleted the 92-avoid-ir branch February 17, 2024 03:19
ChefSnoopy added a commit to ChefSnoopy/v4-periphery that referenced this pull request Mar 10, 2024
* Update to v4-core latest (Uniswap#64)

* first pass on using new router function singatures

* updated v4-core

* updated .getSlot0, as it returns less data now

* snapshots

* add base contracts and interfaces (Uniswap#75)

* Update v4 core (Uniswap#74)

* feat: update v4-core

This commit updates v4 core to latest and fixes integration issues

* fix: tests

* fix: update tests

* fix: test router was borked

* fix: alice comments

* 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

---------

Co-authored-by: Sara Reynolds <snreynolds2506@gmail.com>

* feat: Revert style quoter (Uniswap#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 (Uniswap#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 (Uniswap#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 (Uniswap#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 (Uniswap#97)

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

* chore: add semgrep (Uniswap#94)

---------

Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>
Co-authored-by: Tina <59578595+tinaszheng@users.noreply.github.com>
Co-authored-by: marktoda <toda.mark@gmail.com>
Co-authored-by: Sara Reynolds <snreynolds2506@gmail.com>
Co-authored-by: Zach Yang <zhiyuan.zach.yang@gmail.com>
Co-authored-by: 0x57 <wqi@umich.edu>
Co-authored-by: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com>
hensha256 added a commit that referenced this pull request Jun 28, 2024
* 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 added a commit that referenced this pull request Jun 28, 2024
* 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

* start routing

* start routing contract

* naive swapExactIn impl

* lint + bytecode snapshot

* change concept of hops to token hops

* UniswapV4Routing --> Routing

* use PathKey

* exactInputSingle

* save DRY progress

* no sqrtPriceLimit for multipool hops

* exactOut implemented w awkward loops/int conversions

single hops passing on exactOut

* gas savings from not doing  double negative number

* gas savings from unchecked math

* add swapExactOuputSingle

* break out structs into interface

* PR comments

* pass hook data along

* gas and coherency optimization

* merge Quoter

* remove SwapIntention

* IV4Router structs

* remove SwapIntention

* remove logs

* natspec

* rebase onto latest core

* simplify function naming

* Routing diana (#104)

* 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>

* update imports

---------

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: Emily Williams <emag3m@gmail.com>
Co-authored-by: Alice Henshaw <henshawalice@gmail.com>
Co-authored-by: diana <dlkocsis04@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>
snreynolds added a commit that referenced this pull request Jul 29, 2024
* start routing

* start routing contract

* naive swapExactIn impl

* lint + bytecode snapshot

* change concept of hops to token hops

* UniswapV4Routing --> Routing

* use PathKey

* exactInputSingle

* save DRY progress

* no sqrtPriceLimit for multipool hops

* exactOut implemented w awkward loops/int conversions

single hops passing on exactOut

* gas savings from not doing  double negative number

* gas savings from unchecked math

* add swapExactOuputSingle

* break out structs into interface

* PR comments

* pass hook data along

* gas and coherency optimization

* updated lib/v4-core submodule to main branch

* feat: abstract router (#86)

* 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

* start routing

* start routing contract

* naive swapExactIn impl

* lint + bytecode snapshot

* change concept of hops to token hops

* UniswapV4Routing --> Routing

* use PathKey

* exactInputSingle

* save DRY progress

* no sqrtPriceLimit for multipool hops

* exactOut implemented w awkward loops/int conversions

single hops passing on exactOut

* gas savings from not doing  double negative number

* gas savings from unchecked math

* add swapExactOuputSingle

* break out structs into interface

* PR comments

* pass hook data along

* gas and coherency optimization

* merge Quoter

* remove SwapIntention

* IV4Router structs

* remove SwapIntention

* remove logs

* natspec

* rebase onto latest core

* simplify function naming

* Routing diana (#104)

* 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>

* update imports

---------

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: Emily Williams <emag3m@gmail.com>
Co-authored-by: Alice Henshaw <henshawalice@gmail.com>
Co-authored-by: diana <dlkocsis04@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>

* allow payer and recipient to be different

* try to fix ci

* improve casting

* reverting 3 commits to make branch

* remove unused recipient param

* remove payment logic from swap logic

* factor out payment functions

* gas opt removing struct

* gas opt: decode in assembly

* merge error

* use base actions router in v4router

* use isolate

* merge conflicts

* removing submodules

* renaming to stop clashes in UR

* PR comments and gas optimisations

* add _getLocker

* Amount field on settle and take

* rename snaps

* correcy casting order

* Add deltaresolver to router

* take_all command, remove from delta resolver

* Routing test helper

* Separate gas tests and regular tests

* remove duplicate snapshot name

* another gas test

* PR comments

* remove unused function

* PR cmments

* handle hook edgecase

---------

Co-authored-by: Diana Kocsis <diana.kocsis@uniswap.org>
Co-authored-by: Alice Henshaw <henshawalice@gmail.com>
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: diana <dlkocsis04@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 <34962750+hensha256@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Quoter) Avoid StackTooDeep / viaIR
2 participants