Skip to content
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

Stake in a box #314 #315 #316

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Stake in a box #314 #315 #316

wants to merge 8 commits into from

Conversation

kaynarov
Copy link

@kaynarov kaynarov commented Mar 5, 2020

No description provided.

@kaynarov kaynarov added this to the Sprint-feb-24 milestone Mar 5, 2020
@kaynarov kaynarov self-assigned this Mar 5, 2020
cyber.box/src/cyber.box.cpp Outdated Show resolved Hide resolved
cyber.box/src/cyber.box.cpp Show resolved Hide resolved
cyber.box/src/cyber.box.cpp Show resolved Hide resolved
cyber.stake/src/cyber.stake.cpp Outdated Show resolved Hide resolved
kaynarov added 2 commits March 6, 2020 21:13
it is needed when handling notifications in other contacts
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) {

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.

boxes_idx.erase(box_itr);
}

void box::unpack(name contract, name treasurer, name title) {

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.

zxcat
zxcat previously approved these changes Mar 13, 2020
zxcat
zxcat previously approved these changes Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants