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

Add support for n-hop swaps in FlashUniswapV3 #105

Merged
merged 8 commits into from
Dec 12, 2023

Conversation

scorpion9979
Copy link
Contributor

No description provided.

feat(flash-swap): add "BytesLib.sol" library
refactor(flash-swap): move "NoDelegateCall.sol" to "libraries/" dir
…ction

feat(flash-swap): add "swapExactOutputInternal" function
feat(flash-swap): replace "poolFee" param in "FlashLiquidateParams" struct with "path"
feat(flash-swap): add "FlashUniswapV3__InsufficientSwapOutputAmount" error
refactor(flash-swap): use specific imports
refactor(flash-swap): rename "FlashSwapAndLiquidateBorrow" event to "FlashLiquidate"
refactor(flash-swap): rename "UniswapV3SwapCallback" structs to "FlashLiquidateCallback"
test(flash-swap): update "getSwapCallbackData" function to mirror contract changes
chore(flash-swap): re-generate types
…epayAmount" recalculation

refactor(flash-swap): merge "getPoolKey" and "poolFor" functions into a single "getPool" function
refactor(flash-swap): rename "FlashLiquidateCallbackParams" struct to "UniswapV3SwapCallbackParams"
refactor(flash-swap): rename "benificiary" param in "swapExactOutputInternal" function to "to"
chore(flash-swap): regenerate types
…ontract changes

test(flash-swap): remove "uniswapV3Pool" contract type to "Contracts" interface
test(flash-swap): add "dai" contract type to "Contracts" interface
feat(constants): add "DAI_{DECIMALS,NAME,SYMBOL}" constants to tokens.ts
feat(constants): add "DEFAULT_FEE" constant to oracles.ts
@scorpion9979 scorpion9979 force-pushed the feat/flash-swap-uni-v3-multi-hop branch from 2bf89f3 to 66cdc7c Compare December 12, 2023 20:09
@scorpion9979 scorpion9979 merged commit a3229a1 into main Dec 12, 2023
8 checks passed
scorpion9979 added a commit that referenced this pull request Dec 12, 2023
…i-hop

* feat(flash-swap): add "Path.sol" library
feat(flash-swap): add "BytesLib.sol" library
refactor(flash-swap): move "NoDelegateCall.sol" to "libraries/" dir

* feat(flash-swap): add support for n-hop swaps in "flashLiquidate" function
feat(flash-swap): add "swapExactOutputInternal" function
feat(flash-swap): replace "poolFee" param in "FlashLiquidateParams" struct with "path"
feat(flash-swap): add "FlashUniswapV3__InsufficientSwapOutputAmount" error
refactor(flash-swap): use specific imports
refactor(flash-swap): rename "FlashSwapAndLiquidateBorrow" event to "FlashLiquidate"
refactor(flash-swap): rename "UniswapV3SwapCallback" structs to "FlashLiquidateCallback"
test(flash-swap): update "getSwapCallbackData" function to mirror contract changes
chore(flash-swap): re-generate types

* fix(flash-swap): bug in "uniswapV3SwapCallback" function regarding "repayAmount" recalculation
refactor(flash-swap): merge "getPoolKey" and "poolFor" functions into a single "getPool" function
refactor(flash-swap): rename "FlashLiquidateCallbackParams" struct to "UniswapV3SwapCallbackParams"
refactor(flash-swap): rename "benificiary" param in "swapExactOutputInternal" function to "to"
chore(flash-swap): regenerate types

* chore(flash-swap): skip test coverage for "uniswap-v3/libraries" dir
chore(flash-swap): re-generate types

* chore(flash-swap): disable solhint for Uniswap V3 libraries

* test(flash-swap): update integration tests to mirror FlashUniswapV3 contract changes
test(flash-swap): remove "uniswapV3Pool" contract type to "Contracts" interface
test(flash-swap): add "dai" contract type to "Contracts" interface
feat(constants): add "DAI_{DECIMALS,NAME,SYMBOL}" constants to tokens.ts
feat(constants): add "DEFAULT_FEE" constant to oracles.ts

* chore(flash-swap): fix lint issues

* docs(flash-swap): add dev NatSpec comments to libraries
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.

1 participant