From f57874d98e811f04dd37166ea870b572805bdaa9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Feb 2023 00:33:47 +0000 Subject: [PATCH 01/13] Bump cacheable-request from 10.2.3 to 10.2.7 Bumps [cacheable-request](https://github.com/jaredwray/cacheable-request) from 10.2.3 to 10.2.7. - [Release notes](https://github.com/jaredwray/cacheable-request/releases) - [Commits](https://github.com/jaredwray/cacheable-request/commits) --- updated-dependencies: - dependency-name: cacheable-request dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2214e8bb2..d3af98b91 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1576,13 +1576,13 @@ cacheable-lookup@^7.0.0: integrity sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w== cacheable-request@^10.2.1: - version "10.2.3" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-10.2.3.tgz#25277efe121308ab722c28b4164e51382b4adeb1" - integrity sha512-6BehRBOs7iurNjAYN9iPazTwFDaMQavJO8W1MEm3s2pH8q/tkPTtLDRUZaweWK87WFGf2Y5wLAlaCJlR5kOz3w== + version "10.2.7" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-10.2.7.tgz#8bb8da66338f321b3cbbc34a71ac231178171bcc" + integrity sha512-I4SA6mKgDxcxVbSt/UmIkb9Ny8qSkg6ReBHtAAXnZHk7KOSx5g3DTiAOaYzcHCs6oOdHn+bip9T48E6tMvK9hw== dependencies: "@types/http-cache-semantics" "^4.0.1" get-stream "^6.0.1" - http-cache-semantics "^4.1.0" + http-cache-semantics "^4.1.1" keyv "^4.5.2" mimic-response "^4.0.0" normalize-url "^8.0.0" @@ -3487,7 +3487,7 @@ http-basic@^8.1.1: http-response-object "^3.0.1" parse-cache-control "^1.0.1" -http-cache-semantics@^4.1.0: +http-cache-semantics@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== From 9656f878278296e58f32f01e60a35e745f011fa6 Mon Sep 17 00:00:00 2001 From: djviau Date: Wed, 15 Feb 2023 15:24:37 -0500 Subject: [PATCH 02/13] fix amount tracking bug in reference order combiner --- reference/lib/ReferenceOrderCombiner.sol | 7 +++++++ test/foundry/zone/PostFulfillmentCheck.t.sol | 17 ++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/reference/lib/ReferenceOrderCombiner.sol b/reference/lib/ReferenceOrderCombiner.sol index 833a34ea7..766f8ab64 100644 --- a/reference/lib/ReferenceOrderCombiner.sol +++ b/reference/lib/ReferenceOrderCombiner.sol @@ -311,6 +311,9 @@ contract ReferenceOrderCombiner is // Modify the OrderToExecute Spent Item Amount. orderToExecute.spentItems[j].amount = offerItem.startAmount; + // Modify the OrderToExecute Spent Item Original Amount. + orderToExecute.spentItemOriginalAmounts[j] = offerItem + .startAmount; } // Retrieve array of consideration items for order in question. @@ -362,6 +365,10 @@ contract ReferenceOrderCombiner is // Modify the OrderToExecute Received item amount. orderToExecute.receivedItems[j].amount = considerationItem .startAmount; + // Modify the OrderToExecute Received item original amount. + orderToExecute.receivedItemOriginalAmounts[ + j + ] = considerationItem.startAmount; } } diff --git a/test/foundry/zone/PostFulfillmentCheck.t.sol b/test/foundry/zone/PostFulfillmentCheck.t.sol index 3b43e8717..1d321c00c 100644 --- a/test/foundry/zone/PostFulfillmentCheck.t.sol +++ b/test/foundry/zone/PostFulfillmentCheck.t.sol @@ -554,15 +554,14 @@ contract PostFulfillmentCheckTest is BaseOrderTest { numTips: 0 }) ); - // todo: fix ref impl - // test( - // this.execFulfillAvailableAdvancedAscending, - // Context({ - // consideration: referenceConsideration, - // numOriginalAdditional: 0, - // numTips: 0 - // }) - // ); + test( + this.execFulfillAvailableAdvancedAscending, + Context({ + consideration: referenceConsideration, + numOriginalAdditional: 0, + numTips: 0 + }) + ); } function execFulfillAvailableAdvancedAscending( From 92a1b38d283258725a55fd3273be3bbd4b02ef41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Feb 2023 23:02:54 +0000 Subject: [PATCH 03/13] Bump undici from 5.13.0 to 5.19.1 Bumps [undici](https://github.com/nodejs/undici) from 5.13.0 to 5.19.1. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v5.13.0...v5.19.1) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2214e8bb2..58804f999 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6067,9 +6067,9 @@ underscore@>=1.12.1: integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== undici@>=5.8.2, undici@^5.4.0: - version "5.13.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.13.0.tgz#56772fba89d8b25e39bddc8c26a438bd73ea69bb" - integrity sha512-UDZKtwb2k7KRsK4SdXWG7ErXiL7yTGgLWvk2AXO1JMjgjh404nFo6tWSCM2xMpJwMPx3J8i/vfqEh1zOqvj82Q== + version "5.19.1" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.19.1.tgz#92b1fd3ab2c089b5a6bd3e579dcda8f1934ebf6d" + integrity sha512-YiZ61LPIgY73E7syxCDxxa3LV2yl3sN8spnIuTct60boiiRaE1J8mNWHO8Im2Zi/sFrPusjLlmRPrsyraSqX6A== dependencies: busboy "^1.6.0" From c84e61bec3c0b32f7be53ab7e4521b6cfade7f89 Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Fri, 17 Feb 2023 15:16:22 -0800 Subject: [PATCH 04/13] only call validateOrder / ratifyOrder on available orders --- contracts/lib/OrderCombiner.sol | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/contracts/lib/OrderCombiner.sol b/contracts/lib/OrderCombiner.sol index 648625a86..4f19cbfaa 100644 --- a/contracts/lib/OrderCombiner.sol +++ b/contracts/lib/OrderCombiner.sol @@ -885,12 +885,15 @@ contract OrderCombiner is OrderFulfiller, FulfillmentApplier { if (containsNonOpen) { // Iterate over each order a second time. for (uint256 i = 0; i < totalOrders; ) { - // Check restricted orders and contract orders. - _assertRestrictedAdvancedOrderValidity( - advancedOrders[i], - orderHashes, - orderHashes[i] - ); + // Ensure the order in question is being fulfilled. + if (availableOrders[i]) { + // Check restricted orders and contract orders. + _assertRestrictedAdvancedOrderValidity( + advancedOrders[i], + orderHashes, + orderHashes[i] + ); + } // Skip overflow checks as for loop is indexed starting at zero. unchecked { From c9057acd406fdf289aa17887d3e40e63b7d5ebae Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Fri, 17 Feb 2023 15:25:11 -0800 Subject: [PATCH 05/13] bump version to 1.4 --- contracts/Seaport.sol | 2 +- contracts/interfaces/ConsiderationInterface.sol | 2 +- contracts/interfaces/SeaportInterface.sol | 2 +- contracts/lib/Consideration.sol | 2 +- contracts/lib/ConsiderationBase.sol | 10 ++++------ contracts/lib/ConsiderationConstants.sol | 2 +- reference/ReferenceConsideration.sol | 2 +- reference/lib/ReferenceConsiderationBase.sol | 2 +- test/foundry/GetterTests.t.sol | 2 +- test/utils/helpers.ts | 2 +- 10 files changed, 13 insertions(+), 15 deletions(-) diff --git a/contracts/Seaport.sol b/contracts/Seaport.sol index a9ea72be5..057c498af 100644 --- a/contracts/Seaport.sol +++ b/contracts/Seaport.sol @@ -5,7 +5,7 @@ import { Consideration } from "./lib/Consideration.sol"; /** * @title Seaport - * @custom:version 1.3 + * @custom:version 1.4 * @author 0age (0age.eth) * @custom:coauthor d1ll0n (d1ll0n.eth) * @custom:coauthor transmissions11 (t11s.eth) diff --git a/contracts/interfaces/ConsiderationInterface.sol b/contracts/interfaces/ConsiderationInterface.sol index 3eaff8ce1..5829952a4 100644 --- a/contracts/interfaces/ConsiderationInterface.sol +++ b/contracts/interfaces/ConsiderationInterface.sol @@ -15,7 +15,7 @@ import { /** * @title ConsiderationInterface * @author 0age - * @custom:version 1.3 + * @custom:version 1.4 * @notice Consideration is a generalized native token/ERC20/ERC721/ERC1155 * marketplace. It minimizes external calls to the greatest extent * possible and provides lightweight methods for common routes as well diff --git a/contracts/interfaces/SeaportInterface.sol b/contracts/interfaces/SeaportInterface.sol index aede7b94a..515c38e5d 100644 --- a/contracts/interfaces/SeaportInterface.sol +++ b/contracts/interfaces/SeaportInterface.sol @@ -15,7 +15,7 @@ import { /** * @title SeaportInterface * @author 0age - * @custom:version 1.3 + * @custom:version 1.4 * @notice Seaport is a generalized native token/ERC20/ERC721/ERC1155 * marketplace. It minimizes external calls to the greatest extent * possible and provides lightweight methods for common routes as well diff --git a/contracts/lib/Consideration.sol b/contracts/lib/Consideration.sol index e465c0831..d737a1156 100644 --- a/contracts/lib/Consideration.sol +++ b/contracts/lib/Consideration.sol @@ -42,7 +42,7 @@ import { * @custom:coauthor d1ll0n (d1ll0n.eth) * @custom:coauthor transmissions11 (t11s.eth) * @custom:coauthor James Wenzel (emo.eth) - * @custom:version 1.3 + * @custom:version 1.4 * @notice Consideration is a generalized native token/ERC20/ERC721/ERC1155 * marketplace that provides lightweight methods for common routes as * well as more flexible methods for composing advanced orders or groups diff --git a/contracts/lib/ConsiderationBase.sol b/contracts/lib/ConsiderationBase.sol index a8e1f0609..a83a235fd 100644 --- a/contracts/lib/ConsiderationBase.sol +++ b/contracts/lib/ConsiderationBase.sol @@ -224,7 +224,7 @@ contract ConsiderationBase is nameHash = keccak256(bytes(_nameString())); // Derive hash of the version string of the contract. - versionHash = keccak256(bytes("1.3")); + versionHash = keccak256(bytes("1.4")); // Construct the OfferItem type string. bytes memory offerItemTypeString = bytes( @@ -306,11 +306,9 @@ contract ConsiderationBase is * @return _typeHash The EIP-712 typehash for the bulk order type with the * given height. */ - function _lookupBulkOrderTypehash(uint256 _treeHeight) - internal - pure - returns (bytes32 _typeHash) - { + function _lookupBulkOrderTypehash( + uint256 _treeHeight + ) internal pure returns (bytes32 _typeHash) { // Utilize assembly to efficiently retrieve correct bulk order typehash. assembly { // Use a Yul function to enable use of the `leave` keyword diff --git a/contracts/lib/ConsiderationConstants.sol b/contracts/lib/ConsiderationConstants.sol index 39f9f84af..796b8d1ef 100644 --- a/contracts/lib/ConsiderationConstants.sol +++ b/contracts/lib/ConsiderationConstants.sol @@ -46,7 +46,7 @@ uint256 constant information_version_cd_offset = 0x60; uint256 constant information_domainSeparator_offset = 0x20; uint256 constant information_conduitController_offset = 0x40; uint256 constant information_versionLengthPtr = 0x63; -uint256 constant information_versionWithLength = 0x03312e33; // 1.3 +uint256 constant information_versionWithLength = 0x03312e34; // 1.4 uint256 constant information_length = 0xa0; uint256 constant _NOT_ENTERED = 1; diff --git a/reference/ReferenceConsideration.sol b/reference/ReferenceConsideration.sol index 94b50cc6a..91bd0f569 100644 --- a/reference/ReferenceConsideration.sol +++ b/reference/ReferenceConsideration.sol @@ -28,7 +28,7 @@ import { OrderToExecute } from "./lib/ReferenceConsiderationStructs.sol"; * @author 0age * @custom:coauthor d1ll0n * @custom:coauthor transmissions11 - * @custom:version 1.3-reference + * @custom:version 1.4-reference * @notice Consideration is a generalized native token/ERC20/ERC721/ERC1155 * marketplace. It minimizes external calls to the greatest extent * possible and provides lightweight methods for common routes as well diff --git a/reference/lib/ReferenceConsiderationBase.sol b/reference/lib/ReferenceConsiderationBase.sol index 09cff6686..75594705c 100644 --- a/reference/lib/ReferenceConsiderationBase.sol +++ b/reference/lib/ReferenceConsiderationBase.sol @@ -25,7 +25,7 @@ contract ReferenceConsiderationBase is { // Declare constants for name, version, and reentrancy sentinel values. string internal constant _NAME = "Consideration"; - string internal constant _VERSION = "1.3-reference"; + string internal constant _VERSION = "1.4-reference"; uint256 internal constant _NOT_ENTERED = 1; uint256 internal constant _ENTERED = 2; diff --git a/test/foundry/GetterTests.t.sol b/test/foundry/GetterTests.t.sol index c95addf57..6697185d3 100644 --- a/test/foundry/GetterTests.t.sol +++ b/test/foundry/GetterTests.t.sol @@ -41,7 +41,7 @@ contract TestGetters is BaseConsiderationTest { function testGetsCorrectVersion() public { (string memory version, , ) = consideration.information(); - assertEq(version, "1.3"); + assertEq(version, "1.4"); } function testGetCorrectDomainSeparator() public { diff --git a/test/utils/helpers.ts b/test/utils/helpers.ts index ba393ada2..5fceddba7 100644 --- a/test/utils/helpers.ts +++ b/test/utils/helpers.ts @@ -9,7 +9,7 @@ import type { Order, } from "./types"; -export const VERSION = `1.3${process.env.REFERENCE ? "-reference" : ""}`; +export const VERSION = `1.4${process.env.REFERENCE ? "-reference" : ""}`; export const minRandom = (min: ethers.BigNumberish) => randomBN(10).add(min); From 708a7b3dbaddeaeaa5110620e85fafb5525f4bbc Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Fri, 17 Feb 2023 15:28:29 -0800 Subject: [PATCH 06/13] add 1.4 gas report --- ...57acd406fdf289aa17887d3e40e63b7d5ebae.json | 516 ++++++++++++++++++ 1 file changed, 516 insertions(+) create mode 100644 .gas_reports/c9057acd406fdf289aa17887d3e40e63b7d5ebae.json diff --git a/.gas_reports/c9057acd406fdf289aa17887d3e40e63b7d5ebae.json b/.gas_reports/c9057acd406fdf289aa17887d3e40e63b7d5ebae.json new file mode 100644 index 000000000..992ed0e20 --- /dev/null +++ b/.gas_reports/c9057acd406fdf289aa17887d3e40e63b7d5ebae.json @@ -0,0 +1,516 @@ +{ + "commitHash": "c9057acd406fdf289aa17887d3e40e63b7d5ebae", + "contractReports": { + "Conduit": { + "name": "Conduit", + "methods": [ + { + "method": "execute", + "min": 77459, + "max": 2147755, + "avg": 446096, + "calls": 6 + }, + { + "method": "executeBatch1155", + "min": null, + "max": null, + "avg": 97245, + "calls": 1 + }, + { + "method": "executeWithBatch1155", + "min": 97717, + "max": 361418, + "avg": 228764, + "calls": 4 + }, + { + "method": "updateChannel", + "min": null, + "max": null, + "avg": 45802, + "calls": 1 + } + ], + "bytecodeSize": 3071, + "deployedBytecodeSize": 3030 + }, + "ConduitController": { + "name": "ConduitController", + "methods": [ + { + "method": "acceptOwnership", + "min": null, + "max": null, + "avg": 32944, + "calls": 1 + }, + { + "method": "cancelOwnershipTransfer", + "min": null, + "max": null, + "avg": 27966, + "calls": 1 + }, + { + "method": "createConduit", + "min": 712826, + "max": 712970, + "avg": 712927, + "calls": 53 + }, + { + "method": "transferOwnership", + "min": null, + "max": null, + "avg": 50329, + "calls": 2 + }, + { + "method": "updateChannel", + "min": 34454, + "max": 121098, + "avg": 117294, + "calls": 71 + } + ], + "bytecodeSize": 12007, + "deployedBytecodeSize": 8660 + }, + "ConduitControllerMock": { + "name": "ConduitControllerMock", + "methods": [ + { + "method": "createConduit", + "min": 226092, + "max": 231533, + "avg": 229598, + "calls": 6 + } + ], + "bytecodeSize": 10541, + "deployedBytecodeSize": 7340 + }, + "EIP1271Wallet": { + "name": "EIP1271Wallet", + "methods": [ + { + "method": "approveNFT", + "min": null, + "max": null, + "avg": 49674, + "calls": 14 + }, + { + "method": "registerDigest", + "min": 22239, + "max": 44151, + "avg": 36847, + "calls": 3 + }, + { + "method": "revertWithMessage", + "min": null, + "max": null, + "avg": 21677, + "calls": 1 + }, + { + "method": "setValid", + "min": 21699, + "max": 43611, + "avg": 32655, + "calls": 2 + } + ], + "bytecodeSize": 2834, + "deployedBytecodeSize": 2656 + }, + "ExcessReturnDataRecipient": { + "name": "ExcessReturnDataRecipient", + "methods": [ + { + "method": "setRevertDataSize", + "min": null, + "max": null, + "avg": 43441, + "calls": 2 + } + ], + "bytecodeSize": 1907, + "deployedBytecodeSize": 1879 + }, + "PausableZone": { + "name": "PausableZone", + "methods": [ + { + "method": "cancelOrders", + "min": null, + "max": null, + "avg": 65315, + "calls": 1 + } + ], + "bytecodeSize": 5556, + "deployedBytecodeSize": 5450 + }, + "PausableZoneController": { + "name": "PausableZoneController", + "methods": [ + { + "method": "acceptOwnership", + "min": null, + "max": null, + "avg": 28942, + "calls": 1 + }, + { + "method": "assignOperator", + "min": null, + "max": null, + "avg": 50880, + "calls": 1 + }, + { + "method": "assignPauser", + "min": null, + "max": null, + "avg": 47183, + "calls": 1 + }, + { + "method": "cancelOrders", + "min": null, + "max": null, + "avg": 73870, + "calls": 1 + }, + { + "method": "cancelOwnershipTransfer", + "min": null, + "max": null, + "avg": 24578, + "calls": 1 + }, + { + "method": "createZone", + "min": 1154302, + "max": 1154314, + "avg": 1154312, + "calls": 31 + }, + { + "method": "executeMatchAdvancedOrders", + "min": null, + "max": null, + "avg": 289139, + "calls": 2 + }, + { + "method": "executeMatchOrders", + "min": null, + "max": null, + "avg": 282691, + "calls": 2 + }, + { + "method": "pause", + "min": 32875, + "max": 35006, + "avg": 33585, + "calls": 3 + }, + { + "method": "transferOwnership", + "min": null, + "max": null, + "avg": 47199, + "calls": 2 + } + ], + "bytecodeSize": 17744, + "deployedBytecodeSize": 11975 + }, + "Reenterer": { + "name": "Reenterer", + "methods": [ + { + "method": "prepare", + "min": 49267, + "max": 2351714, + "avg": 1061786, + "calls": 26 + } + ], + "bytecodeSize": 2726, + "deployedBytecodeSize": 2698 + }, + "Seaport": { + "name": "Seaport", + "methods": [ + { + "method": "cancel", + "min": 41238, + "max": 58398, + "avg": 54032, + "calls": 16 + }, + { + "method": "fulfillAdvancedOrder", + "min": 96288, + "max": 225181, + "avg": 159373, + "calls": 194 + }, + { + "method": "fulfillAvailableAdvancedOrders", + "min": 149626, + "max": 341067, + "avg": 213572, + "calls": 33 + }, + { + "method": "fulfillAvailableOrders", + "min": 164986, + "max": 215728, + "avg": 201363, + "calls": 21 + }, + { + "method": "fulfillBasicOrder", + "min": 90627, + "max": 1621627, + "avg": 598708, + "calls": 187 + }, + { + "method": "fulfillBasicOrder_efficient_6GL6yc", + "min": 90261, + "max": 111468, + "avg": 100865, + "calls": 6 + }, + { + "method": "fulfillOrder", + "min": 119409, + "max": 225080, + "avg": 176772, + "calls": 108 + }, + { + "method": "incrementCounter", + "min": null, + "max": null, + "avg": 47054, + "calls": 6 + }, + { + "method": "matchAdvancedOrders", + "min": 179538, + "max": 300461, + "avg": 248924, + "calls": 77 + }, + { + "method": "matchOrders", + "min": 157474, + "max": 348243, + "avg": 264542, + "calls": 151 + }, + { + "method": "validate", + "min": 53177, + "max": 83898, + "avg": 73542, + "calls": 29 + } + ], + "bytecodeSize": 26103, + "deployedBytecodeSize": 24378 + }, + "SeaportRouter": { + "name": "SeaportRouter", + "methods": [ + { + "method": "fulfillAvailableAdvancedOrders", + "min": 183966, + "max": 311871, + "avg": 233568, + "calls": 6 + } + ], + "bytecodeSize": 6345, + "deployedBytecodeSize": 6158 + }, + "TestContractOfferer": { + "name": "TestContractOfferer", + "methods": [ + { + "method": "activate", + "min": 201519, + "max": 246674, + "avg": 205513, + "calls": 33 + }, + { + "method": "activateWithCriteria", + "min": null, + "max": null, + "avg": 201834, + "calls": 1 + }, + { + "method": "extendAvailable", + "min": null, + "max": null, + "avg": 50704, + "calls": 1 + }, + { + "method": "extendRequired", + "min": null, + "max": null, + "avg": 45780, + "calls": 1 + } + ], + "bytecodeSize": 8462, + "deployedBytecodeSize": 8265 + }, + "TestContractOffererNativeToken": { + "name": "TestContractOffererNativeToken", + "methods": [ + { + "method": "activate", + "min": null, + "max": null, + "avg": 139181, + "calls": 1 + } + ], + "bytecodeSize": 6940, + "deployedBytecodeSize": 6764 + }, + "TestERC1155": { + "name": "TestERC1155", + "methods": [ + { + "method": "mint", + "min": 47235, + "max": 49903, + "avg": 49437, + "calls": 245 + }, + { + "method": "setApprovalForAll", + "min": 26102, + "max": 46002, + "avg": 45654, + "calls": 458 + } + ], + "bytecodeSize": 4173, + "deployedBytecodeSize": 4145 + }, + "TestERC20": { + "name": "TestERC20", + "methods": [ + { + "method": "approve", + "min": 28881, + "max": 46245, + "avg": 45806, + "calls": 390 + }, + { + "method": "blockTransfer", + "min": 21978, + "max": 43890, + "avg": 32934, + "calls": 4 + }, + { + "method": "mint", + "min": 33994, + "max": 68458, + "avg": 67565, + "calls": 190 + }, + { + "method": "setNoReturnData", + "min": 21926, + "max": 43838, + "avg": 32882, + "calls": 2 + } + ], + "bytecodeSize": 5807, + "deployedBytecodeSize": 4636 + }, + "TestERC721": { + "name": "TestERC721", + "methods": [ + { + "method": "mint", + "min": 51492, + "max": 68796, + "avg": 65683, + "calls": 276 + }, + { + "method": "setApprovalForAll", + "min": 26195, + "max": 46095, + "avg": 45491, + "calls": 462 + } + ], + "bytecodeSize": 5238, + "deployedBytecodeSize": 4451 + }, + "TestInvalidContractOfferer": { + "name": "TestInvalidContractOfferer", + "methods": [ + { + "method": "activate", + "min": 201543, + "max": 201567, + "avg": 201555, + "calls": 2 + } + ], + "bytecodeSize": 7954, + "deployedBytecodeSize": 7764 + }, + "TestInvalidContractOffererRatifyOrder": { + "name": "TestInvalidContractOffererRatifyOrder", + "methods": [ + { + "method": "activate", + "min": null, + "max": null, + "avg": 201558, + "calls": 1 + } + ], + "bytecodeSize": 7957, + "deployedBytecodeSize": 7760 + }, + "TransferHelper": { + "name": "TransferHelper", + "methods": [ + { + "method": "bulkTransfer", + "min": 77935, + "max": 1433930, + "avg": 630138, + "calls": 3 + } + ], + "bytecodeSize": 4140, + "deployedBytecodeSize": 3865 + } + } +} \ No newline at end of file From 604644c997bbff4cef43f0df301aba25dcb97af3 Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Fri, 17 Feb 2023 15:29:02 -0800 Subject: [PATCH 07/13] update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index afba7954c..e3b277b4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "seaport", - "version": "1.3.0", + "version": "1.4.0", "description": "Seaport is a marketplace protocol for safely and efficiently buying and selling NFTs. Each listing contains an arbitrary number of items that the offerer is willing to give (the \"offer\") along with an arbitrary number of items that must be received along with their respective receivers (the \"consideration\").", "main": "contracts/Seaport.sol", "author": "0age", From 84b4a68573007bd9a553ad6ba3c39b490b0c122b Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Fri, 17 Feb 2023 16:24:47 -0800 Subject: [PATCH 08/13] always revert when contract orders return bad data --- contracts/lib/OrderCombiner.sol | 18 ++++++++---------- contracts/lib/OrderValidator.sol | 16 ++++++++++------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/contracts/lib/OrderCombiner.sol b/contracts/lib/OrderCombiner.sol index 4f19cbfaa..d2e3b1f81 100644 --- a/contracts/lib/OrderCombiner.sol +++ b/contracts/lib/OrderCombiner.sol @@ -334,16 +334,14 @@ contract OrderCombiner is OrderFulfiller, FulfillmentApplier { // Retrieve the offer item. OfferItem memory offerItem = offer[j]; - { - assembly { - // If the offer item is for the native token and the - // order type is not a contract order type, set the - // first bit of the error buffer to true. - invalidNativeOfferItemErrorBuffer := or( - invalidNativeOfferItemErrorBuffer, - lt(mload(offerItem), mload(0)) - ) - } + // If the offer item is for the native token and the order + // type is not a contract order type, set the first bit of + // the error buffer to true. + assembly { + invalidNativeOfferItemErrorBuffer := or( + invalidNativeOfferItemErrorBuffer, + lt(mload(offerItem), mload(0)) + ) } // Apply order fill fraction to offer item end amount. diff --git a/contracts/lib/OrderValidator.sol b/contracts/lib/OrderValidator.sol index afc927d25..22ac17326 100644 --- a/contracts/lib/OrderValidator.sol +++ b/contracts/lib/OrderValidator.sol @@ -551,6 +551,10 @@ contract OrderValidator is Executor, ZoneInteraction { } } + // From this point onward, do not allow for skipping orders as the + // contract offerer may have modified state in expectation of any named + // consideration items being sent to their designated recipients. + // Decode the returned contract order and/or update the error buffer. ( uint256 errorBuffer, @@ -558,9 +562,9 @@ contract OrderValidator is Executor, ZoneInteraction { ConsiderationItem[] memory consideration ) = _convertGetGeneratedOrderResult(_decodeGenerateOrderReturndata)(); - // Revert or skip if the returndata could not be decoded correctly. + // Revert if the returndata could not be decoded correctly. if (errorBuffer != 0) { - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + _revertInvalidContractOrder(orderHash); } { @@ -570,7 +574,7 @@ contract OrderValidator is Executor, ZoneInteraction { // Explicitly specified offer items cannot be removed. if (originalOfferLength > newOfferLength) { - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + _revertInvalidContractOrder(orderHash); } // Iterate over each specified offer (e.g. minimumReceived) item. @@ -612,7 +616,7 @@ contract OrderValidator is Executor, ZoneInteraction { // New consideration items cannot be created. if (newConsiderationLength > originalConsiderationArray.length) { - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + _revertInvalidContractOrder(orderHash); } // Iterate over returned consideration & do not exceed maximumSpent. @@ -653,9 +657,9 @@ contract OrderValidator is Executor, ZoneInteraction { orderParameters.consideration = consideration; } - // Revert or skip if any item comparison failed. + // Revert if any item comparison failed. if (errorBuffer != 0) { - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + _revertInvalidContractOrder(orderHash); } // Return order hash and full fill amount (numerator & denominator = 1). From bb5d39539354e96cf6e69ad107906a0b6a46ea91 Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Fri, 17 Feb 2023 16:41:36 -0800 Subject: [PATCH 09/13] fix hardhat tests --- test/advanced.spec.ts | 209 +++++++++++++++++++++++++++++++++++++++--- test/revert.spec.ts | 32 ++----- 2 files changed, 204 insertions(+), 37 deletions(-) diff --git a/test/advanced.spec.ts b/test/advanced.spec.ts index 805129fe0..45b445ba3 100644 --- a/test/advanced.spec.ts +++ b/test/advanced.spec.ts @@ -3061,7 +3061,182 @@ describe(`Advanced orders (Seaport v${VERSION})`, function () { "ConsiderationLengthNotEqualToTotalOriginal" ); }); - it("Can fulfill and aggregate contract orders via fulfillAvailableAdvancedOrders with failing orders", async () => { + it("Can fulfill and aggregate contract orders via fulfillAvailableAdvancedOrders with failing orders due to reverts", async () => { + // Seller mints nfts + const { nftId: nftIdOne, amount: amountOne } = await mintAndApprove1155( + seller, + marketplaceContract.address, + 10000 + ); + const { nftId: nftIdTwo, amount: amountTwo } = await mintAndApprove1155( + seller, + marketplaceContract.address, + 10000 + ); + + await mintAndApprove1155(seller, marketplaceContract.address, 10000); + + await mintAndApprove1155(seller, marketplaceContract.address, 10000); + + // seller deploys offererContracts and approves them for 1155 token + const offererContractOne = await deployContract( + "TestContractOfferer", + owner, + marketplaceContract.address + ); + + await set1155ApprovalForAll(seller, offererContractOne.address, true); + + const offererContractTwo = await deployContract( + "TestContractOfferer", + owner, + marketplaceContract.address + ); + + await set1155ApprovalForAll(seller, offererContractTwo.address, true); + + const offererContractThree = await deployContract( + "TestContractOfferer", + owner, + marketplaceContract.address + ); + + await set1155ApprovalForAll(seller, offererContractThree.address, true); + + const offererContractFour = await deployContract( + "TestContractOfferer", + owner, + marketplaceContract.address + ); + + await set1155ApprovalForAll(seller, offererContractFour.address, true); + + const offerOne = [ + getTestItem1155(nftIdOne, amountOne.mul(10), amountOne.mul(10)) as any, + ]; + + const considerationOne = [ + getItemETH( + amountOne.mul(1000), + amountOne.mul(1000), + offererContractOne.address + ) as any, + ]; + + offerOne[0].identifier = offerOne[0].identifierOrCriteria; + offerOne[0].amount = offerOne[0].endAmount; + + considerationOne[0].identifier = considerationOne[0].identifierOrCriteria; + considerationOne[0].amount = considerationOne[0].endAmount; + + await offererContractOne + .connect(seller) + .activate(offerOne[0], considerationOne[0]); + + const { order: orderOne, value } = await createOrder( + seller, + zone, + offerOne, + considerationOne, + 4 // CONTRACT + ); + + const contractOffererOneNonce = + await marketplaceContract.getContractOffererNonce( + offererContractOne.address + ); + + const orderHashOne = + offererContractOne.address.toLowerCase() + + contractOffererOneNonce.toHexString().slice(2).padStart(24, "0"); + + orderOne.parameters.offerer = offererContractOne.address; + orderOne.numerator = 1; + orderOne.denominator = 1; + orderOne.signature = "0x"; + + // test orderHashes + orderOne.extraData = ethers.utils.defaultAbiCoder.encode( + ["bytes32[]"], + [[orderHashOne, ethers.constants.HashZero]] + ); + + expect((orderOne.extraData.length - 2) / 64).to.equal(4); + + // second order reverts when generating the order + const offerTwo = [ + getTestItem1155(nftIdTwo, amountTwo.mul(10), amountTwo.mul(10)) as any, + ]; + + const considerationTwo = [ + getItemETH( + amountTwo.mul(1000), + amountTwo.mul(1000), + offererContractTwo.address + ) as any, + ]; + + offerTwo[0].identifier = offerTwo[0].identifierOrCriteria; + offerTwo[0].amount = offerTwo[0].endAmount; + + considerationTwo[0].identifier = considerationTwo[0].identifierOrCriteria; + considerationTwo[0].amount = considerationTwo[0].endAmount; + + await offererContractTwo + .connect(seller) + .activate(offerTwo[0], considerationTwo[0]); + + const { order: orderTwo, value: valueTwo } = await createOrder( + seller, + zone, + offerTwo, + considerationTwo, + 4 // CONTRACT + ); + + orderTwo.parameters.offerer = offererContractTwo.address; + orderTwo.numerator = 1; + orderTwo.denominator = 1; + orderTwo.signature = "0x"; + orderTwo.extraData = "0x1234"; // causes call to revert + + const offerComponents = [ + [{ orderIndex: 0, itemIndex: 0 }], + [{ orderIndex: 1, itemIndex: 0 }], + ]; + const considerationComponents = [ + [{ orderIndex: 0, itemIndex: 0 }], + [{ orderIndex: 1, itemIndex: 0 }], + ]; + + await withBalanceChecks([orderOne], 0, undefined, async () => { + const tx = marketplaceContract + .connect(buyer) + .fulfillAvailableAdvancedOrders( + [orderOne, orderTwo], + [], + offerComponents, + considerationComponents, + toKey(0), + ethers.constants.AddressZero, + 100, + { + value: value.add(valueTwo).mul(2), + } + ); + const receipt = await (await tx).wait(); + await checkExpectedEvents(tx, receipt, [ + { + order: orderOne, + orderHash: orderHashOne, + fulfiller: buyer.address, + }, + ]); + + return receipt; + }); + }); + it("Cannot fulfill and aggregate contract orders via fulfillAvailableAdvancedOrders with failing orders due to bad data", async () => { // Seller mints nfts const { nftId: nftIdOne, amount: amountOne } = await mintAndApprove1155( seller, @@ -3259,6 +3434,15 @@ describe(`Advanced orders (Seaport v${VERSION})`, function () { orderThree.denominator = 1; orderThree.signature = "0x"; + const contractOffererThreeNonce = + await marketplaceContract.getContractOffererNonce( + offererContractThree.address + ); + + const orderHashThree = + offererContractThree.address.toLowerCase() + + contractOffererThreeNonce.toHexString().slice(2).padStart(24, "0"); + // fourth order: generated order exceeds expected consideration items const offerFour = [ getTestItem1155( @@ -3317,8 +3501,8 @@ describe(`Advanced orders (Seaport v${VERSION})`, function () { [{ orderIndex: 3, itemIndex: 0 }], ]; - await withBalanceChecks([orderOne], 0, undefined, async () => { - const tx = marketplaceContract + await expect( + marketplaceContract .connect(buyer) .fulfillAvailableAdvancedOrders( [orderOne, orderTwo, orderThree, orderFour], @@ -3331,18 +3515,13 @@ describe(`Advanced orders (Seaport v${VERSION})`, function () { { value: value.add(valueTwo).add(valueThree).add(valueFour).mul(2), } - ); - const receipt = await (await tx).wait(); - await checkExpectedEvents(tx, receipt, [ - { - order: orderOne, - orderHash: orderHashOne, - fulfiller: buyer.address, - }, - ]); - - return receipt; - }); + ) + ) + .to.be.revertedWithCustomError( + marketplaceContract, + "InvalidContractOrder" + ) + .withArgs(orderHashThree); }); }); diff --git a/test/revert.spec.ts b/test/revert.spec.ts index 0b0908376..42506030a 100644 --- a/test/revert.spec.ts +++ b/test/revert.spec.ts @@ -8296,7 +8296,7 @@ describe(`Reverts (Seaport v${VERSION})`, function () { ) .withArgs(orderHash); }); - it("Fulfillment does not revert when valid order included with invalid contract offerer order", async () => { + it("Fulfillment reverts when valid order included with contract order where offerer returns bad data", async () => { // Contract offerer mints nft const nftId10 = await mint721( offererContract, @@ -8374,8 +8374,8 @@ describe(`Reverts (Seaport v${VERSION})`, function () { [{ orderIndex: 1, itemIndex: 0 }], ]; - await withBalanceChecks([order2], 0, [], async () => { - const tx = marketplaceContract + await expect( + marketplaceContract .connect(buyer) .fulfillAvailableAdvancedOrders( [order, order2], @@ -8388,25 +8388,13 @@ describe(`Reverts (Seaport v${VERSION})`, function () { { value: value.mul(2), } - ); - const receipt = await (await tx).wait(); - await checkExpectedEvents( - tx, - receipt, - [ - { - order: order2, - orderHash: orderHash2, - fulfiller: buyer.address, - fulfillerConduitKey: toKey(0), - }, - ], - undefined, - [] - ); - - return receipt; - }); + ) + ) + .to.be.revertedWithCustomError( + marketplaceContract, + "InvalidContractOrder" + ) + .withArgs(orderHash); }); }); From 667b6dbff57c71c33a495e16a90f9733dcc97e91 Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Fri, 17 Feb 2023 17:23:34 -0800 Subject: [PATCH 10/13] update gas report --- ...39539354e96cf6e69ad107906a0b6a46ea91.json} | 120 ++-- ...a2c1285e31df6b46c36aaf72dbcff2d6e58a3.json | 516 ------------------ 2 files changed, 60 insertions(+), 576 deletions(-) rename .gas_reports/{c9057acd406fdf289aa17887d3e40e63b7d5ebae.json => bb5d39539354e96cf6e69ad107906a0b6a46ea91.json} (86%) delete mode 100644 .gas_reports/ddea2c1285e31df6b46c36aaf72dbcff2d6e58a3.json diff --git a/.gas_reports/c9057acd406fdf289aa17887d3e40e63b7d5ebae.json b/.gas_reports/bb5d39539354e96cf6e69ad107906a0b6a46ea91.json similarity index 86% rename from .gas_reports/c9057acd406fdf289aa17887d3e40e63b7d5ebae.json rename to .gas_reports/bb5d39539354e96cf6e69ad107906a0b6a46ea91.json index 992ed0e20..d385bfc4d 100644 --- a/.gas_reports/c9057acd406fdf289aa17887d3e40e63b7d5ebae.json +++ b/.gas_reports/bb5d39539354e96cf6e69ad107906a0b6a46ea91.json @@ -1,28 +1,28 @@ { - "commitHash": "c9057acd406fdf289aa17887d3e40e63b7d5ebae", + "commitHash": "bb5d39539354e96cf6e69ad107906a0b6a46ea91", "contractReports": { "Conduit": { "name": "Conduit", "methods": [ { "method": "execute", - "min": 77459, - "max": 2147755, - "avg": 446096, + "min": 77435, + "max": 2179914, + "avg": 451436, "calls": 6 }, { "method": "executeBatch1155", "min": null, "max": null, - "avg": 97245, + "avg": 97221, "calls": 1 }, { "method": "executeWithBatch1155", - "min": 97717, + "min": 97669, "max": 361418, - "avg": 228764, + "avg": 228749, "calls": 4 }, { @@ -64,14 +64,14 @@ "method": "transferOwnership", "min": null, "max": null, - "avg": 50329, + "avg": 50317, "calls": 2 }, { "method": "updateChannel", "min": 34454, "max": 121098, - "avg": 117294, + "avg": 117293, "calls": 71 } ], @@ -106,7 +106,7 @@ "method": "registerDigest", "min": 22239, "max": 44151, - "avg": 36847, + "avg": 36843, "calls": 3 }, { @@ -148,7 +148,7 @@ "method": "cancelOrders", "min": null, "max": null, - "avg": 65315, + "avg": 65327, "calls": 1 } ], @@ -169,7 +169,7 @@ "method": "assignOperator", "min": null, "max": null, - "avg": 50880, + "avg": 50892, "calls": 1 }, { @@ -204,14 +204,14 @@ "method": "executeMatchAdvancedOrders", "min": null, "max": null, - "avg": 289139, + "avg": 289151, "calls": 2 }, { "method": "executeMatchOrders", "min": null, "max": null, - "avg": 282691, + "avg": 282751, "calls": 2 }, { @@ -238,8 +238,8 @@ { "method": "prepare", "min": 49267, - "max": 2351714, - "avg": 1061786, + "max": 2351690, + "avg": 1061771, "calls": 26 } ], @@ -251,37 +251,37 @@ "methods": [ { "method": "cancel", - "min": 41238, - "max": 58398, - "avg": 54032, + "min": 41226, + "max": 58374, + "avg": 54030, "calls": 16 }, { "method": "fulfillAdvancedOrder", "min": 96288, "max": 225181, - "avg": 159373, + "avg": 159350, "calls": 194 }, { "method": "fulfillAvailableAdvancedOrders", "min": 149626, - "max": 341067, - "avg": 213572, - "calls": 33 + "max": 260680, + "avg": 203090, + "calls": 30 }, { "method": "fulfillAvailableOrders", "min": 164986, - "max": 215728, - "avg": 201363, + "max": 215752, + "avg": 201359, "calls": 21 }, { "method": "fulfillBasicOrder", - "min": 90627, + "min": 90639, "max": 1621627, - "avg": 598708, + "avg": 598705, "calls": 187 }, { @@ -295,7 +295,7 @@ "method": "fulfillOrder", "min": 119409, "max": 225080, - "avg": 176772, + "avg": 176770, "calls": 108 }, { @@ -307,37 +307,37 @@ }, { "method": "matchAdvancedOrders", - "min": 179538, - "max": 300461, - "avg": 248924, + "min": 179574, + "max": 300473, + "avg": 248933, "calls": 77 }, { "method": "matchOrders", - "min": 157474, - "max": 348243, - "avg": 264542, + "min": 157522, + "max": 348207, + "avg": 264552, "calls": 151 }, { "method": "validate", - "min": 53177, - "max": 83898, - "avg": 73542, + "min": 53201, + "max": 83910, + "avg": 73546, "calls": 29 } ], - "bytecodeSize": 26103, - "deployedBytecodeSize": 24378 + "bytecodeSize": 26114, + "deployedBytecodeSize": 24389 }, "SeaportRouter": { "name": "SeaportRouter", "methods": [ { "method": "fulfillAvailableAdvancedOrders", - "min": 183966, - "max": 311871, - "avg": 233568, + "min": 183954, + "max": 311883, + "avg": 233586, "calls": 6 } ], @@ -351,8 +351,8 @@ "method": "activate", "min": 201519, "max": 246674, - "avg": 205513, - "calls": 33 + "avg": 205288, + "calls": 35 }, { "method": "activateWithCriteria", @@ -399,16 +399,16 @@ { "method": "mint", "min": 47235, - "max": 49903, - "avg": 49437, - "calls": 245 + "max": 49879, + "avg": 49421, + "calls": 236 }, { "method": "setApprovalForAll", "min": 26102, "max": 46002, - "avg": 45654, - "calls": 458 + "avg": 45380, + "calls": 448 } ], "bytecodeSize": 4173, @@ -421,8 +421,8 @@ "method": "approve", "min": 28881, "max": 46245, - "avg": 45806, - "calls": 390 + "avg": 45780, + "calls": 338 }, { "method": "blockTransfer", @@ -433,10 +433,10 @@ }, { "method": "mint", - "min": 33994, + "min": 33982, "max": 68458, - "avg": 67565, - "calls": 190 + "avg": 67466, + "calls": 164 }, { "method": "setNoReturnData", @@ -456,15 +456,15 @@ "method": "mint", "min": 51492, "max": 68796, - "avg": 65683, - "calls": 276 + "avg": 66042, + "calls": 315 }, { "method": "setApprovalForAll", "min": 26195, "max": 46095, - "avg": 45491, - "calls": 462 + "avg": 45578, + "calls": 540 } ], "bytecodeSize": 5238, @@ -504,8 +504,8 @@ { "method": "bulkTransfer", "min": 77935, - "max": 1433930, - "avg": 630138, + "max": 1492854, + "avg": 664509, "calls": 3 } ], diff --git a/.gas_reports/ddea2c1285e31df6b46c36aaf72dbcff2d6e58a3.json b/.gas_reports/ddea2c1285e31df6b46c36aaf72dbcff2d6e58a3.json deleted file mode 100644 index 72b1390e5..000000000 --- a/.gas_reports/ddea2c1285e31df6b46c36aaf72dbcff2d6e58a3.json +++ /dev/null @@ -1,516 +0,0 @@ -{ - "commitHash": "ddea2c1285e31df6b46c36aaf72dbcff2d6e58a3", - "contractReports": { - "Conduit": { - "name": "Conduit", - "methods": [ - { - "method": "execute", - "min": 77459, - "max": 2168532, - "avg": 449559, - "calls": 6 - }, - { - "method": "executeBatch1155", - "min": null, - "max": null, - "avg": 97245, - "calls": 1 - }, - { - "method": "executeWithBatch1155", - "min": 97717, - "max": 361430, - "avg": 228767, - "calls": 4 - }, - { - "method": "updateChannel", - "min": null, - "max": null, - "avg": 45802, - "calls": 1 - } - ], - "bytecodeSize": 3071, - "deployedBytecodeSize": 3030 - }, - "ConduitController": { - "name": "ConduitController", - "methods": [ - { - "method": "acceptOwnership", - "min": null, - "max": null, - "avg": 32944, - "calls": 1 - }, - { - "method": "cancelOwnershipTransfer", - "min": null, - "max": null, - "avg": 27966, - "calls": 1 - }, - { - "method": "createConduit", - "min": 712826, - "max": 712970, - "avg": 712927, - "calls": 53 - }, - { - "method": "transferOwnership", - "min": null, - "max": null, - "avg": 50329, - "calls": 2 - }, - { - "method": "updateChannel", - "min": 34454, - "max": 121098, - "avg": 117294, - "calls": 71 - } - ], - "bytecodeSize": 12007, - "deployedBytecodeSize": 8660 - }, - "ConduitControllerMock": { - "name": "ConduitControllerMock", - "methods": [ - { - "method": "createConduit", - "min": 226092, - "max": 231533, - "avg": 229596, - "calls": 6 - } - ], - "bytecodeSize": 10541, - "deployedBytecodeSize": 7340 - }, - "EIP1271Wallet": { - "name": "EIP1271Wallet", - "methods": [ - { - "method": "approveNFT", - "min": null, - "max": null, - "avg": 49674, - "calls": 14 - }, - { - "method": "registerDigest", - "min": 22239, - "max": 44151, - "avg": 36847, - "calls": 3 - }, - { - "method": "revertWithMessage", - "min": null, - "max": null, - "avg": 21677, - "calls": 1 - }, - { - "method": "setValid", - "min": 21699, - "max": 43611, - "avg": 32655, - "calls": 2 - } - ], - "bytecodeSize": 2834, - "deployedBytecodeSize": 2656 - }, - "ExcessReturnDataRecipient": { - "name": "ExcessReturnDataRecipient", - "methods": [ - { - "method": "setRevertDataSize", - "min": null, - "max": null, - "avg": 43441, - "calls": 2 - } - ], - "bytecodeSize": 1907, - "deployedBytecodeSize": 1879 - }, - "PausableZone": { - "name": "PausableZone", - "methods": [ - { - "method": "cancelOrders", - "min": null, - "max": null, - "avg": 65339, - "calls": 1 - } - ], - "bytecodeSize": 5556, - "deployedBytecodeSize": 5450 - }, - "PausableZoneController": { - "name": "PausableZoneController", - "methods": [ - { - "method": "acceptOwnership", - "min": null, - "max": null, - "avg": 28942, - "calls": 1 - }, - { - "method": "assignOperator", - "min": null, - "max": null, - "avg": 50892, - "calls": 1 - }, - { - "method": "assignPauser", - "min": null, - "max": null, - "avg": 47183, - "calls": 1 - }, - { - "method": "cancelOrders", - "min": null, - "max": null, - "avg": 73894, - "calls": 1 - }, - { - "method": "cancelOwnershipTransfer", - "min": null, - "max": null, - "avg": 24578, - "calls": 1 - }, - { - "method": "createZone", - "min": 1154302, - "max": 1154314, - "avg": 1154312, - "calls": 31 - }, - { - "method": "executeMatchAdvancedOrders", - "min": null, - "max": null, - "avg": 288785, - "calls": 2 - }, - { - "method": "executeMatchOrders", - "min": null, - "max": null, - "avg": 282325, - "calls": 2 - }, - { - "method": "pause", - "min": 32875, - "max": 35006, - "avg": 33585, - "calls": 3 - }, - { - "method": "transferOwnership", - "min": null, - "max": null, - "avg": 47199, - "calls": 2 - } - ], - "bytecodeSize": 17744, - "deployedBytecodeSize": 11975 - }, - "Reenterer": { - "name": "Reenterer", - "methods": [ - { - "method": "prepare", - "min": 49267, - "max": 2351654, - "avg": 1061779, - "calls": 26 - } - ], - "bytecodeSize": 2726, - "deployedBytecodeSize": 2698 - }, - "Seaport": { - "name": "Seaport", - "methods": [ - { - "method": "cancel", - "min": 41250, - "max": 58422, - "avg": 54039, - "calls": 16 - }, - { - "method": "fulfillAdvancedOrder", - "min": 96288, - "max": 225181, - "avg": 159382, - "calls": 194 - }, - { - "method": "fulfillAvailableAdvancedOrders", - "min": 149626, - "max": 350749, - "avg": 214389, - "calls": 33 - }, - { - "method": "fulfillAvailableOrders", - "min": 164998, - "max": 215740, - "avg": 201364, - "calls": 21 - }, - { - "method": "fulfillBasicOrder", - "min": 90639, - "max": 1621627, - "avg": 598707, - "calls": 187 - }, - { - "method": "fulfillBasicOrder_efficient_6GL6yc", - "min": 90261, - "max": 111456, - "avg": 100859, - "calls": 6 - }, - { - "method": "fulfillOrder", - "min": 119409, - "max": 225080, - "avg": 176772, - "calls": 108 - }, - { - "method": "incrementCounter", - "min": null, - "max": null, - "avg": 47054, - "calls": 6 - }, - { - "method": "matchAdvancedOrders", - "min": 179574, - "max": 300213, - "avg": 248903, - "calls": 77 - }, - { - "method": "matchOrders", - "min": 157474, - "max": 348243, - "avg": 264537, - "calls": 151 - }, - { - "method": "validate", - "min": 53177, - "max": 83910, - "avg": 73542, - "calls": 29 - } - ], - "bytecodeSize": 26099, - "deployedBytecodeSize": 24374 - }, - "SeaportRouter": { - "name": "SeaportRouter", - "methods": [ - { - "method": "fulfillAvailableAdvancedOrders", - "min": 183942, - "max": 311883, - "avg": 233578, - "calls": 6 - } - ], - "bytecodeSize": 6345, - "deployedBytecodeSize": 6158 - }, - "TestContractOfferer": { - "name": "TestContractOfferer", - "methods": [ - { - "method": "activate", - "min": 201519, - "max": 246674, - "avg": 205512, - "calls": 33 - }, - { - "method": "activateWithCriteria", - "min": null, - "max": null, - "avg": 201834, - "calls": 1 - }, - { - "method": "extendAvailable", - "min": null, - "max": null, - "avg": 50704, - "calls": 1 - }, - { - "method": "extendRequired", - "min": null, - "max": null, - "avg": 45780, - "calls": 1 - } - ], - "bytecodeSize": 8462, - "deployedBytecodeSize": 8265 - }, - "TestContractOffererNativeToken": { - "name": "TestContractOffererNativeToken", - "methods": [ - { - "method": "activate", - "min": null, - "max": null, - "avg": 139181, - "calls": 1 - } - ], - "bytecodeSize": 6940, - "deployedBytecodeSize": 6764 - }, - "TestERC1155": { - "name": "TestERC1155", - "methods": [ - { - "method": "mint", - "min": 47235, - "max": 49903, - "avg": 49427, - "calls": 239 - }, - { - "method": "setApprovalForAll", - "min": 26102, - "max": 46002, - "avg": 45645, - "calls": 446 - } - ], - "bytecodeSize": 4173, - "deployedBytecodeSize": 4145 - }, - "TestERC20": { - "name": "TestERC20", - "methods": [ - { - "method": "approve", - "min": 28881, - "max": 46245, - "avg": 45807, - "calls": 390 - }, - { - "method": "blockTransfer", - "min": 21978, - "max": 43890, - "avg": 32934, - "calls": 4 - }, - { - "method": "mint", - "min": 33994, - "max": 68458, - "avg": 67563, - "calls": 190 - }, - { - "method": "setNoReturnData", - "min": 21926, - "max": 43838, - "avg": 32882, - "calls": 2 - } - ], - "bytecodeSize": 5807, - "deployedBytecodeSize": 4636 - }, - "TestERC721": { - "name": "TestERC721", - "methods": [ - { - "method": "mint", - "min": 51492, - "max": 68784, - "avg": 65745, - "calls": 282 - }, - { - "method": "setApprovalForAll", - "min": 26195, - "max": 46095, - "avg": 45506, - "calls": 474 - } - ], - "bytecodeSize": 5238, - "deployedBytecodeSize": 4451 - }, - "TestInvalidContractOfferer": { - "name": "TestInvalidContractOfferer", - "methods": [ - { - "method": "activate", - "min": 201543, - "max": 201567, - "avg": 201555, - "calls": 2 - } - ], - "bytecodeSize": 7954, - "deployedBytecodeSize": 7764 - }, - "TestInvalidContractOffererRatifyOrder": { - "name": "TestInvalidContractOffererRatifyOrder", - "methods": [ - { - "method": "activate", - "min": null, - "max": null, - "avg": 201558, - "calls": 1 - } - ], - "bytecodeSize": 7957, - "deployedBytecodeSize": 7760 - }, - "TransferHelper": { - "name": "TransferHelper", - "methods": [ - { - "method": "bulkTransfer", - "min": 77935, - "max": 1428982, - "avg": 633808, - "calls": 3 - } - ], - "bytecodeSize": 4140, - "deployedBytecodeSize": 3865 - } - } -} \ No newline at end of file From 5686494b25c9f7546ed4ee445506c2dd88c86ccf Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Fri, 17 Feb 2023 17:28:45 -0800 Subject: [PATCH 11/13] bring reference contracts in line with optimized --- reference/lib/ReferenceOrderCombiner.sol | 33 ++++++++++++++++------- reference/lib/ReferenceOrderValidator.sol | 12 ++++----- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/reference/lib/ReferenceOrderCombiner.sol b/reference/lib/ReferenceOrderCombiner.sol index 766f8ab64..4cb34197a 100644 --- a/reference/lib/ReferenceOrderCombiner.sol +++ b/reference/lib/ReferenceOrderCombiner.sol @@ -668,6 +668,7 @@ contract ReferenceOrderCombiner is // duplicate recipient onto stack to avoid stack-too-deep address _recipient = recipient; + // Iterate over orders to ensure all consideration items are met. for (uint256 i = 0; i < ordersToExecute.length; ++i) { // Retrieve the order in question. @@ -764,6 +765,29 @@ contract ReferenceOrderCombiner is ]; } } + } + + // Trigger any remaining accumulated transfers via call to the conduit. + _triggerIfArmed(accumulatorStruct); + + // If any native token remains after fulfillments, return it to the + // caller. + if (nativeTokensRemaining != 0) { + _transferNativeTokens(payable(msg.sender), nativeTokensRemaining); + } + + // Iterate over orders to ensure all consideration items are met. + for (uint256 i = 0; i < ordersToExecute.length; ++i) { + // Retrieve the order in question. + OrderToExecute memory orderToExecute = ordersToExecute[i]; + + // Skip consideration item checks for order if not fulfilled. + if (orderToExecute.numerator == 0) { + continue; + } + + // Retrieve the original order in question. + AdvancedOrder memory advancedOrder = advancedOrders[i]; // Ensure restricted orders have valid submitter or pass check. _assertRestrictedAdvancedOrderValidity( @@ -778,15 +802,6 @@ contract ReferenceOrderCombiner is ); } - // Trigger any remaining accumulated transfers via call to the conduit. - _triggerIfArmed(accumulatorStruct); - - // If any native token remains after fulfillments, return it to the - // caller. - if (nativeTokensRemaining != 0) { - _transferNativeTokens(payable(msg.sender), nativeTokensRemaining); - } - // Return the array containing available orders. return availableOrders; } diff --git a/reference/lib/ReferenceOrderValidator.sol b/reference/lib/ReferenceOrderValidator.sol index aa4cb252d..da4b506d0 100644 --- a/reference/lib/ReferenceOrderValidator.sol +++ b/reference/lib/ReferenceOrderValidator.sol @@ -356,8 +356,8 @@ contract ReferenceOrderValidator is offer = _offer; consideration = _consideration; } catch { - // If decoding fails, revert or return empty. - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + // If decoding fails, revert. + revert InvalidContractOrder(orderHash); } } else { // If the call fails, revert or return empty. @@ -372,7 +372,7 @@ contract ReferenceOrderValidator is // Explicitly specified offer items cannot be removed. if (originalOfferLength > newOfferLength) { - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + revert InvalidContractOrder(orderHash); } else if (newOfferLength > originalOfferLength) { // If new offer items are added, extend the original offer. OfferItem[] memory extendedOffer = new OfferItem[]( @@ -417,7 +417,7 @@ contract ReferenceOrderValidator is originalOffer.token != newOffer.token || originalOffer.identifierOrCriteria != newOffer.identifier ) { - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + revert InvalidContractOrder(orderHash); } // Update the original amounts to use the generated amounts. @@ -447,7 +447,7 @@ contract ReferenceOrderValidator is // New consideration items cannot be created. if (newConsiderationLength > originalConsiderationArray.length) { - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + revert InvalidContractOrder(orderHash); } // Loop through and check consideration. @@ -484,7 +484,7 @@ contract ReferenceOrderValidator is originalConsideration.recipient != (newConsideration.recipient)) ) { - return _revertOrReturnEmpty(revertOnInvalid, orderHash); + revert InvalidContractOrder(orderHash); } // Update the original amounts to use the generated amounts. From 47952186146337d6284f80174636cf3744661e31 Mon Sep 17 00:00:00 2001 From: James Wenzel Date: Fri, 17 Feb 2023 17:39:16 -0800 Subject: [PATCH 12/13] update bad offerer tests --- test/foundry/offerers/BadOfferer.t.sol | 97 +++++++++++++++++++---- test/foundry/offerers/impl/BadOfferer.sol | 16 +++- 2 files changed, 95 insertions(+), 18 deletions(-) diff --git a/test/foundry/offerers/BadOfferer.t.sol b/test/foundry/offerers/BadOfferer.t.sol index bbdb35e26..94c05f15f 100644 --- a/test/foundry/offerers/BadOfferer.t.sol +++ b/test/foundry/offerers/BadOfferer.t.sol @@ -28,13 +28,18 @@ import { OrderType } from "../../../contracts/lib/ConsiderationEnums.sol"; -contract BadOffererTest is BaseOrderTest { +import { + ZoneInteractionErrors +} from "../../../contracts/interfaces/ZoneInteractionErrors.sol"; + +contract BadOffererTest is BaseOrderTest, ZoneInteractionErrors { BadOfferer badOfferer; struct Context { ConsiderationInterface seaport; uint256 id; bool eoa; + bool shouldFail; } function setUp() public override { @@ -52,50 +57,90 @@ contract BadOffererTest is BaseOrderTest { } function testNormalOrder() public { - uint256 id = 1; + uint256 id = uint256(BadOfferer.Path.NORMAL); test( this.execOrderWithContext, - Context({ seaport: consideration, id: id, eoa: false }) + Context({ + seaport: consideration, + id: id, + eoa: false, + shouldFail: false + }) ); test( this.execOrderWithContext, - Context({ seaport: referenceConsideration, id: id, eoa: false }) + Context({ + seaport: referenceConsideration, + id: id, + eoa: false, + shouldFail: false + }) ); } function testOrderNothing() public { - uint256 id = 2; + uint256 id = uint256(BadOfferer.Path.RETURN_NOTHING); test( this.execOrderWithContext, - Context({ seaport: consideration, id: id, eoa: false }) + Context({ + seaport: consideration, + id: id, + eoa: false, + shouldFail: true + }) ); test( this.execOrderWithContext, - Context({ seaport: referenceConsideration, id: id, eoa: false }) + Context({ + seaport: referenceConsideration, + id: id, + eoa: false, + shouldFail: true + }) ); } function testOrderRevert() public { - uint256 id = 3; + uint256 id = uint256(BadOfferer.Path.REVERT); test( this.execOrderWithContext, - Context({ seaport: consideration, id: id, eoa: false }) + Context({ + seaport: consideration, + id: id, + eoa: false, + shouldFail: false // shouldn't fail because the revert happens within GenerateOrder, so it can be safely skipped + }) ); test( this.execOrderWithContext, - Context({ seaport: referenceConsideration, id: id, eoa: false }) + Context({ + seaport: referenceConsideration, + id: id, + eoa: false, + shouldFail: false + }) ); } function testOrderGarbage() public { - uint256 id = 4; + uint256 id = uint256(BadOfferer.Path.RETURN_GARBAGE); test( this.execOrderWithContext, - Context({ seaport: consideration, id: id, eoa: false }) + Context({ + seaport: consideration, + id: id, + eoa: false, + shouldFail: true + }) ); test( this.execOrderWithContext, - Context({ seaport: referenceConsideration, id: id, eoa: false }) + Context({ + seaport: referenceConsideration, + id: id, + eoa: false, + shouldFail: true + }) ); } @@ -103,11 +148,21 @@ contract BadOffererTest is BaseOrderTest { uint256 id = 1; test( this.execOrderWithContext, - Context({ seaport: consideration, id: id, eoa: true }) + Context({ + seaport: consideration, + id: id, + eoa: true, + shouldFail: true + }) ); test( this.execOrderWithContext, - Context({ seaport: referenceConsideration, id: id, eoa: true }) + Context({ + seaport: referenceConsideration, + id: id, + eoa: true, + shouldFail: true + }) ); } @@ -132,6 +187,18 @@ contract BadOffererTest is BaseOrderTest { advancedOrders[1] = normalOrder; CriteriaResolver[] memory resolvers; + if (context.shouldFail) { + if (context.seaport == consideration) { + vm.expectRevert( + abi.encodeWithSelector( + InvalidContractOrder.selector, + bytes32(uint256(uint160(address(badOfferer))) << 96) + ) + ); + } else { + vm.expectRevert(); + } + } context.seaport.fulfillAvailableAdvancedOrders({ advancedOrders: advancedOrders, criteriaResolvers: resolvers, diff --git a/test/foundry/offerers/impl/BadOfferer.sol b/test/foundry/offerers/impl/BadOfferer.sol index 150bdf49a..51f5d151d 100644 --- a/test/foundry/offerers/impl/BadOfferer.sol +++ b/test/foundry/offerers/impl/BadOfferer.sol @@ -28,6 +28,13 @@ contract BadOfferer is ContractOffererInterface { ERC20Interface token1; ERC721Interface token2; + enum Path { + RETURN_GARBAGE, + NORMAL, + RETURN_NOTHING, + REVERT + } + constructor( address seaport, ERC20Interface _token1, @@ -73,7 +80,10 @@ contract BadOfferer is ContractOffererInterface { override returns (SpentItem[] memory offer, ReceivedItem[] memory consideration) { - if (maximumSpent[0].identifier == 1) { + Path path = Path( + maximumSpent[0].identifier > 3 ? 0 : maximumSpent[0].identifier + ); + if (path == Path.NORMAL) { offer = minimumReceived; consideration = new ReceivedItem[](1); consideration[0] = ReceivedItem({ @@ -84,12 +94,12 @@ contract BadOfferer is ContractOffererInterface { recipient: payable(address(this)) }); return (offer, consideration); - } else if (maximumSpent[0].identifier == 2) { + } else if (path == Path.RETURN_NOTHING) { // return nothing assembly { return(0, 0) } - } else if (maximumSpent[0].identifier == 3) { + } else if (path == Path.REVERT) { revert IntentionalRevert(); } else { // return garbage From 92765ef817d814e6e1d8ee7d9b256b806c7f2299 Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Sat, 18 Feb 2023 21:26:04 -0800 Subject: [PATCH 13/13] update with 1.4 deployment address --- README.md | 111 ++++++++++++------------------------------------------ 1 file changed, 24 insertions(+), 87 deletions(-) diff --git a/README.md b/README.md index fcf0f1d3d..688c06f55 100644 --- a/README.md +++ b/README.md @@ -56,19 +56,24 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts 0x0000000000000aD24e80fd803C6ac37206a45f15 +Seaport 1.4 +0x00000000000001ad428e4906aE43D8F9852d0dD6 + + ConduitController 0x00000000F9490004C11Cef243f5400493c00Ad63 +> Note: Seaport 1.2 and Seaport 1.3 both contain known limitations; proceed with caution if interacting with them, particularly when utilizing restricted or contract orders. + ### Deployments By EVM Chain - - + @@ -78,11 +83,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts
Network Seaport 1.1Seaport 1.2Seaport 1.3Seaport 1.4 ConduitController
-[0x00000000000006c7676171937C444f6BDe3D6282](https://etherscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://etherscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://etherscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -95,11 +96,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://goerli.etherscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://goerli.etherscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://goerli.etherscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -112,11 +109,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://sepolia.etherscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://sepolia.etherscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://sepolia.etherscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -129,11 +122,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://polygonscan.com/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://polygonscan.com/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://polygonscan.com/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -146,11 +135,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://mumbai.polygonscan.com/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://mumbai.polygonscan.com/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://mumbai.polygonscan.com/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -163,11 +148,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://scope.klaytn.com/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://scope.klaytn.com/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://scope.klaytn.com/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -180,11 +161,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://baobab.scope.klaytn.com/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://baobab.scope.klaytn.com/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://baobab.scope.klaytn.com/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -197,11 +174,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://optimistic.etherscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://optimistic.etherscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://optimistic.etherscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -214,11 +187,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://goerli-optimism.etherscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://goerli-optimism.etherscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://goerli-optimism.etherscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -231,11 +200,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://arbiscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://arbiscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://arbiscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -248,11 +213,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://goerli.arbiscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://goerli.arbiscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://goerli.arbiscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -265,11 +226,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://nova.arbiscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://nova.arbiscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://nova.arbiscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -282,11 +239,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://snowtrace.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://snowtrace.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://snowtrace.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -299,11 +252,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://testnet.snowtrace.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://testnet.snowtrace.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://testnet.snowtrace.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -316,11 +265,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://gnosisscan.io/address/0x00000000000006c7676171937C444f6BDe3D6282#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://gnosisscan.io/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://gnosisscan.io/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -333,11 +278,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://bscscan.com/address/0x00000000006c3852cbEf3e08E8dF289169EdE581#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://bscscan.com/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://bscscan.com/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code) @@ -350,11 +291,7 @@ See the [documentation](docs/SeaportDocumentation.md), the [interface](contracts -[0x00000000000006c7676171937C444f6BDe3D6282](https://testnet.bscscan.com/address/0x00000000006c3852cbEf3e08E8dF289169EdE581#code) - - - -[0x0000000000000aD24e80fd803C6ac37206a45f15](https://testnet.bscscan.com/address/0x0000000000000ad24e80fd803c6ac37206a45f15#code) +[0x00000000000001ad428e4906aE43D8F9852d0dD6](https://testnet.bscscan.com/address/0x00000000000001ad428e4906aE43D8F9852d0dD6#code)