-
Notifications
You must be signed in to change notification settings - Fork 224
Lazy oracle unit tests #1192
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
base: feat/testnet-2
Are you sure you want to change the base?
Lazy oracle unit tests #1192
Conversation
Hardhat Unit Tests Coverage Summary
Diff against master
Results for commit: ad33d44 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
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.
Leaved a few comments, looks good in general.
context("sanity params", () => { | ||
it("update quarantine period", async () => { | ||
await lazyOracle.grantRole(await lazyOracle.UPDATE_SANITY_PARAMS_ROLE(), deployer.address); | ||
await lazyOracle.updateSanityParams(250000n, 1000n); |
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.
I think it would be useful to add test case when address without UPDATE_SANITY_PARAMS_ROLE
tries to call updateSanityParams
function (with revert).
vaultReport3[3], | ||
vaultReport3[4], | ||
tree3.getProof(0), | ||
); |
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.
Here we can check QuarantinedDeposit
event
vaultReport4[3], | ||
vaultReport4[4], | ||
tree4.getProof(0), | ||
); |
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.
Here we can check QuarantineExpired
event
}); | ||
|
||
context("handleSanityChecks", () => { | ||
it("limit", async () => { |
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.
I think it would be valuable to add test for this logic:
some percentage of funds hasn't passed through the vault's balance is allowed for the EL and CL rewards handling
Lazy oracle unit tests (batch and count)