-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: add complex vouchers #60
Conversation
ab8aed6
to
34b2333
Compare
34b2333
to
9799cc3
Compare
9799cc3
to
c1e7b1b
Compare
This feature has been postponed to v2, as it can much appreciate from the output unification effort. |
// assert the counter starts as 0 | ||
assertEq(counter.get(), 0); | ||
|
||
// try to execute voucher 1 and fail |
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.
should be voucher 2, right?
abi.encodeWithSelector( | ||
ComplexVouchers.checkIfVoucherWasExecuted.selector, | ||
dapp, | ||
7, |
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.
probably better using uint256(OutputName.IncVoucher)
rather than number 7
|
||
success = executeVoucher(voucher, proof); | ||
assertEq(success, false); | ||
|
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.
could add assertEq(counter.get(), 0);
here
assertEq(success, false); | ||
|
||
rewind(2 hours); | ||
|
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.
could add assertEq(counter.get(), 0);
here
success = executeVoucher(voucher, proof); | ||
assertEq(success, true); | ||
|
||
assertEq(address(complex).balance, 0); |
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'm curious about this line. Should we check balance?
@ZzzzHui This PR is blocked by the |
We'll have to rewrite this using the to-be-implemented |
Closes #59