Skip to content

Commit dcba69f

Browse files
committed
Merge remote-tracking branch 'origin/main' into unbalanced-add-Router
2 parents 3ca7bc0 + 4be3976 commit dcba69f

File tree

7 files changed

+54
-7
lines changed

7 files changed

+54
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @balancer/sdk
22

3+
## 5.1.3
4+
5+
### Patch Changes
6+
7+
- c8c2a65: fix-add-monad-addresses-and-update-tests
8+
39
## 5.1.2
410

511
### Patch Changes

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"publishConfig": {
1010
"access": "public"
1111
},
12-
"version": "5.1.2",
12+
"version": "5.1.3",
1313
"main": "dist/index.js",
1414
"module": "dist/index.mjs",
1515
"types": "dist/index.d.ts",
@@ -35,7 +35,7 @@
3535
},
3636
"dependencies": {
3737
"@balancer-labs/balancer-maths": "0.0.38",
38-
"viem": "2.45.0"
38+
"viem": "2.45.1"
3939
},
4040
"devDependencies": {
4141
"@biomejs/biome": "1.9.4",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/balancerV3Contracts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export const balancerV3Contracts = {
6363
[ChainId.GNOSIS_CHAIN]: '0xcb3FE6cC529101AF5880a05429729f967501c9E7',
6464
[ChainId.HYPEREVM]: '0xFc00536A0fd292c284deeF6af8F644d8373d9cad',
6565
[ChainId.MAINNET]: '0x9B8168e330776feE6f857914FACA5FB831Dd2ab0',
66+
[ChainId.MONAD]: '0x268E2EE1413D768b6e2dc3F5a4ddc9Ae03d9AF42',
6667
[ChainId.PLASMA]: '0xF39CA6ede9BF7820a952b52f3c94af526bAB9015',
6768
[ChainId.SEPOLIA]: '0x8B8c22B8578A86ead5BcE7294ADFcba767329eb3',
6869
},
@@ -72,6 +73,7 @@ export const balancerV3Contracts = {
7273
[ChainId.GNOSIS_CHAIN]: '0x2FAa140F90f76eeEEBC191f4eF4b2634be1E4e91',
7374
[ChainId.HYPEREVM]: '0xd22eecBB495380Ef52b1CCeF1cA594979885D484',
7475
[ChainId.MAINNET]: '0xD5584b37D1845fFeD958C2d94bC675603DdCce68',
76+
[ChainId.MONAD]: '0xa3b370092aeb56770B23315252aB5E16DAcBF62B',
7577
[ChainId.PLASMA]: '0x3BEb058DE1A25dd24223fd9e1796df8589429AcE',
7678
[ChainId.SEPOLIA]: '0x7fed0fd2843232973eE2F61120e9D9C5eB78Cb16',
7779
},
@@ -81,6 +83,7 @@ export const balancerV3Contracts = {
8183
[ChainId.GNOSIS_CHAIN]: '0xD9E91f7aD501929b089992842a3f193795E6479e',
8284
[ChainId.HYPEREVM]: '0xAE563E3f8219521950555F5962419C8919758Ea2',
8385
[ChainId.MAINNET]: '0xeb1AA94421aEcFB1dc17dDB1068E4609c4bE8758',
86+
[ChainId.MONAD]: '0xe2fa4e1d17725e72dcdAfe943Ecf45dF4B9E285b',
8487
[ChainId.PLASMA]: '0xEAedc32a51c510d35ebC11088fD5fF2b47aACF2E',
8588
[ChainId.SEPOLIA]: '0x57Ef4cB125d1c690dF98118281090b7CdC7b9F85',
8689
},

test/anvil/anvil-global-setup.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type NetworksWithFork = Extract<
2828
| 'HYPEREVM'
2929
| 'PLASMA'
3030
| 'X_LAYER'
31+
| 'MONAD'
3132
>;
3233

3334
const ANVIL_PORTS: Record<NetworksWithFork, number> = {
@@ -46,6 +47,7 @@ const ANVIL_PORTS: Record<NetworksWithFork, number> = {
4647
HYPEREVM: 9745,
4748
PLASMA: 9845,
4849
X_LAYER: 9945,
50+
MONAD: 10045,
4951
};
5052

5153
export const ANVIL_NETWORKS: Record<NetworksWithFork, NetworkSetup> = {
@@ -134,6 +136,12 @@ export const ANVIL_NETWORKS: Record<NetworksWithFork, NetworkSetup> = {
134136
port: ANVIL_PORTS.X_LAYER,
135137
forkBlockNumber: 43138155n,
136138
},
139+
MONAD: {
140+
rpcEnv: 'MONAD_RPC_URL',
141+
fallBackRpc: 'https://rpc.monad.xyz',
142+
port: ANVIL_PORTS.MONAD,
143+
forkBlockNumber: 52794217n,
144+
},
137145
};
138146

139147
function getAnvilOptions(

test/lib/utils/addresses.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,18 @@ export const TOKENS: Record<number, Record<string, TestToken>> = {
252252
decimals: 18,
253253
},
254254
},
255+
[ChainId.MONAD]: {
256+
AUSD: {
257+
address: '0x00000000efe302beaa2b3e6e1b18d08d69a9012a',
258+
decimals: 6,
259+
slot: 0, // not confirmed
260+
},
261+
WMON: {
262+
address: '0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A',
263+
decimals: 18,
264+
slot: 3,
265+
},
266+
},
255267
};
256268

257269
export type TestPool = TestToken & { id: Hex; type: PoolType };
@@ -460,4 +472,13 @@ export const POOLS: Record<number, Record<string, TestPool>> = {
460472
slot: 0,
461473
},
462474
},
475+
[ChainId.MONAD]: {
476+
MOCK_WMON_AUSD_POOL: {
477+
address: '0x770133233a092dd26934d15699d9f6c1538c74e6',
478+
id: '0x770133233a092dd26934d15699d9f6c1538c74e6',
479+
type: PoolType.Weighted,
480+
decimals: 18,
481+
slot: 0,
482+
},
483+
},
463484
};

