-
Notifications
You must be signed in to change notification settings - Fork 23
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 unpauser role #384
Conversation
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: srdtrk <[email protected]>
This reverts commit b5c6526.
1a2689a
to
5d47c0b
Compare
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.
Looks mostly OK to me, but would like tests added similar to the pauser tests. Also added some minor comments
@@ -26,7 +26,7 @@ jobs: | |||
forge script scripts/deployments/DeployProxiedICS20Transfer.sol -vvv --broadcast --private-key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | |||
forge script scripts/deployments/DeploySP1ICS07Tendermint.sol -vvv --broadcast --private-key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | |||
forge script scripts/deployments/PauseTransfers.sol -vvv --broadcast --private-key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | |||
forge script scripts/deployments/UnpauseTransfers.sol -vvv --broadcast --private-key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | |||
forge script scripts/deployments/UnpauseTransfers.sol -vvv --broadcast --private-key 59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d |
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.
Why did this change?
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 wanted the workflow to test that the pauser and unpauser are two different wallets, and as such the private keys for them are different
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.
that's reflected in the deployments/local/31337.json file, specifically the pauser
and unpauser
fields.
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'm guessing that the reason why e2e tests aren't passing is because somewhere in the deployment script, ics20transfer.initialize was encoded with a abi.encodeWithSelector
instead of abi.encodeCall
. So it cannot validate the syntax. It is specifically here.
You may fix this now. There is a general issue for this #321, which we can address in a separate PR after this.
@@ -103,6 +103,7 @@ abstract contract Deployments { | |||
|
|||
// admin control | |||
address pauser; | |||
address unpauser; |
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.
note that there could be multiple wallets with these roles
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.
yeah, I'm going to refactor this logic to take multiple addresses for both pauser and unpauser in a different PR.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #384 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 14 14
Lines 731 740 +9
=======================================
+ Hits 730 739 +9
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Looks really good. I didn't notice if there is any test case where unpause
succeeds. If so, you can reply to my comment and then we can merge it. Otherwise, please add it to your tests.
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.
lgtm
Description
Adds an
UNPAUSER_ROLE
which can unpause the protocol. This is done to separate the pauser role from the unpauser. The pauser role is going to have more lax requirements to be able to respond to incidents quickly, while we want the unpauser role to be more strict.Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.