diff --git a/libs/ftso-core/src/IndexerClient.ts b/libs/ftso-core/src/IndexerClient.ts index 0e7b9ac..f7d8b0a 100644 --- a/libs/ftso-core/src/IndexerClient.ts +++ b/libs/ftso-core/src/IndexerClient.ts @@ -394,13 +394,21 @@ export class IndexerClient { const result: TLPEvents[] = []; // TEMP CHANGE for upgrading Relay contract, can be removed in December 2024 - if (CONTRACTS.Relay.address == "0xA300E71257547e645CD7241987D3B75f2012E0E3") { - const oldRelay = { - ...CONTRACTS.Relay, - address: "0x32D46A1260BB2D8C9d5Ab1C9bBd7FF7D7CfaabCC", // Old Relay address for Coston - }; + const network = process.env.NETWORK as networks; - result.push(...(await this.queryEvents(oldRelay, eventName, fromStartTime))); + const oldSongbirdRelay = "0xbA35e39D01A3f5710d1e43FC61dbb738B68641c4"; + if (network == "songbird" && CONTRACTS.Relay.address != oldSongbirdRelay) { + this.logger.log(`Querying old Relay address for Songbird: ${oldSongbirdRelay}`); + result.push( + ...(await this.queryEvents({ ...CONTRACTS.Relay, address: oldSongbirdRelay }, eventName, fromStartTime)) + ); + } + const oldCostonRelay = "0x32D46A1260BB2D8C9d5Ab1C9bBd7FF7D7CfaabCC"; + if (network == "coston" && CONTRACTS.Relay.address != oldCostonRelay) { + this.logger.log(`Querying old Relay address for Coston: ${oldCostonRelay}`); + result.push( + ...(await this.queryEvents({ ...CONTRACTS.Relay, address: oldCostonRelay }, eventName, fromStartTime)) + ); } // END TEMP CHANGE diff --git a/libs/ftso-core/src/configs/networks.ts b/libs/ftso-core/src/configs/networks.ts index 828d0fa..ecc9ee1 100644 --- a/libs/ftso-core/src/configs/networks.ts +++ b/libs/ftso-core/src/configs/networks.ts @@ -54,14 +54,14 @@ const COSTON2_CONFIG: NetworkContractAddresses = { const SONGBIRD_CONFIG: NetworkContractAddresses = { FlareSystemsManager: { name: "FlareSystemsManager", address: "0x421c69E22f48e14Fc2d2Ee3812c59bfb81c38516" }, FtsoRewardOffersManager: { name: "FtsoRewardOffersManager", address: "0x5aB9cB258a342001C4663D9526A1c54cCcF8C545" }, - RewardManager: { name: "RewardManager", address: "0x8A80583BD5A5Cd8f68De585163259D61Ea8dc904" }, + RewardManager: { name: "RewardManager", address: "0xE26AD68b17224951b5740F33926Cc438764eB9a7" }, Submission: { name: "Submission", address: "0x2cA6571Daa15ce734Bbd0Bf27D5C9D16787fc33f" }, - Relay: { name: "Relay", address: "0xbA35e39D01A3f5710d1e43FC61dbb738B68641c4" }, + Relay: { name: "Relay", address: "0x0D462d2Fec11554D64F52D7c5A5C269d748037aD" }, FlareSystemsCalculator: { name: "FlareSystemsCalculator", address: "0x126FAeEc75601dA3354c0b5Cc0b60C85fCbC3A5e" }, VoterRegistry: { name: "VoterRegistry", address: "0x31B9EC65C731c7D973a33Ef3FC83B653f540dC8D" }, FtsoMerkleStructs: { name: "FtsoMerkleStructs", address: "" }, ProtocolMerkleStructs: { name: "ProtocolMerkleStructs", address: "" }, - FastUpdater: { name: "FastUpdater", address: "0x70e8870ef234EcD665F96Da4c669dc12c1e1c116" }, + FastUpdater: { name: "FastUpdater", address: "0x7D9F73FD9bC4607daCB618FF895585f98BFDD06B" }, FastUpdateIncentiveManager: { name: "FastUpdateIncentiveManager", address: "0x596C70Ad6fFFdb9b6158F1Dfd0bc32cc72B82006",