Skip to content

Commit

Permalink
feat!: change output encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
guidanoli committed Aug 28, 2023
1 parent 39c0875 commit b85edc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Encode outputs with `abi.encodeWithSignature`

## [1.0.0] 2023-08-22

### Added
Expand Down
9 changes: 7 additions & 2 deletions onchain/rollups/contracts/common/OutputEncoding.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ library OutputEncoding {
function encodeNotice(
bytes calldata notice
) internal pure returns (bytes memory) {
return abi.encode(notice);
return abi.encodeWithSignature("Notice(bytes)", notice);
}

/// @notice Encode a voucher.
Expand All @@ -24,6 +24,11 @@ library OutputEncoding {
address destination,
bytes calldata payload
) internal pure returns (bytes memory) {
return abi.encode(destination, payload);
return
abi.encodeWithSignature(
"Voucher(address,bytes)",
destination,
payload
);
}
}

0 comments on commit b85edc5

Please sign in to comment.