Skip to content

Commit ca7da18

Browse files
committed
update config
1 parent 8e2165e commit ca7da18

File tree

4 files changed

+51
-11
lines changed

4 files changed

+51
-11
lines changed

src/swapService/config/sonic.ts

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
const WSTKSCUSD_SONIC = "0x9fb76f7ce5FCeAA2C42887ff441D46095E494206"
88
const WSTKSCETH_SONIC = "0xE8a41c62BB4d5863C6eadC96792cFE90A1f37C47"
99
const WOS_SONIC = "0x9F0dF7799f6FDAd409300080cfF680f5A23df4b1"
10-
// const YUSD_SONIC = "0x4772D2e014F9fC3a820C444e3313968e9a5C8121"
10+
const YUSD_SONIC = "0x4772D2e014F9fC3a820C444e3313968e9a5C8121"
1111

1212
const sonicConfig: ChainRoutingConfig = [
1313
// WRAPPERS
@@ -18,6 +18,29 @@ const sonicConfig: ChainRoutingConfig = [
1818
swapperModes: [SwapperMode.EXACT_IN],
1919
},
2020
},
21+
{
22+
strategy: StrategyBalmySDK.name(),
23+
config: {
24+
sourcesFilter: {
25+
includeSources: [
26+
"kyberswap",
27+
"paraswap",
28+
"odos",
29+
"1inch",
30+
"li-fi",
31+
"open-ocean",
32+
"uniswap",
33+
"0x",
34+
"magpie",
35+
"pendle",
36+
"enso",
37+
],
38+
},
39+
},
40+
match: {
41+
tokensIn: [YUSD_SONIC],
42+
},
43+
},
2144
// DEFAULTS
2245
{
2346
strategy: StrategyBalmySDK.name(),
@@ -38,7 +61,9 @@ const sonicConfig: ChainRoutingConfig = [
3861
],
3962
},
4063
},
41-
match: {},
64+
match: {
65+
excludeTokensInOrOut: [YUSD_SONIC],
66+
},
4267
},
4368
// FALLBACK
4469
{

src/swapService/interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export interface StrategyMatchConfig {
7272
isPendlePT?: boolean
7373
notPendlePT?: boolean
7474
tokensInOrOut?: Address[]
75+
tokensIn?: Address[]
7576
excludeTokensInOrOut?: Address[]
7677
repayVaults?: Address[]
7778
trades?: {

src/swapService/utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ export function matchParams(
6262
)
6363
return false
6464
}
65+
if (match.tokensIn) {
66+
if (
67+
!match.tokensIn.some((token: Hex) => {
68+
return isAddressEqual(swapParams.tokenIn.addressInfo, token)
69+
})
70+
)
71+
return false
72+
}
6573
if (match.excludeTokensInOrOut) {
6674
if (
6775
match.excludeTokensInOrOut.some((token: Hex) => {

tokenLists/tokenList_146.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,25 +158,31 @@
158158
"symbol": "x33",
159159
"decimals": 18,
160160
"logoURI": "https://coin-images.coingecko.com/coins/images/54526/large/shadow_liquid_staking_token17400.jpg?1740148577",
161-
"meta": {}
161+
"meta": {
162+
"provider": "SHADOW"
163+
}
162164
},
163165
{
164-
"addressInfo": "0xE2Fc85BfB48C4cF147921fBE110cf92Ef9f26F94",
166+
"addressInfo": "0x4772D2e014F9fC3a820C444e3313968e9a5C8121",
165167
"chainId": 146,
166-
"name": "Stream USD",
167-
"symbol": "streamUSD",
168-
"decimals": 6,
169-
"logoURI": "/tokens/146/sS.svg",
170-
"meta": {}
168+
"name": "YieldFi yUSD",
169+
"symbol": "yUSD",
170+
"decimals": 18,
171+
"logoURI": "https://coin-images.coingecko.com/coins/images/53607/large/yUSD.png?1739862886",
172+
"meta": {
173+
"provider": "YIELDFI"
174+
}
171175
},
172176
{
173177
"addressInfo": "0x6202B9f02E30E5e1c62Cc01E4305450E5d83b926",
174178
"chainId": 146,
175179
"name": "Staked Stream USD",
176180
"symbol": "xUSD",
177181
"decimals": 6,
178-
"logoURI": "/tokens/146/sS.svg",
179-
"meta": {}
182+
"logoURI": "/tokens/146/xusd.svg",
183+
"meta": {
184+
"provider": "STREAM"
185+
}
180186
},
181187
{
182188
"addressInfo": "0x8e15C8D399e86d4FD7B427D42f06c60cDD9397e7",

0 commit comments

Comments
 (0)