Skip to content

Commit 7dd797c

Browse files
committed
Add flag in Filfillment solidity struct to indicate is imageId is claimDigest
1 parent 00572d1 commit 7dd797c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

contracts/src/BoundlessMarket.sol

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,10 @@ contract BoundlessMarket is
255255
// Verify the application receipts.
256256
for (uint256 i = 0; i < fills.length; i++) {
257257
Fulfillment calldata fill = fills[i];
258-
259-
bytes32 claimDigest = ReceiptClaimLib.ok(fill.imageId, sha256(fill.journal)).digest();
258+
bytes32 claimDigest = fill.imageId;
259+
if (!fill.isClaimDigest) {
260+
claimDigest = ReceiptClaimLib.ok(fill.imageId, sha256(fill.journal)).digest();
261+
}
260262
leaves[i] = AssessorCommitment(i, fill.id, fill.requestDigest, claimDigest).eip712Digest();
261263

262264
// If the requestor did not specify a selector, we verify with DEFAULT_MAX_GAS_FOR_VERIFY gas limit.

contracts/src/types/Fulfillment.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ struct Fulfillment {
2828
/// @notice Cryptographic proof for the validity of the execution results.
2929
/// @dev This will be sent to the `IRiscZeroVerifier` associated with this contract.
3030
bytes seal;
31+
/// @notice Flag to indicate that the imageID is a claim digest.
32+
/// @dev If true, the imageId is a claim digest instead of an image ID.
33+
bool isClaimDigest;
3134
}
3235

3336
library FulfillmentLibrary {}

0 commit comments

Comments
 (0)