-
Notifications
You must be signed in to change notification settings - Fork 591
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
Seaport v1.5 #1015
Seaport v1.5 #1015
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #1015 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 46 46
Lines 2650 2652 +2
Branches 396 396
=========================================
+ Hits 2650 2652 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
More error cases
fuzz on criteria items less frequently for performance
approval + insufficient native token failures
…-values-to-space add bulk sig height and index to space
Fix typos in comments
partial fill inscription fuzz testing
…orders-available No specified orders available
contract generate failures
Generate order skips
use lightly-modified reference code for FractionUtil
…pass add some comments to OrderValidator for partial fills
…checks check generateOrder + ratifyOrder calldata
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 PR fixes a minor bug, introduced in Seaport v1.3, that causes the
amount
parameter on spent offer item amounts reported to zones and contract offerers to be overwritten by therecipient
address on spent offer items with excess (or unspent) item amounts when usingmatch
orfulfillAvailable
methods.As part of these combined fulfillment methods, Seaport iterates over each supplied order and asserts that all consideration item amounts have been fully met while also checking for unspent offer item amounts. If an unspent offer item amount is located, it typecasts the offer item in-place to a received item and writes the designated recipient to memory, overwriting the
endAmount
parameter on the offer item, and uses that received item to perform a transfer, sending the excess offer item amounts to the designated recipient.Once all transfers have been fully processed, Seaport then iterates over each supplied order another time and performs a call to
validateOrder
on the zone (for restricted orders) orratifyOrder
on the offerer (for contract orders), encoding the call based on the order data in memory. Specifically, theendAmount
parameter is used to encode the amount for each item (the full amount is originally written to bothstartAmount
andendAmount
, butstartAmount
is used to debit offer items and credit consideration items during fulfillment). As offer items with excess item amounts have had this value overwritten with therecipient
value, Seaport erroneously reports theamount
on these offer items to the zone or contract offerer as being equal to the recipient address.The fix proposed in this PR reads the
endAmount
value and places the result on the stack prior to overwriting it with therecipient
value, then restores the originalendAmount
value immediately after performing the associated transfer.Aside from this patch, the only change to the contracts in this PR is to bump the version to 1.5.