Skip to content

Commit c0bc3f3

Browse files
authored
Merge pull request #41 from balancer/surge-v2
add surge v2
2 parents 2a92cb0 + a31114a commit c0bc3f3

File tree

12 files changed

+87
-9
lines changed

12 files changed

+87
-9
lines changed

networks.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
"address": "0xb18fA0cb5DE8cecB8899AAE6e38b1B7ed77885dA",
2525
"startBlock": 21791079
2626
},
27+
"StableSurgeHookV2": {
28+
"address": "0xBDbADc891BB95DEE80eBC491699228EF0f7D6fF1",
29+
"startBlock": 22195509
30+
},
2731
"Gyro2CLPPoolFactory": {
2832
"address": "0xb96524227c4B5Ab908FC3d42005FE3B07abA40E9",
2933
"startBlock": 22188963
@@ -62,6 +66,10 @@
6266
"address": "0xe4f1878eC9710846E2B529C1b5037F8bA94583b1",
6367
"startBlock": 38432088
6468
},
69+
"StableSurgeHookV2": {
70+
"address": "0x90BD26fbb9dB17D75b56E4cA3A4c438FA7C93694",
71+
"startBlock": 39385569
72+
},
6573
"Gyro2CLPPoolFactory": {
6674
"address": "0x7fA49Df302a98223d98D115fc4FCD275576f6faA",
6775
"startBlock": 39369934
@@ -108,6 +116,10 @@
108116
"address": "0x30CE53fA38a1399F0CA158b5c38362c80E423bA9",
109117
"startBlock": 7655004
110118
},
119+
"StableSurgeHookV2": {
120+
"address": "0x7dfca838fD5fCd70f876431D41CaA3E3E2ea1520",
121+
"startBlock": 8048919
122+
},
111123
"QuantAMMWeightedPoolFactory": {
112124
"address": "0x611C4A8c8479FA2Ec6dCE287F0adBFF694d599e9",
113125
"startBlock": 7920154
@@ -146,6 +158,10 @@
146158
"address": "0x0Fa0f9990D7969a7aE6f9961d663E4A201Ed6417",
147159
"startBlock": 303403113
148160
},
161+
"StableSurgeHookV2": {
162+
"address": "0x7c1b7A97BfAcD39975dE53e989A16c7BC4C78275",
163+
"startBlock": 322836701
164+
},
149165
"GyroECLPPoolFactory": {
150166
"address": "0x88ED12A90142fDBFe2a28f7d5b48927254C7e760",
151167
"startBlock": 315658096
@@ -184,6 +200,10 @@
184200
"address": "0xb2007B8B7E0260042517f635CFd8E6dD2Dd7f007",
185201
"startBlock": 26049433
186202
},
203+
"StableSurgeHookV2": {
204+
"address": "0xDB8d758BCb971e482B2C45f7F8a7740283A1bd3A",
205+
"startBlock": 28489956
206+
},
187207
"GyroECLPPoolFactory": {
188208
"address": "0x5F6848976C2914403B425F18B589A65772F082E3",
189209
"startBlock": 27590349
@@ -244,6 +264,10 @@
244264
"address": "0x1702067424096F07A60e62cceE3dE9420068492D",
245265
"startBlock": 59395784
246266
},
267+
"StableSurgeHookV2": {
268+
"address": "0xaD89051bEd8d96f045E8912aE1672c6C0bF8a85E",
269+
"startBlock": 59702907
270+
},
247271
"Gyro2CLPPoolFactory": {
248272
"address": "0x8e3fEaAB11b7B351e3EA1E01247Ab6ccc847dD52",
249273
"startBlock": 59658826
@@ -274,6 +298,10 @@
274298
"address": "0x268E2EE1413D768b6e2dc3F5a4ddc9Ae03d9AF42",
275299
"startBlock": 133969860
276300
},
301+
"StableSurgeHookV2": {
302+
"address": "0xF39CA6ede9BF7820a952b52f3c94af526bAB9015",
303+
"startBlock": 134085181
304+
},
277305
"Gyro2CLPPoolFactory": {
278306
"address": "0x4b979eD48F982Ba0baA946cB69c1083eB799729c",
279307
"startBlock": 134045195

subgraphs/v3-pools/src/mappings/stable.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ export function handleStablePoolCreated(event: PoolCreated): void {
2828
"stableParams"
2929
);
3030
}
31+
32+
export function handleStablePoolV2Created(event: PoolCreated): void {
33+
handlePoolCreated(
34+
event.params.pool,
35+
event.address, // Factory
36+
PoolType.Stable,
37+
2,
38+
handleStablePoolParams,
39+
"stableParams"
40+
);
41+
}

