Skip to content

Commit

Permalink
Temporary - exclude Fuji GDA broken distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
ngmachado committed Oct 31, 2023
1 parent ad8ed26 commit 15839b9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/boot/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@ class Bootstrap {

const cfaFlows = await this.app.db.queries.getLastCFAFlows(blockNumber);
const gdaFlows = await this.app.db.queries.getLastGDAFlows(blockNumber);
const flows = [...cfaFlows, ...gdaFlows];

// AVOID AVAX PROBLEMATIC FLOWS - TODO: REMOVE THIS AFTER PROTOCOL FIX -----v
const receiversFilter = ["0x98111049a4b760FAEdAF95ffC9E5DFB80846ae10", "0xf3AFf6EFdaADE25A1dD04f58b0ff8a2F2e16B07b", "0x254DE04a9d7284205475DCd4c07D08d2cB633A9C"];
const filteredGDAFlows = gdaFlows.filter((flow) => (
flow.sender !== "0xa9e3725CeE7b6C807665d41D603d6d0F71C27044" &&
flow.superToken !== "0x24f3631dbbf6880C684c5e59578C21194e285Baf" &&
!receiversFilter.includes(flow.receiver)
));
// ^----- AVOID AVAX PROBLEMATIC FLOWS - TODO: REMOVE THIS AFTER PROTOCOL FIX

const flows = [...cfaFlows, ...filteredGDAFlows];
for (const flow of flows) {
try {
await this.app.db.models.AgreementModel.upsert({
Expand Down Expand Up @@ -81,6 +91,7 @@ class Bootstrap {
systemInfo.blockNumber = currentBlockNumber;
await systemInfo.save();
this.app.logger.info("finish bootstrap");

return currentBlockNumber;
} catch (err) {
this.app.logger.error(err);
Expand Down

0 comments on commit 15839b9

Please sign in to comment.