Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
test(contracts): log vouchers with value
Browse files Browse the repository at this point in the history
* Fix output proof generation system to encode vouchers with the
  newly-added `value` field as well.
  • Loading branch information
guidanoli committed Jul 24, 2023
1 parent 0d71654 commit f5af1fa
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions onchain/rollups/test/foundry/dapp/CartesiDApp.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,18 @@ contract CartesiDAppTest is TestBase {
function logVoucher(
uint256 number,
address destination,
uint256 value,
bytes memory payload
) internal view {
logOutput(number, this.encodeVoucher(destination, payload));
logOutput(number, this.encodeVoucher(destination, value, payload));
}

function logVoucher(
uint256 number,
address destination,
bytes memory payload
) internal view {
logVoucher(number, destination, 0, payload);
}

function logNotice(uint256 number, bytes memory notice) internal view {
Expand Down Expand Up @@ -728,8 +737,9 @@ contract CartesiDAppTest is TestBase {

function encodeVoucher(
address destination,
uint256 value,
bytes calldata payload
) external pure returns (bytes memory) {
return OutputEncoding.encodeVoucher(destination, payload);
return OutputEncoding.encodeVoucher(destination, value, payload);
}
}

0 comments on commit f5af1fa

Please sign in to comment.