subgraphs/v3-pools/src/mappings/surge.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,17 @@ export function handleStableSurgeHookRegistered(
5353
"stableSurgeParams"
5454
);
5555
}
56+
57+
export function handleStableSurgeHookV2Registered(
58+
event: StableSurgeHookRegistered
59+
): void {
60+
handlePoolHookCreated(
61+
event.params.pool,
62+
event.params.factory, // Factory
63+
event.address, // Hook
64+
PoolType.StableSurge,
65+
2,
66+
handleStableSurgeParams,
67+
"stableSurgeParams"
68+
);
69+
}

subgraphs/v3-pools/subgraph.arbitrum-one.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dataSources:
6969
file: ./abis/BasePoolFactory.json
7070
eventHandlers:
7171
- event: PoolCreated(indexed address)
72-
handler: handleStablePoolCreated
72+
handler: handleStablePoolV2Created
7373
file: ./src/mappings/stable.ts
7474
- kind: ethereum
7575
name: Gyro2CLPPoolFactory

subgraphs/v3-pools/subgraph.avalanche.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dataSources:
4646
file: ./abis/BasePoolFactory.json
4747
eventHandlers:
4848
- event: PoolCreated(indexed address)
49-
handler: handleStablePoolCreated
49+
handler: handleStablePoolV2Created
5050
file: ./src/mappings/stable.ts
5151
- kind: ethereum
5252
name: Gyro2CLPPoolFactory

subgraphs/v3-pools/subgraph.base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dataSources:
6969
file: ./abis/BasePoolFactory.json
7070
eventHandlers:
7171
- event: PoolCreated(indexed address)
72-
handler: handleStablePoolCreated
72+
handler: handleStablePoolV2Created
7373
file: ./src/mappings/stable.ts
7474
- kind: ethereum
7575
name: Gyro2CLPPoolFactory

subgraphs/v3-pools/subgraph.gnosis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dataSources:
6969
file: ./abis/BasePoolFactory.json
7070
eventHandlers:
7171
- event: PoolCreated(indexed address)
72-
handler: handleStablePoolCreated
72+
handler: handleStablePoolV2Created
7373
file: ./src/mappings/stable.ts
7474
- kind: ethereum
7575
name: Gyro2CLPPoolFactory

subgraphs/v3-pools/subgraph.optimism.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dataSources:
4646
file: ./abis/BasePoolFactory.json
4747
eventHandlers:
4848
- event: PoolCreated(indexed address)
49-
handler: handleStablePoolCreated
49+
handler: handleStablePoolV2Created
5050
file: ./src/mappings/stable.ts
5151
- kind: ethereum
5252
name: Gyro2CLPPoolFactory

subgraphs/v3-pools/subgraph.sepolia.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dataSources:
6969
file: ./abis/BasePoolFactory.json
7070
eventHandlers:
7171
- event: PoolCreated(indexed address)
72-
handler: handleStablePoolCreated
72+
handler: handleStablePoolV2Created
7373
file: ./src/mappings/stable.ts
7474
- kind: ethereum
7575
name: Gyro2CLPPoolFactory

subgraphs/v3-pools/subgraph.sonic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dataSources:
6969
file: ./abis/BasePoolFactory.json
7070
eventHandlers:
7171
- event: PoolCreated(indexed address)
72-
handler: handleStablePoolCreated
72+
handler: handleStablePoolV2Created
7373
file: ./src/mappings/stable.ts
7474
- kind: ethereum
7575
name: Gyro2CLPPoolFactory

0 commit comments

Comments
 (0)