diff --git a/projects/spectra/index.js b/projects/spectra/index.js index 87ea77c9e6a..a0dfa4546ae 100644 --- a/projects/spectra/index.js +++ b/projects/spectra/index.js @@ -7,6 +7,11 @@ module.exports = { methodology: `All deposited underlying in Spectra Principal Tokens and all underlying supplied as liquidity in Spectra Markets`, }; +const curvePoolDeployedTopic = + "0x3c7b686d948efcba31c9cfd1aeae78faac70fe0c1ed90d151d49c75e85027a91"; +const ptDeployedTopic = + "0xcf50c3e7162cc35f5befd4f0379ddd760d499ca96330c9ae8faa4059919caaee"; + Object.keys(config).forEach((chain) => { const { factory, fromBlock } = config[chain]; module.exports[chain] = { @@ -89,10 +94,12 @@ Object.keys(config).forEach((chain) => { const logs = await getLogs({ api, target: factory, + topic: curvePoolDeployedTopic, eventAbi: "event CurvePoolDeployed(address indexed poolAddress, address indexed ibt, address indexed pt)", onlyArgs: true, fromBlock: fromBlock, + extraKey: "markets", }); return logs.map((i) => [i.poolAddress, i.ibt]); } @@ -101,10 +108,12 @@ Object.keys(config).forEach((chain) => { const logs = await getLogs({ api, target: factory, + topic: ptDeployedTopic, eventAbi: "event PTDeployed(address indexed pt, address indexed poolCreator)", onlyArgs: true, fromBlock: fromBlock, + extraKey: "pts", }); return logs.map((i) => i.pt); }