-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Add freeze all assets spell, integration for all assets (SC-243) #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/spells/EmergencySpell_SparkLend_FreezeAllAssets.sol
looks good.
I couldn't finish tests review. I'll come back to it asap.
assertTrue(authority.hat() != address(freezeAssetSpell)); | ||
assertTrue( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of assertTrue
and !
why not just use assertFalse
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(in all of the cases with this pattern)
test/IntegrationTests.t.sol
Outdated
poolConfig.setSupplyCap(asset, 68_719_476_735); // MAX_SUPPLY_CAP | ||
poolConfig.setBorrowCap(asset, 68_719_476_735); // MAX_BORROW_CAP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where these numbers exactly come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes, but also just realized both spells should have a flag set so that it can only be fired once. We will deploy a new spell for each time we want to use this. Otherwise users can freeze the market over and over until the hat changes. Additional tests should be added to ensure the precrafted spells can only execute at most once.
Also, the spell unfreezing wbtc and dai ltv to 0 will execute tomorrow, so let's get those changes added before merging this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change then good to merge.
Coverage after merging sc-243-add-freeze-all into master will be
Coverage Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge.
No description provided.