Skip to content

Commit

Permalink
fix offset for event data as well and add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
0age committed Feb 29, 2024
1 parent a26c1e7 commit 4d5138d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/core/lib/BasicOrderFulfiller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ contract BasicOrderFulfiller is OrderValidator {
* item to the consideration array in OrderFulfilled.
*/

// Get the length of the additional recipients array.
// Get the additional recipients array length from calldata.
// This variable will later be repurposed to track the total
// original additional recipients instead of the total supplied.
let totalAdditionalRecipients :=
calldataload(BasicOrder_additionalRecipients_length_cdPtr)

Expand Down Expand Up @@ -636,8 +638,9 @@ contract BasicOrderFulfiller is OrderValidator {
// be combined to guard against providing dirty upper bits.
let combinedAdditionalRecipients

// Read length of the additionalRecipients array from calldata
// and iterate.
// Only iterate over the total original additional recipients
// (not the total supplied additional recipients) when deriving
// the order hash.
totalAdditionalRecipients := calldataload(
BasicOrder_totalOriginalAdditionalRecipients_cdPtr
)
Expand Down Expand Up @@ -1009,7 +1012,7 @@ contract BasicOrderFulfiller is OrderValidator {
shl(
OneWordShift,
calldataload(
BasicOrder_additionalRecipients_length_cdPtr
BasicOrder_totalOriginalAdditionalRecipients_cdPtr
)
)
)
Expand Down

0 comments on commit 4d5138d

Please sign in to comment.