Skip to content

Commit 6d89131

Browse files
committed
update config
1 parent fed9d0b commit 6d89131

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

src/swapService/config/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import bobRoutingConfig from "./bob"
88
import bscRoutingConfig from "./bsc"
99
import defaultRoutingConfig from "./default"
1010
import mainnetRoutingConfig from "./mainnet"
11+
import plasmaRoutingConfig from "./plasma"
1112
import sonicRoutingConfig from "./sonic"
1213
import swellRoutingConfig from "./swell"
1314
import unichainRoutingConfig from "./unichain"
@@ -23,6 +24,7 @@ const routingConfig: RoutingConfig = {
2324
[60808]: bobRoutingConfig,
2425
[146]: sonicRoutingConfig,
2526
[130]: unichainRoutingConfig,
27+
[9745]: plasmaRoutingConfig,
2628
}
2729

2830
export const getRoutingConfig = (chainId: number) => {

src/swapService/config/plasma.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { type ChainRoutingConfig, SwapperMode } from "../interface"
2+
import {
3+
StrategyBalmySDK,
4+
StrategyMidas,
5+
StrategyRepayWrapper,
6+
} from "../strategies"
7+
8+
const plasmaRoutingConfig: ChainRoutingConfig = [
9+
// WRAPPERS
10+
{
11+
strategy: StrategyRepayWrapper.name(),
12+
match: {
13+
isRepay: true,
14+
swapperModes: [SwapperMode.EXACT_IN],
15+
},
16+
},
17+
{
18+
strategy: StrategyMidas.name(),
19+
match: {}, // supports function will match mTokens
20+
},
21+
// DEFAULTS
22+
{
23+
strategy: StrategyBalmySDK.name(),
24+
config: {
25+
sourcesFilter: {
26+
includeSources: [
27+
"kyberswap",
28+
"paraswap",
29+
"odos",
30+
"1inch",
31+
"li-fi",
32+
"open-ocean",
33+
"uniswap",
34+
"oku",
35+
"magpie",
36+
"enso",
37+
"okx-dex",
38+
"pendle",
39+
"0x",
40+
],
41+
},
42+
},
43+
match: {},
44+
},
45+
]
46+
47+
export default plasmaRoutingConfig

src/swapService/strategies/balmySDK/sources/kyberswapQuoteSource.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ export class CustomKyberswapQuoteSource extends AlwaysValidConfigAndContextSourc
9494
: undefined
9595

9696
const url = `https://aggregator-api.kyberswap.com/${chainKey}/api/v1/routes?tokenIn=${sellToken}&tokenOut=${buyToken}&amountIn=${order.sellAmount.toString()}&saveGas=0&gasInclude=true&excludedSources=clipper,hashflow-v3,kyberswap-limit-order,kyberswap-limit-order-v2,mx-trading,native-v1,native-v2`
97+
console.log("url: ", url)
9798
const routeResponse = await fetchService.fetch(url, { timeout, headers })
99+
console.log("routeResponse: ", routeResponse)
98100

99101
if (!routeResponse.ok) {
100102
failed(

src/swapService/strategies/strategyMidas.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,19 @@ const defaultConfig: Config = {
157157
priceOne: 100000000n,
158158
},
159159
},
160+
[9745]: {
161+
//plasma
162+
mHYPER: {
163+
tokenContract: "0xb31BeA5c2a43f942a3800558B1aa25978da75F8a",
164+
redemptionInstantFeeBps: 50n,
165+
depositorContract: "0xa603cf264aDEB8E7f0f063C116929ADAC2D4286E",
166+
redeemerContract: "0x880661F9b412065D616890cA458dcCd0146cb77C",
167+
oracleContract: "0xfC3E47c4Da8F3a01ac76c3C5ecfBfC302e1A08F0",
168+
paymentToken: "0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb", // USDT0
169+
paymentTokenSweepVault: "0x9F562699511351bA3d0cf3d0DF1502e776517ef3",
170+
priceOne: 100000000n,
171+
},
172+
},
160173
},
161174
}
162175

0 commit comments

Comments
 (0)