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

feat: add complex vouchers #60

Closed
wants to merge 1 commit into from
Closed

Conversation

guidanoli
Copy link
Collaborator

Closes #59

@guidanoli guidanoli self-assigned this Sep 1, 2023
@guidanoli guidanoli force-pushed the feature/complex-vouchers branch 2 times, most recently from ab8aed6 to 34b2333 Compare September 6, 2023 18:19
@guidanoli guidanoli force-pushed the feature/complex-vouchers branch from 34b2333 to 9799cc3 Compare September 13, 2023 15:24
@guidanoli guidanoli force-pushed the feature/complex-vouchers branch from 9799cc3 to c1e7b1b Compare September 15, 2023 04:32
@guidanoli guidanoli marked this pull request as draft September 19, 2023 19:27
@guidanoli
Copy link
Collaborator Author

This feature has been postponed to v2, as it can much appreciate from the output unification effort.

@guidanoli guidanoli removed the request for review from xdaniortega October 24, 2023 15:07
// assert the counter starts as 0
assertEq(counter.get(), 0);

// try to execute voucher 1 and fail
Copy link
Contributor

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,
Copy link
Contributor

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);

Copy link
Contributor

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);

Copy link
Contributor

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);
Copy link
Contributor

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?

@guidanoli
Copy link
Collaborator Author

@ZzzzHui This PR is blocked by the DELEGATECALL voucher feature.

@guidanoli
Copy link
Collaborator Author

We'll have to rewrite this using the to-be-implemented DELEGATECALL feature.

@guidanoli guidanoli closed this Apr 4, 2024
@guidanoli guidanoli deleted the feature/complex-vouchers branch October 30, 2024 16:49
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.

Complex Vouchers
4 participants