-
Notifications
You must be signed in to change notification settings - Fork 504
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
Permission smart contract deployment #692
Permission smart contract deployment #692
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #692 +/- ##
===========================================
+ Coverage 48.72% 48.79% +0.07%
===========================================
Files 112 112
Lines 15432 15460 +28
===========================================
+ Hits 7519 7544 +25
- Misses 7279 7281 +2
- Partials 634 635 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Code coverage is affected because we don't have tests for commands 😭 |
Save the excuses for the coverage police 👮♂️ |
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.
Just small comments
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.
Make linty happy and we can merge 👍
Description
This PR implements permission smart contract deployment feature.
How it works:
The idea behind this feature is that we want to enable nodes to restrict who can deploy smart contracts. We've decided to add a deployment whitelist and only addresses inside this list can deploy smart contracts. When the deployment whitelist is empty anyone can deploy contracts
To make this easy to use, we've added a few CLI commands:
go run main.go whitelist deployment --add 0x5383Cb489FaCa92365Bb6f9f1FB40bD032E6365d --add 0x5383Cb489FaCa92365Bb6f9f1FB40bD032E6365d
go run main.go whitelist deployment --remove 0x5383Cb489FaCa92365Bb6f9f1FB40bD032E6365d --remove 0x5383Cb489FaCa92365Bb6f9f1FB40bD032E6365d
After changing the deployment whitelist, nodes should be restarted to fetch the latest whitelist from genesis config
go run main.go whitelist show
Changes include
Checklist
Testing
Manual tests
Scenarios covered by unit tests:
Deployment whitelist is empty anyone can deploy:
Addresses inside the whitelist can deploy smart contract
Other scenarios
Documentation update
After the first round of reviews, I will write docs
Additional comments
Fixes EDGE-735