Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to add/update required filters. #241

Merged
merged 4 commits into from
Apr 28, 2021

Conversation

juniset
Copy link
Member

@juniset juniset commented Apr 28, 2021

  • Remove filter for cSAI and cREP
  • Add filters for cUNI and cUSDT
  • Add filter for WETH
  • Request filter update for Paraswap
  • Request filter update for ParaswapUniV2RouterFilter (Uniswap v2)
  • Request filter update for UniswapV2UniZapFilter

// Update existing filters to Argent Registry
// //////////////////////////////////

const filters = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to initialize it with existing filters:

const filters = {...config.filters};

console.log(`Deploying filter for Compound Underlying ${underlying}`);
const CompoundFilterWrapper = await CompoundFilter.new(underlying);
console.log(`Deployed filter for Compound Underlying ${underlying} at ${CompoundFilterWrapper.address}`);
filters.CompoundFilter.push(CompoundFilterWrapper.address);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will only work if filters has been initialized, see comment above ^

if (underlying === "0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359" || underlying === "0x1985365e9f78359a9B6AD760e32412f4a445E862") {
// remove SAI and REP filter
console.log(`Removing filter for Compound Underlying ${underlying}`);
await DappRegistryWrapper.removeDapp(0, cToken);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we remove the corresponding filters from the filters.CompoundFilter array?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤝

@juniset juniset merged commit 70f87ab into fix/update_filters Apr 28, 2021
@Muzcool
Copy link

Muzcool commented Oct 5, 2021

👌

1 similar comment
@Muzcool
Copy link

Muzcool commented Oct 5, 2021

👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants