Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply remaining fixes from spearbit review #52

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/core/lib/ConsiderationDecoder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
Common_identifier_offset,
Common_token_offset,
ConsiderationItem_recipient_offset,
ConsiderationItem_size_with_length,
ConsiderationItem_size_with_head_pointer,
ConsiderationItem_size,
CriteriaResolver_criteriaProof_offset,
CriteriaResolver_fixed_segment_0,
Expand Down Expand Up @@ -1117,7 +1117,10 @@ contract ConsiderationDecoder {
mPtrLength,
add(
OneWord,
mul(newLength, ConsiderationItem_size_with_length)
mul(
newLength,
ConsiderationItem_size_with_head_pointer
)
)
)
)
Expand Down
4 changes: 2 additions & 2 deletions src/core/lib/FulfillmentApplier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ contract FulfillmentApplier is FulfillmentApplicationErrors {
// Create variable to track position in offerComponents head.
let fulfillmentHeadPtr := offerComponents

// Get position one word past last element in head of array.
// Get position of the last element in head of array.
let endPtr := add(
offerComponents,
shl(OneWordShift, mload(offerComponents))
Expand Down Expand Up @@ -589,7 +589,7 @@ contract FulfillmentApplier is FulfillmentApplicationErrors {
// Track position in considerationComponents head.
let fulfillmentHeadPtr := considerationComponents

// Get position one word past last element in head of array.
// Get position of the last element in head of array.
let endPtr :=
add(
considerationComponents,
Expand Down
2 changes: 1 addition & 1 deletion src/types/lib/ConsiderationConstants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ uint256 constant ReceivedItem_recipient_offset = 0x80;
uint256 constant ReceivedItem_CommonParams_size = 0x60;

uint256 constant ConsiderationItem_size = 0xc0;
uint256 constant ConsiderationItem_size_with_length = 0xe0;
uint256 constant ConsiderationItem_size_with_head_pointer = 0xe0;

uint256 constant ConsiderationItem_recipient_offset = 0xa0;
// Store the same constant in an abbreviated format for a line length fix.
Expand Down
Loading