-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from rabbitholegg/mmackz-traderjoe-fix
fix(traderjoe): fix issue with amount not working correctly using WETH
- Loading branch information
Showing
6 changed files
with
130 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rabbitholegg/questdk-plugin-traderjoe": patch | ||
--- | ||
|
||
fix issue with amount not working correctly when WETH is chosen as tokenIn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { LBRouterV21ABI } from '@traderjoe-xyz/sdk-v2' | ||
|
||
export const EXACT_TOKENS_FOR_TOKENS_ABI = LBRouterV21ABI.filter( | ||
(abi) => | ||
abi.type === 'function' && abi.name.startsWith('swapExactTokensForTokens'), | ||
) | ||
export const EXACT_TOKENS_FOR_NATIVE_ABI = LBRouterV21ABI.filter( | ||
(abi) => | ||
abi.type === 'function' && abi.name.startsWith('swapExactTokensForNATIVE'), | ||
) | ||
export const TOKENS_FOR_EXACT_TOKENS_ABI = LBRouterV21ABI.filter( | ||
(abi) => abi.type === 'function' && abi.name === 'swapTokensForExactTokens', | ||
) | ||
export const EXACT_NATIVE_FOR_TOKENS_ABI = LBRouterV21ABI.filter( | ||
(abi) => | ||
abi.type === 'function' && abi.name.startsWith('swapExactNATIVEForTokens'), | ||
) | ||
export const NATIVE_FOR_EXACT_TOKENS_ABI = LBRouterV21ABI.filter( | ||
(abi) => abi.type === 'function' && abi.name === 'swapNATIVEForExactTokens', | ||
) | ||
export const TOKENS_FOR_EXACT_NATIVE_ABI = LBRouterV21ABI.filter( | ||
(abi) => abi.type === 'function' && abi.name === 'swapTokensForExactNATIVE', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters