Skip to content

Commit 3d9d858

Browse files
committed
update berachain config
1 parent 8c04a4d commit 3d9d858

File tree

6 files changed

+53
-41
lines changed

6 files changed

+53
-41
lines changed

.env.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ RPC_URL_11155111=""
1818
RPC_URL_8453=""
1919
# arbitrum
2020
RPC_URL_42161=""
21-
# bartio
22-
RPC_URL_80084=""
21+
# berachain
22+
RPC_URL_80094=""
2323
# foundry
2424
RPC_URL_31337=""
2525
# sonic

src/swapService/config/bera.ts renamed to src/swapService/config/berachain.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type ChainRoutingConfig, SwapperMode } from "../interface"
22
import { StrategyBalmySDK, StrategyRepayWrapper } from "../strategies"
33

4-
const beraRoutingConfig: ChainRoutingConfig = [
4+
const berachainRoutingConfig: ChainRoutingConfig = [
55
// WRAPPERS
66
{
77
strategy: StrategyRepayWrapper.name(),
@@ -22,4 +22,4 @@ const beraRoutingConfig: ChainRoutingConfig = [
2222
},
2323
]
2424

25-
export default beraRoutingConfig
25+
export default berachainRoutingConfig

src/swapService/config/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { base, mainnet } from "viem/chains"
22
import type { RoutingConfig } from "../interface"
33
import baseRoutingConfig from "./base"
4-
import beraRoutingConfig from "./bera"
4+
import berachainRoutingConfig from "./berachain"
55
import bobRoutingConfig from "./bob"
66
import defaultRoutingConfig from "./default"
77
import mainnetRoutingConfig from "./mainnet"
@@ -12,7 +12,7 @@ const routingConfig: RoutingConfig = {
1212
[mainnet.id]: mainnetRoutingConfig,
1313
[base.id]: baseRoutingConfig,
1414
[1923]: swellRoutingConfig,
15-
[80094]: beraRoutingConfig,
15+
[80094]: berachainRoutingConfig,
1616
[60808]: bobRoutingConfig,
1717
[146]: sonicRoutingConfig,
1818
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,23 @@ export class CustomLiFiQuoteSource extends AlwaysValidConfigAndContextSource<
128128
toAmountMin,
129129
toAmount,
130130
fromAmount,
131-
gasCosts,
131+
// gasCosts,
132132
},
133133
transactionRequest: { to, data, value },
134134
} = await response.json()
135135

136-
const estimatedGas = (gasCosts as { estimate: bigint }[]).reduce(
137-
(accum, { estimate }) => accum + BigInt(estimate),
138-
0n,
139-
)
136+
// const estimatedGas = (gasCosts as { estimate: bigint }[]).reduce(
137+
// (accum, { estimate }) => accum + BigInt(estimate),
138+
// 0n,
139+
// )
140140

141141
return {
142142
sellAmount: fromAmount,
143143
maxSellAmount: fromAmount,
144144
buyAmount: BigInt(toAmount),
145145
minBuyAmount: BigInt(toAmountMin),
146146
type: order.type,
147-
estimatedGas,
147+
// estimatedGas, // TODO fix handling in SDK for unkown chains
148148
allowanceTarget: calculateAllowanceTarget(sellToken, approvalAddress),
149149
customData: {
150150
tx: {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class CustomOpenOceanQuoteSource extends AlwaysValidConfigAndContextSourc
155155
)
156156
}
157157
const {
158-
data: { outAmount, estimatedGas, minOutAmount, to, value, data },
158+
data: { outAmount, minOutAmount, to, value, data /* estimatedGas */ },
159159
} = await response.json()
160160

161161
return {
@@ -164,7 +164,7 @@ export class CustomOpenOceanQuoteSource extends AlwaysValidConfigAndContextSourc
164164
buyAmount: BigInt(outAmount),
165165
minBuyAmount: BigInt(minOutAmount),
166166
type: "sell",
167-
estimatedGas: BigInt(estimatedGas),
167+
// estimatedGas: BigInt(estimatedGas), // TODO fix unknown chains handling in SDK
168168
allowanceTarget: calculateAllowanceTarget(sellToken, to),
169169
customData: {
170170
tx: {

tokenLists/tokenList_80094.json

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,20 @@
1010
},
1111
{
1212
"chainId": 80094,
13-
"addressInfo": "0x656b95E550C07a9ffe548bd4085c72418Ceb1dba",
14-
"symbol": "BGT",
15-
"name": "Bera Governance Token",
13+
"addressInfo": "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",
14+
"symbol": "WETH",
15+
"name": "WETH",
1616
"decimals": 18,
17-
"logoURI": "https://res.cloudinary.com/duv0g402y/raw/upload/v1717773645/src/assets/bgt.png",
17+
"logoURI": "https://res.cloudinary.com/duv0g402y/raw/upload/v1717773645/src/assets/eth.png",
18+
"meta": {}
19+
},
20+
{
21+
"chainId": 80094,
22+
"addressInfo": "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c",
23+
"symbol": "WBTC",
24+
"name": "WBTC",
25+
"decimals": 8,
26+
"logoURI": "https://res.cloudinary.com/duv0g402y/raw/upload/v1717773645/src/assets/btc.png",
1827
"meta": {}
1928
},
2029
{
@@ -26,15 +35,6 @@
2635
"logoURI": "https://res.cloudinary.com/duv0g402y/raw/upload/v1717773645/src/assets/honey.png",
2736
"meta": {}
2837
},
29-
{
30-
"chainId": 80094,
31-
"addressInfo": "0x688e72142674041f8f6Af4c808a4045cA1D6aC82",
32-
"symbol": "BYUSD",
33-
"name": "BYUSD",
34-
"logoURI": "https://res.cloudinary.com/duv0g402y/image/upload/v1738732576/tokens/y6wa21vehnappbe2cruf.png",
35-
"decimals": 6,
36-
"meta": {}
37-
},
3838
{
3939
"chainId": 80094,
4040
"addressInfo": "0x549943e04f40284185054145c6E4e9568C1D3241",
@@ -46,29 +46,41 @@
4646
},
4747
{
4848
"chainId": 80094,
49-
"addressInfo": "0x779Ded0c9e1022225f8E0630b35a9b54bE713736",
50-
"symbol": "USDT0",
51-
"name": "Tether USD Coin",
49+
"addressInfo": "0xEc901DA9c68E90798BbBb74c11406A32A70652C3",
50+
"decimals": 18,
51+
"name": "StakeStone Ether",
52+
"symbol": "STONE",
53+
"logoURI": "/tokens/80094/stone.svg",
54+
"meta": {
55+
"provider": "DEFILLAMA",
56+
"poolId": "e28e32b5-e356-41d9-8dc7-a376ece56619"
57+
}
58+
},
59+
{
60+
"chainId": 80094,
61+
"addressInfo": "0x688e72142674041f8f6Af4c808a4045cA1D6aC82",
62+
"symbol": "BYUSD",
63+
"name": "BYUSD",
64+
"logoURI": "https://res.cloudinary.com/duv0g402y/image/upload/v1738732576/tokens/y6wa21vehnappbe2cruf.png",
5265
"decimals": 6,
53-
"logoURI": "https://assets.coingecko.com/coins/images/325/small/Tether.png?1696501661",
5466
"meta": {}
5567
},
5668
{
5769
"chainId": 80094,
58-
"addressInfo": "0x0555E30da8f98308EdB960aa94C0Db47230d2B9c",
59-
"symbol": "WBTC",
60-
"name": "WBTC",
61-
"decimals": 8,
62-
"logoURI": "https://res.cloudinary.com/duv0g402y/raw/upload/v1717773645/src/assets/btc.png",
70+
"addressInfo": "0x656b95E550C07a9ffe548bd4085c72418Ceb1dba",
71+
"symbol": "BGT",
72+
"name": "Bera Governance Token",
73+
"decimals": 18,
74+
"logoURI": "https://res.cloudinary.com/duv0g402y/raw/upload/v1717773645/src/assets/bgt.png",
6375
"meta": {}
6476
},
6577
{
6678
"chainId": 80094,
67-
"addressInfo": "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",
68-
"symbol": "WETH",
69-
"name": "WETH",
70-
"decimals": 18,
71-
"logoURI": "https://res.cloudinary.com/duv0g402y/raw/upload/v1717773645/src/assets/eth.png",
79+
"addressInfo": "0x779Ded0c9e1022225f8E0630b35a9b54bE713736",
80+
"symbol": "USDT0",
81+
"name": "Tether USD Coin",
82+
"decimals": 6,
83+
"logoURI": "https://assets.coingecko.com/coins/images/325/small/Tether.png?1696501661",
7284
"meta": {}
7385
},
7486
{

0 commit comments

Comments
 (0)