Skip to content

Commit 19a8827

Browse files
committed
handle pool initilization
1 parent ea78b65 commit 19a8827

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

networks.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@ polygon:
244244
block: 54559455
245245
# this will be the base of the unpruned deployment, so make sure it has not been pruned
246246
# it should be possible to run time travel queries on it going back to the vault's startBlock
247-
base: Qmd6J5P1KYqwUmFupQ98Le7tGstDv3uUhHAwAzyPiicixw
247+
base: QmUqS6BAVQgvstEsVrxuwsu1DwQdfAdj3Q6gz2j3DbUYQ9
248248
graft_pruned:
249249
# FXPoolDeployerTracker start block
250250
block: 54559455
251251
# this will be the base of the pruned deployment, so it is ok if it is a pruned subgraph
252-
base: Qmd6J5P1KYqwUmFupQ98Le7tGstDv3uUhHAwAzyPiicixw
252+
base: QmUqS6BAVQgvstEsVrxuwsu1DwQdfAdj3Q6gz2j3DbUYQ9
253253
EventEmitter:
254254
address: "0xcdcECFa416EE3022030E707dC3EA13a8997D74c8"
255255
startBlock: 38152461
@@ -377,10 +377,10 @@ arbitrum:
377377
network: arbitrum-one
378378
graft:
379379
# FXPoolDeployerTracker start block
380-
block: 191573392
380+
# block: 191573392
381381
# always make sure the base subgraph has not been pruned
382382
# it should be possible to run time travel queries on it going back to the vault's startBlock
383-
base: Qmdwyva2Qn28ZA1NDffAajmWKG8MgruNFZH5BKs2ZWMX4b
383+
# base: Qmdwyva2Qn28ZA1NDffAajmWKG8MgruNFZH5BKs2ZWMX4b
384384
EventEmitter:
385385
address: "0x8f32D631093B5418d0546f77442c5fa66187E59D"
386386
startBlock: 53475240
@@ -527,8 +527,8 @@ bnb:
527527
gnosis:
528528
network: gnosis
529529
graft:
530-
block: 33759936
531-
base: "QmSBvRxXZbusTtbLUPRreeo1GDigfEYPioYVeWZqHRMZpV"
530+
# block: 33759936
531+
# base: "QmSBvRxXZbusTtbLUPRreeo1GDigfEYPioYVeWZqHRMZpV"
532532
EventEmitter:
533533
address: "0xd8bf95b44772213905a8a74881862347acbabc48"
534534
startBlock: 26892431
@@ -590,10 +590,10 @@ optimism:
590590
network: optimism
591591
graft:
592592
# Apr-11-2024 03:19:37 PM +UTC
593-
block: 118625000
593+
# block: 118625000
594594
# always make sure the base subgraph has not been pruned
595595
# it should be possible to run time travel queries on it going back to the vault's startBlock
596-
base: QmdDQKt3Q8AaWHmTKGLFXxsgrEikNSofqMu7LqYtTGntKh
596+
# base: QmdDQKt3Q8AaWHmTKGLFXxsgrEikNSofqMu7LqYtTGntKh
597597
EventEmitter:
598598
address: "0x082990116f256E078572a1b69772115d2cF6b0a2"
599599
startBlock: 99124541

schema.graphql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ type Pool @entity {
2424
symbol: String
2525
name: String
2626

27+
isInitialized: Boolean
28+
2729
"Indicates if a pool can be swapped against. Combines multiple sources, including offchain curation"
2830
swapEnabled: Boolean!
2931

src/mappings/poolFactory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ function handleNewPool(event: PoolCreated, poolId: Bytes, swapFee: BigInt): Pool
798798
pool.tx = event.transaction.hash;
799799
pool.swapEnabled = true;
800800
pool.swapEnabledInternal = true;
801+
pool.isInitialized = false;
801802
pool.isPaused = false;
802803

803804
let bpt = getToken(poolAddress);

src/mappings/vault.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ function handlePoolJoined(event: PoolBalanceChanged): void {
157157
return;
158158
}
159159

160+
if (!pool.isInitialized) pool.isInitialized = true;
161+
160162
// if a pool that was paused is joined, it means it's pause has expired
161163
// TODO: fix this for when pool.isPaused is null
162164
// TODO: handle the case where the pool's actual swapEnabled is false

0 commit comments

Comments
 (0)