Conversation
loop through orders again if restricted/contract present
…executions do not filter native token executions
…n-ben/ZoneContractOrderValidator linting, cleanup, and a tiny refactor
update version to 1.3
…before-checks move excess native token transfer to before post-execution checks
…dator Transfer Validation Zone/Offerer
refactor typehash lookup as while loop
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project 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 #984 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 47 47
Lines 2661 2671 +10
Branches 393 394 +1
=========================================
+ Hits 2661 2671 +10
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 at Codecov. |
…ost-execution TestTransferValidationZoneOfferer fulfillAvailable tests with conduit + Add sol helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seaport version 1.3 addresses two limitations inherent to version 1.2:
validateOrderandratifyOrder) under specific conditions (namely, when multiple orders are being fulfilled at once and conduits are utilized or there are unspent offer item amounts). 1.3 ensures that all token transfers across all fulfilled orders, even returning excess native tokens, occur before any restricted or contract order checks are performed. (Be sure not to transfer any tokens back to Seaport as part of zone or contract offerer logic as they will not be recoverable during the current fulfillment.) This change will make post-execution zone and contract offerers much easier to work with, as otherwise they would need to perform redundant checks and would require the fulfiller to specifically tailor their fulfillment methods to work around the transfer limitations — huge thanks to @androolloyd for raising this issue to the Seaport Working Group!generateOrder— in these cases, or as part of a match operation, those native tokens have already been supplied to Seaport by the time the execution is filtered, meaning the corresponding consideration item would not be accounted for and those native tokens would eventually be returned to the caller instead. (This means that offerers on 1.2 need to be very careful not to simultaneously offer native tokens and require native tokens as consideration items; this mainly affects contract offerers.) In 1.3, executions with native token item types are not filtered from the executions array.There are also some additional optimizations:
Finally, the version has been bumped from 1.2 to 1.3. There are additional changes required to bring the reference contracts fully in-line with the optimized contracts, and more tests to be written to validate the new behavior and ensure that coverage gaps with implementing zones and contract offerers are fully addressed, but (barring any unforeseen issues) this PR contains the full set of changes between Seaport 1.2 and 1.3.