diff --git a/networks.yaml b/networks.yaml index 29d80ce8..8c3a4daa 100644 --- a/networks.yaml +++ b/networks.yaml @@ -2,10 +2,10 @@ mainnet: network: mainnet graft: # Apr-11-2024 02:34:11 PM +UTC - block: 19633000 + # block: 19633000 # always make sure the base subgraph has not been pruned # it should be possible to run time travel queries on it going back to the vault's startBlock - base: QmX6XKG5dSUf2FjKpeAdVPjbZSZ5qptnGGegHcwk4367Ph + # base: QmX6XKG5dSUf2FjKpeAdVPjbZSZ5qptnGGegHcwk4367Ph EventEmitter: address: "0x1ACfEEA57d2ac674d7E65964f155AB9348A6C290" startBlock: 16419620 diff --git a/src/mappings/vault.ts b/src/mappings/vault.ts index 1c0622ca..c6f8063e 100644 --- a/src/mappings/vault.ts +++ b/src/mappings/vault.ts @@ -253,6 +253,8 @@ function handlePoolJoined(event: PoolBalanceChanged): void { } } + pool.save(); + // Managed, StablePhantom and ComposableStable pools only emit the PoolBalanceChanged event // with a non-zero value for the BPT amount when the pool is initialized, // when the amount of BPT informed in the event corresponds to the "excess" BPT that was preminted @@ -267,6 +269,9 @@ function handlePoolJoined(event: PoolBalanceChanged): void { } } pool.totalShares = pool.totalShares.minus(scaledPreMintedBpt); + + pool.save(); + // This amount will also be transferred to the vault, // causing the vault's 'user shares' to incorrectly increase, // so we need to negate it. We do so by processing a mock transfer event @@ -288,8 +293,6 @@ function handlePoolJoined(event: PoolBalanceChanged): void { handleTransfer(mockEvent); } - pool.save(); - updatePoolLiquidity(poolId, event.block.number, event.block.timestamp); }