-
Notifications
You must be signed in to change notification settings - Fork 402
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
Sudo entry point #433
Sudo entry point #433
Conversation
Codecov Report
@@ Coverage Diff @@
## master #433 +/- ##
==========================================
+ Coverage 55.34% 55.47% +0.13%
==========================================
Files 39 39
Lines 4022 4043 +21
==========================================
+ Hits 2226 2243 +17
- Misses 1616 1618 +2
- Partials 180 182 +2
|
51721e9
to
590ca27
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.
Very nice 👍 . Only minor nit on the test example
|
||
// now the community wants to get paid via sudo | ||
msg := sudoMsg{ | ||
StealFunds: stealFundsMsg{ |
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.
Not sure if this is the best use case of this function 🤣
👮👮👮 But more serious, people tend to not understand jokes very well when it comes to money or security. Maybe some additional context can help tot explain that this is not about stealing money but calling a privileged function in the contract that would otherwise not be available. This example would not work with random contract but only with the hackatom example that had this stealFundsMsg
function added for this particular demo case. We do not encourage people to build backdoors into their contracts... 👮 👮👮
🤣 🤣 🤣
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 will add a comment. I added it in CosmWasm as a funny example.
Our first tutorial of cosmwasm was to modify the escrow contract to add a backdoor. And then said this is why it is essential you verify the actual rust code.
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.
Rebased and added a comment in 311be37
5f7e587
to
311be37
Compare
Closes #420
Merge after #432 (this is based on that)
Note the entry point name changed from system -> sudo after some discussions in CosmWasm