-
Notifications
You must be signed in to change notification settings - Fork 1
Stake in a box #314 #315 #316
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: develop
Are you sure you want to change the base?
Conversation
it is needed when handling notifications in other contacts
cyber.box/src/cyber.box.cpp
Outdated
| auto box_itr = boxes_idx.find({contract, title}); | ||
| eosio::check(box_itr != boxes_idx.end(), "box does not exist"); | ||
| require_auth(box_itr->owner); | ||
| if (!box_itr->empty && release) { |
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 contract should prohibit unpack empty box.
cyber.box/src/cyber.box.cpp
Outdated
| boxes_idx.erase(box_itr); | ||
| } | ||
|
|
||
| void box::unpack(name contract, name treasurer, name title) { |
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.
unpack and burn can take owner as argument. In this case unpack can send notification to contract instead call contract's release action. These modification enable to use release` action to self-purposes for contract.
No description provided.