test/validateAllNetworks.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const CHAIN_ANVIL_MAP: Partial<Record<number, keyof typeof ANVIL_NETWORKS>> = {
5353
[ChainId.HYPEREVM]: 'HYPEREVM',
5454
[ChainId.PLASMA]: 'PLASMA',
5555
[ChainId.X_LAYER]: 'X_LAYER',
56+
[ChainId.MONAD]: 'MONAD',
5657
// Add/remove mappings as needed for your test coverage
5758
};
5859

@@ -92,6 +93,12 @@ const NETWORK_CONFIG: Partial<
9293
poolKey: 'MOCK_USDT_xBTC_POOL',
9394
inputAmountRaw: 10000n,
9495
},
96+
[ChainId.MONAD]: {
97+
tokenInKey: 'WMON',
98+
tokenOutKey: 'AUSD',
99+
poolKey: 'MOCK_WMON_AUSD_POOL',
100+
inputAmountRaw: 1000000000000000n,
101+
},
95102
};
96103

97104
// Optionally override fork block numbers for specific chains. Useful to select pools deployed on V3 after
@@ -101,13 +108,15 @@ const BLOCK_NUMBER_OVERRIDES: Partial<Record<number, bigint>> = {
101108
[ChainId.MAINNET]: 22788192n,
102109
[ChainId.PLASMA]: 1274881n,
103110
[ChainId.X_LAYER]: 43173129n,
111+
[ChainId.MONAD]: 52794217n,
104112
};
105113

106114
// List of ChainIds to run the test for. Modify this array to select which chains to test.
107115
const CHAINS_TO_TEST: number[] = [
108116
ChainId.SEPOLIA,
109117
ChainId.HYPEREVM,
110118
ChainId.PLASMA,
119+
ChainId.MONAD,
111120
// ChainId.X_LAYER, // X_LAYER is not live and RPC is giving issues on CI (No Alchemy available)
112121
];
113122

0 commit comments

Comments
 (0)