-
Notifications
You must be signed in to change notification settings - Fork 6
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
document authorizeOrder_calldata_baseOffset
more
#59
Conversation
uint256 constant authorizeOrder_calldata_baseOffset = 0x80; // 0x200 - 0x180 | ||
uint256 constant authorizeOrder_calldata_baseOffset = OrderFulfilled_offer_length_baseOffset - 0x180; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be nicer. But I think in general in this file, the authors have been just inling the final value and added comments on how that final value was derived.
cc: @0age
* Note that the padded calldata selector will be at minimum at the | ||
* 0x80 memory slot if no total original additional recipients were provided | ||
* 0x80 memory slot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should not be removed as it refers to the pointer to the padded call data selector and not just the base offset amount calculated here authorizeOrder_calldata_baseOffset
.
This pointer will be at:
authorizeOrder_calldata_baseOffset + 0x20 * totalOriginalAdditionalRecipients
This note just warns that we would not enter the [0x00 - 0x80)
region of the memory which is used by the compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps can be made more elaborate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hashing and event data memory region starts from 0x80
onwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get it now, yes, of course we need to talk about absolute memory locations here. Makes sense, let's add it back.
authorizeOrder_calldata_baseOffset
is relative toOrderFulfilled_offer_length_baseOffset
. Matches the memory layout comment above it nicely.