This repository has been archived by the owner on Mar 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(contracts)!: payable vouchers (WIP)
* Add an `executeVoucher` function to `ICartesiDApp` and `CartesiDApp` with an extra `uint256` parameter called `_value`, which is the amount of Wei to be sent along the message call. Backwards compatibility is kept with the old signature by passing 0 Wei by default. * Use a TEMPORARY workaround to test the validation of payable vouchers, by encoding outputs using `abi.encodePacked` instead of `abi.encode` and using the notice tree as the voucher tree. Changes related to this TEMPORARY workaround will be reverted when a new version of the machine that supports payable vouchers is available. BREAKING CHANGE: Changes the encoding of vouchers from `abi.encode(destination, payload)` to `abi.encode(destination, value, payload)`. This change is planned but not yet executed as we need the machine to encode vouchers in such a way in order to validate them on-chain.
- Loading branch information
Showing
6 changed files
with
70 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters