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

distributeでの_amounts[index]>0のreportに対するバリデーション #21

Open
yudetamago opened this issue Jul 7, 2019 · 0 comments

Comments

@yudetamago
Copy link

assert not self.requests[_uuid].reporters[index] == msg.sender
# Guard 4: whether the reporter has been approved
assert self.requests[_uuid].reporterApprovements[index]
# Guard 5: whether the report has been submitted
assert not self.requests[_uuid].reports[index] == EMPTY_BYTES32

この辺って必要なんでしたっけ?

assert not self.requests[_uuid].reporters[index] == msg.sender

assert not self.requests[_uuid].owner == msg.sender

でそもそもapplyがowner以外でないと出来ない。

assert self.requests[_uuid].reporterApprovements[index]
#15 の対応をすればそもそもapproveされないとsubmitが出来ない。
#15 の対応をしないならばこれは必要。)

assert not self.requests[_uuid].reports[index] == EMPTY_BYTES32

if self.requests[_uuid].reports[index] == EMPTY_BYTES32:
continue

ここでreportが EMPTY_BYTES32 の場合はcontinueにしているのでいつもTrueになる

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

No branches or pull requests

1 participant