Skip to content

Commit 50167b3

Browse files
committed
forge fmt
1 parent 9566b73 commit 50167b3

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

contracts/src/BoundlessMarket.sol

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ contract BoundlessMarket is
260260
Fulfillment calldata fill = fills[i];
261261
predicateTypes[i] = fill.predicateType;
262262

263-
264263
leaves[i] = AssessorCommitment(i, fill.id, fill.requestDigest, fill.claimDigest).eip712Digest();
265264

266265
// If the requestor did not specify a selector, we verify with DEFAULT_MAX_GAS_FOR_VERIFY gas limit.
@@ -340,31 +339,24 @@ contract BoundlessMarket is
340339
uint256 callbackIndexPlusOne = fillToCallbackIndexPlusOne[i];
341340
// We do not support callbacks for claim digest matches.
342341
if ((fill.predicateType != PredicateType.ClaimDigestMatch) && (callbackIndexPlusOne > 0)) {
343-
(
344-
bytes32 imageId,
345-
bytes calldata journal
346-
) = _decodeCallbackData(fill.callbackData);
342+
(bytes32 imageId, bytes calldata journal) = _decodeCallbackData(fill.callbackData);
347343

348344
AssessorCallback calldata callback = assessorReceipt.callbacks[callbackIndexPlusOne - 1];
349345
_executeCallback(fill.id, callback.addr, callback.gasLimit, imageId, journal, fill.seal);
350346
}
351347
}
352348
}
353349

354-
function _decodeCallbackData(bytes calldata data)
355-
internal
356-
pure
357-
returns (bytes32 imageId, bytes calldata journal)
358-
{
350+
function _decodeCallbackData(bytes calldata data) internal pure returns (bytes32 imageId, bytes calldata journal) {
359351
assembly {
360352
// Extract imageId (first 32 bytes after length)
361353
imageId := calldataload(add(data.offset, 0x20))
362-
354+
363355
// Extract journal offset and create calldata slice
364356
let journalOffset := calldataload(add(data.offset, 0x40))
365357
let journalPtr := add(data.offset, add(0x20, journalOffset))
366358
let journalLength := calldataload(journalPtr)
367-
359+
368360
journal.offset := add(journalPtr, 0x20)
369361
journal.length := journalLength
370362
}

contracts/src/types/CallbackData.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using CallbackDataLibrary for CallbackData global;
1010
/// @notice Represents a callback configuration for proof delivery
1111
struct CallbackData {
1212
/// @notice Image ID of the guest that was verifiably executed to satisfy the request.
13-
bytes32 imageId;
13+
bytes32 imageId;
1414
/// @notice Journal committed by the guest program execution.
1515
/// @dev The journal is checked to satisfy the predicate specified on the request's requirements.
1616
bytes journal;

contracts/test/BoundlessMarket.t.sol

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,7 @@ contract BoundlessMarketTest is Test {
384384
PredicateType predicateType = requests[i].requirements.predicate.predicateType;
385385
if (predicateType != PredicateType.ClaimDigestMatch) {
386386
claimDigest = ReceiptClaimLib.ok(requests[i].requirements.imageId, sha256(journal)).digest();
387-
callbackData = abi.encode(
388-
CallbackData({
389-
imageId: requests[i].requirements.imageId,
390-
journal: journal
391-
})
392-
);
387+
callbackData = abi.encode(CallbackData({imageId: requests[i].requirements.imageId, journal: journal}));
393388
} else {
394389
claimDigest = bytesToBytes32(requests[i].requirements.predicate.data);
395390
}
@@ -502,7 +497,7 @@ contract BoundlessMarketTest is Test {
502497

503498
function bytesToBytes32(bytes memory b) internal pure returns (bytes32) {
504499
bytes32 out;
505-
for (uint i = 0; i < 32; i++) {
500+
for (uint256 i = 0; i < 32; i++) {
506501
out |= bytes32(b[i] & 0xFF) >> (i * 8);
507502
}
508503
return out;

crates/boundless-market/src/contracts/artifacts/CallbackData.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using CallbackDataLibrary for CallbackData global;
1010
/// @notice Represents a callback configuration for proof delivery
1111
struct CallbackData {
1212
/// @notice Image ID of the guest that was verifiably executed to satisfy the request.
13-
bytes32 imageId;
13+
bytes32 imageId;
1414
/// @notice Journal committed by the guest program execution.
1515
/// @dev The journal is checked to satisfy the predicate specified on the request's requirements.
1616
bytes journal;

0 commit comments

Comments
 (0)