Skip to content
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

Merged
merged 1,013 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1013 commits
Select commit Hold shift + click to select a range
119e457
fix typos
mirkopezo Apr 14, 2023
e9f8a25
Merge pull request #1150 from ProjectOpenSea/horsefacts/more-error-cases
0age Apr 14, 2023
12de5fa
fuzz on criteria items less frequently for performance
0age Apr 14, 2023
3caa72c
Merge pull request #1152 from ProjectOpenSea/less-criteria-fuzzing
0age Apr 14, 2023
fd3811d
add first case of approval failures
0age Apr 14, 2023
4e7a641
add assume metrics
horsefacts Apr 14, 2023
832df19
extract single vm constant
horsefacts Apr 14, 2023
00d9290
Merge pull request #1154 from ProjectOpenSea/horsefacts/vm-metrics
0age Apr 14, 2023
ba5bf2c
Merge branch '1.5' into approval-failures
0age Apr 15, 2023
57d7c5c
handle revert reasons and clean up edge cases
0age Apr 15, 2023
44de465
update direct test
0age Apr 15, 2023
2a4c6e3
include caller approvals
0age Apr 15, 2023
0f46de6
add insufficient native token test
0age Apr 15, 2023
fe35337
lint
0age Apr 15, 2023
619af90
clean up calculation for providing native tokens
0age Apr 16, 2023
7244b50
deal with unspent cases and keep fixing the algo
0age Apr 16, 2023
d3153a2
fix revert reason
0age Apr 16, 2023
4fdb958
search in both cases
0age Apr 16, 2023
da0897e
handle case where it is in first position
0age Apr 16, 2023
9dae4a2
add bulk sig height and index to space
Apr 17, 2023
fa2a4af
add fulfillment failure
Apr 17, 2023
b1a85ea
add a failure for missing component
Apr 17, 2023
0cbf813
pass through nativeTokensSupplied
0age Apr 17, 2023
2672aef
Merge pull request #1153 from ProjectOpenSea/approval-failures
0age Apr 17, 2023
b2551d4
Merge pull request #1155 from ProjectOpenSea/dan/2023/04/add-bulk-sig…
0age Apr 17, 2023
a0f9eaa
Merge pull request #1151 from mirkopezo/fix-typos
0age Apr 17, 2023
51b29b8
remove failure assume
0age Apr 17, 2023
204be59
checking in to pull latest
Apr 17, 2023
fd17e01
Merge pull request #1157 from ProjectOpenSea/remove-failure-assume
0age Apr 17, 2023
e0ad299
prep resolvers & rename OrderEligibilityLib => MutationEligibilityLib
0age Apr 17, 2023
5f0b24a
prep the failures
0age Apr 17, 2023
8fbb58d
more prep and refactoring
0age Apr 17, 2023
b0055ad
Merge pull request #1159 from ProjectOpenSea/criteria-resolver-failur…
0age Apr 17, 2023
9573f67
add CriteriaNotEnabledForItem failure test
0age Apr 17, 2023
6a286b9
add InvalidProof_Merkle & InvalidProof_Wildcard
0age Apr 17, 2023
a7f7c70
add OrderCriteriaResolverOutOfRange
0age Apr 17, 2023
4137973
add Offer + Criteria CriteriaResolverOutOfRange
0age Apr 18, 2023
09d24bb
add unresolved criteria failures
0age Apr 18, 2023
f1908ee
Merge pull request #1160 from ProjectOpenSea/resolver-failure-fuzz
0age Apr 18, 2023
96e7721
🤦
0age Apr 18, 2023
765a7cb
deal with inbound native tokens from contract offerers
0age Apr 18, 2023
4582d95
add a missing filter on a mutation
0age Apr 18, 2023
47847d4
fail city
0age Apr 18, 2023
9030a71
handle receiving native tokens as part of standard orders
0age Apr 18, 2023
61aab58
prep native token expectations for contract orders
0age Apr 18, 2023
40441d6
fix merge conflict and kind of fix fulfillment failure
Apr 18, 2023
813d896
possibly messy merge conflict fix
Apr 18, 2023
bb1a3d4
insert extra execution for native tokens supplied from contract offerers
0age Apr 18, 2023
61ff076
handle skipped contract orders where nonce is not incremented
0age Apr 18, 2023
7505cf0
do not double-count native executions
0age Apr 18, 2023
8f4c33e
put the assume back
0age Apr 18, 2023
4317966
include native offer items in non-match value
0age Apr 18, 2023
8bfd318
deal in non-match case for contract order offer items
0age Apr 18, 2023
1020139
undo dealing offer in non-match case
0age Apr 18, 2023
7434d75
Add isContract to OrderDetails
d1ll0n Apr 18, 2023
66515be
start revising execution helper
0age Apr 18, 2023
3fd946f
add mapWithArg
d1ll0n Apr 18, 2023
8e4dd63
Add pre/post implicit execution distinction
d1ll0n Apr 18, 2023
d58550c
Add fuzz scripts
d1ll0n Apr 18, 2023
99fcbc1
set implicit pre executions for fulfill case
d1ll0n Apr 18, 2023
b21d0b1
fix flattenThree malloc
d1ll0n Apr 18, 2023
b353b6f
handle an incorrect revert
0age Apr 18, 2023
e62f35f
skip unavailable orders, calculate pre implicit executions prior to e…
d1ll0n Apr 18, 2023
e69c38f
undo setting offerer to seaport on explicit executions
d1ll0n Apr 18, 2023
0368688
use seaport as implicit offerer on standard consideration executions
0age Apr 18, 2023
d8705ab
make progress on contract order fuzz reintroduction
0age Apr 18, 2023
373a653
Update test/foundry/new/helpers/FuzzGenerators.sol
0age Apr 18, 2023
88a8b19
Merge pull request #1162 from ProjectOpenSea/contract-order-fuzz-prog…
0age Apr 18, 2023
f246fc4
calculate pre-implicit prior to explicit in match
d1ll0n Apr 18, 2023
cc3cf42
fix straggler issues
d1ll0n Apr 18, 2023
317512b
don't dupe callvalue
d1ll0n Apr 18, 2023
122fb67
remove no contract assume
d1ll0n Apr 18, 2023
50d6064
add sanity check for flattened executions list
d1ll0n Apr 18, 2023
91f3a32
Merge branch '1.5' into fix-contract-order-fuzzing
0age Apr 18, 2023
6999149
scrub conduitKey from native pre executions
0age Apr 19, 2023
19facbc
chipping away at mismatched fulfillment
Apr 19, 2023
22d82e9
Add InvalidMsgValue
horsefacts Apr 19, 2023
af0975e
deal to caller in mutation
horsefacts Apr 19, 2023
9064313
use stored value for debug
0age Apr 19, 2023
1ab138c
copy fulfillment details in execution helper and pass through returne…
0age Apr 19, 2023
e8778b9
pass nativeTokensSupplied all the way through
0age Apr 19, 2023
5331e3e
simplify calculation of minimum call value and store it
0age Apr 19, 2023
f81fbf0
fix dumb last-minute compiler error
0age Apr 19, 2023
cb08644
Merge pull request #1163 from ProjectOpenSea/fix-contract-order-fuzzing
0age Apr 19, 2023
44cec9d
Merge pull request #1164 from ProjectOpenSea/horsefacts/invalid-msg-v…
0age Apr 19, 2023
2f4df83
Merge branch '1.5' into dan/2023/04/add-invalid-fulfillment-failure
0age Apr 19, 2023
106e6f5
fix up failure tests and add a new one
0age Apr 19, 2023
9f4fc97
resign modified orders in mutation
0age Apr 19, 2023
fb6af62
lint and persist signature method
0age Apr 19, 2023
bdeb872
Merge pull request #1156 from ProjectOpenSea/dan/2023/04/add-invalid-…
0age Apr 19, 2023
60ccbdf
fuzz coverage: gotta start somewhere!
horsefacts Apr 20, 2023
1b0d8e2
add zone and contract failure reasons and some logic
jameswenzel Apr 14, 2023
035c6a1
initial mutations
jameswenzel Apr 20, 2023
517d89b
revert all changes to validationoffererzone
jameswenzel Apr 20, 2023
54bed49
strip function selector from prng state
0age Apr 20, 2023
2157de2
revise approach to generating initial seed state
0age Apr 20, 2023
659342a
add concrete basic + basic efficient
0age Apr 20, 2023
5b9d3a9
add a bunch of concrete fuzz coverage cases
0age Apr 20, 2023
b685591
skip a random concrete coverage tests that causes an assume
0age Apr 20, 2023
e44c009
Merge branch '1.5' into horsefacts/fuzz-coverage
0age Apr 20, 2023
f69b6d9
Merge pull request #1165 from ProjectOpenSea/horsefacts/fuzz-coverage
0age Apr 20, 2023
70965ea
move over to HashCalldataContractOfferer and make some tweaks
0age Apr 20, 2023
4542ada
add a failure test
0age Apr 20, 2023
374bacc
use bubbled up revert reason
0age Apr 20, 2023
9ddc70b
knock out a number of additional failure tests
0age Apr 20, 2023
693d9e8
Merge branch '1.5' into more-contract-failure-tests
0age Apr 20, 2023
5f7c18a
add another contract failure
0age Apr 20, 2023
5fd05fa
put order hash in mutation context and expected revert reason
0age Apr 20, 2023
85539a0
whoops
0age Apr 20, 2023
b6b829c
one more
0age Apr 20, 2023
3e41fd3
and one warning too
0age Apr 20, 2023
e001a55
scope failure reasons to specific orders
0age Apr 20, 2023
3d5371c
Merge pull request #1166 from ProjectOpenSea/more-contract-failure-tests
0age Apr 20, 2023
d1c628f
prep zone implementation for per-order failure states
0age Apr 20, 2023
957fad7
add zone tests (and do some random cleanup)
0age Apr 20, 2023
ac00dd7
include the actual mutations and cleanup
0age Apr 20, 2023
fab8fe6
missing item amount errors
horsefacts Apr 20, 2023
077cac9
Exclude match/fulfill
horsefacts Apr 20, 2023
db83797
fix expected zone revert reason
0age Apr 20, 2023
164b318
Merge pull request #1167 from ProjectOpenSea/zone-failure-tests
0age Apr 20, 2023
894ad95
wip: missing item amount + fullfillAvailable
horsefacts Apr 21, 2023
0170d8e
set endAmount to 0 instead of startAmount
0age Apr 21, 2023
96f17d8
add failure tests for different start & end amount on contract orders
0age Apr 21, 2023
5c252c8
fix a linter error
0age Apr 21, 2023
5af82d2
do not select a specific order to operate on
0age Apr 21, 2023
ede3862
Merge pull request #1169 from ProjectOpenSea/more-contract-fuzzing
0age Apr 21, 2023
5631b4c
Merge branch '1.5' into horsefacts/missing-item-amount-errors
0age Apr 21, 2023
b69b62e
Merge branch '1.5' into horsefacts/missing-item-amount-errors
0age Apr 21, 2023
aa84a94
remove an unimplemented test
0age Apr 21, 2023
d04bcb9
Merge pull request #1168 from ProjectOpenSea/horsefacts/missing-item-…
0age Apr 21, 2023
ba44fdd
fix active time filter
0age Apr 21, 2023
642910d
layer in maxFulfilled check
0age Apr 21, 2023
3357774
work on more failure test edge cases
0age Apr 21, 2023
1b2fa3e
Merge pull request #1170 from ProjectOpenSea/fix-up-contract-fuzz-fai…
0age Apr 21, 2023
83f7cf0
fix fulfillbasic order mutation edge case bug
Apr 21, 2023
f99aaa0
Merge pull request #1172 from ProjectOpenSea/dan/2023/04/fix-fulfillb…
0age Apr 21, 2023
abcf81d
add a ContractOrderRebate space
0age Apr 21, 2023
345ef9e
UnusedItemParameters errors
horsefacts Apr 21, 2023
db92ffb
Merge pull request #1174 from ProjectOpenSea/horsefacts/item-parameters
0age Apr 21, 2023
b430ffe
fuzz on rebate and constrain options
0age Apr 21, 2023
122aff2
invalid ERC721 amount
horsefacts Apr 21, 2023
ff81a8b
only derive order hashes once
0age Apr 21, 2023
084baa5
prep prepareRebates amendment
0age Apr 21, 2023
2897347
maybe finally a no contract failure
Apr 21, 2023
81cb4e4
cursed merge conflict fix of course
Apr 21, 2023
ca73c78
wip: consideration length errors
horsefacts Apr 20, 2023
6d0fc6a
initialOrders => previewedOrders
0age Apr 21, 2023
12f794b
MissingOriginalConsiderationItems
horsefacts Apr 21, 2023
d8de96c
sort metrics alphabetically
horsefacts Apr 21, 2023
d627b96
clean up use of orderDetails
0age Apr 21, 2023
c364b10
remove unused function
0age Apr 21, 2023
223d60d
fix a compiler warning
0age Apr 21, 2023
ed0e762
small correction to mutation
0age Apr 21, 2023
f54910d
prevent modifying contracts for failure when already modified
0age Apr 21, 2023
9af8a5b
pay out native tokens *after* applying mutations
0age Apr 21, 2023
09054d1
partial fills not enabled
horsefacts Apr 21, 2023
2969009
deal with an OOR issue on a mutation
0age Apr 21, 2023
4a58805
handle more OOR stuff
0age Apr 21, 2023
db90d53
deal with case where amount change is reapplied
0age Apr 21, 2023
5b5191d
unmet consideration item
horsefacts Apr 21, 2023
f64fae7
oops
0age Apr 21, 2023
eb217b6
only mutate if the item exists lol
0age Apr 21, 2023
2af3265
fix OOR on applyItemAmountMutation
0age Apr 22, 2023
b05f945
select an eligible item index
0age Apr 22, 2023
b23a042
clean up some MissingItemAmount mutations
0age Apr 22, 2023
74b0674
one more cleanup?
0age Apr 22, 2023
75e8928
ok another one
0age Apr 22, 2023
d48f941
andddd another
0age Apr 22, 2023
dca58c0
update a concrete tripped assume
0age Apr 22, 2023
79d8b79
add fraction-util without other changes
0age Apr 22, 2023
2c00f88
remove breakpoint
0age Apr 22, 2023
a4d081e
Merge branch '1.5' into fancy-contract-offerers
0age Apr 22, 2023
f50eaf0
just set up a blocker for orders with rebates for now
0age Apr 22, 2023
9491a9d
Merge pull request #1181 from ProjectOpenSea/james/fractionutil-only-…
0age Apr 22, 2023
1547ee1
Merge pull request #1173 from ProjectOpenSea/fancy-contract-offerers
0age Apr 22, 2023
d71717a
Merge branch '1.5' into horsefacts/invalid-erc721-transfer-amount
0age Apr 22, 2023
2ab4e44
Merge branch '1.5' into dan/2023/04/no-contract
0age Apr 22, 2023
d884745
Merge branch '1.5' into horsefacts/consideration-length-errors
0age Apr 22, 2023
1e23293
Merge branch '1.5' into horsefacts/partial-fills-not-enabled
0age Apr 22, 2023
d03df5d
Merge branch '1.5' into horsefacts/unmet-consideration-item
0age Apr 22, 2023
fb1e2d9
meh
0age Apr 22, 2023
163f84e
Merge pull request #1176 from ProjectOpenSea/dan/2023/04/no-contract
0age Apr 22, 2023
aff101c
Merge pull request #1177 from ProjectOpenSea/horsefacts/consideration…
0age Apr 22, 2023
5854e11
Merge pull request #1178 from ProjectOpenSea/horsefacts/partial-fills…
0age Apr 22, 2023
37ead5c
Merge branch '1.5' into horsefacts/unmet-consideration-item
0age Apr 22, 2023
5f5c2ef
the joys of merge conflicts
0age Apr 22, 2023
f49985f
another
0age Apr 22, 2023
7963557
Merge pull request #1179 from ProjectOpenSea/horsefacts/unmet-conside…
0age Apr 22, 2023
fbc972f
Merge branch '1.5' into horsefacts/invalid-erc721-transfer-amount
0age Apr 22, 2023
ac7cbc8
Update test/foundry/new/helpers/FuzzMutationSelectorLib.sol
0age Apr 22, 2023
1086f6e
lil merge cleanup
0age Apr 22, 2023
22e5ba1
tiny formatting stuff
0age Apr 22, 2023
32e2dbf
missing matchOrders filter
0age Apr 22, 2023
6838301
handle a random edge case
0age Apr 22, 2023
1684ff6
mmm name the arg
0age Apr 22, 2023
9470413
Merge pull request #1175 from ProjectOpenSea/horsefacts/invalid-erc72…
0age Apr 22, 2023
9300c4d
add inexact fraction, panic, and no specified order failure tests
0age Apr 22, 2023
636b066
remove no specified case for now
0age Apr 22, 2023
b80cbd5
fix another test
0age Apr 22, 2023
3f8b344
keep the existing action filter in
0age Apr 22, 2023
cdf38d0
reintroduce InvalidConduit
0age Apr 22, 2023
fcb7c4c
one more fix
0age Apr 22, 2023
a8193fa
Merge pull request #1182 from ProjectOpenSea/pick-off-a-few-more
0age Apr 22, 2023
02deaa2
do some little fixes
0age Apr 22, 2023
cf52620
Merge pull request #1183 from ProjectOpenSea/little-fixes
0age Apr 22, 2023
a82e736
add FulfillmentDetails versions of basic + standard
0age Apr 23, 2023
602fee2
refactor derivers to prep for fulfillment re-roll
0age Apr 23, 2023
8a84916
support "direct in"
0age Apr 23, 2023
c4755c8
did that do it?!?
0age Apr 23, 2023
1348752
Merge pull request #1184 from ProjectOpenSea/little-fixes
0age Apr 23, 2023
d2b095e
add some helpers for getting smallest denominator
0age Apr 24, 2023
f460eb8
continue fleshing out helpers
0age Apr 24, 2023
221da3d
add invalid encoding type
0age Apr 24, 2023
d0c65cf
failures for NoSpecifiedOrdersAvailable
horsefacts Apr 24, 2023
d54dae3
one more revision to fuzz helpers
0age Apr 24, 2023
bd769a1
add a function for amending state to inscribe partial fill fractions
0age Apr 24, 2023
d98dcba
include expectedFillFractions in test context
0age Apr 24, 2023
34d189c
ok give this a try
0age Apr 24, 2023
af615e9
run it
0age Apr 24, 2023
ff2ed45
constrain pre exec state based on order type
0age Apr 24, 2023
517e737
actually set the right length for expectedFillFractions
0age Apr 24, 2023
153d658
handle lcm overflow where we can, toss in an assume otherwise
0age Apr 24, 2023
1e6ea60
update an assert msg
0age Apr 24, 2023
b165fa8
generateOrder revert failure case
horsefacts Apr 24, 2023
b383b23
add invalid encoding case
horsefacts Apr 24, 2023
60f2b0b
exclude cases with 721 items from partial-on-partial for now
0age Apr 24, 2023
1086bbf
put original inputs into FractionResults
0age Apr 24, 2023
513e4c8
expect skipped partials to have the same initial state
0age Apr 24, 2023
ead15f3
clean up fuzz coverage tests
0age Apr 24, 2023
4bafe60
Merge pull request #1185 from ProjectOpenSea/partial-partial
0age Apr 24, 2023
b2a4d1a
Merge pull request #1186 from ProjectOpenSea/horsefacts/no-specified-…
0age Apr 24, 2023
a2924df
Merge pull request #1187 from ProjectOpenSea/contract-generate-failures
0age Apr 24, 2023
874060a
fuzz on generate order skipping
0age Apr 24, 2023
ced6132
fix little compiler error
0age Apr 25, 2023
7a00963
inscribe the generate order revert state
0age Apr 25, 2023
3d92747
include REVERT in available check
0age Apr 25, 2023
e78a982
remove an unnecessary check
0age Apr 25, 2023
3e223bb
handle unavailable in ZoneParametersLib
0age Apr 25, 2023
8d5b271
add missing import
0age Apr 25, 2023
2bb905b
include in filter and clean some warnings up
0age Apr 25, 2023
2acad3a
fix another one
0age Apr 25, 2023
b3cc5d6
Merge pull request #1188 from ProjectOpenSea/generate-order-skips
0age Apr 25, 2023
2e6a00b
use lightly-modified reference code for FractionUtil
0age Apr 25, 2023
11dae5d
add some comments to OrderValidator for partial fills
0age Apr 25, 2023
233d66f
fix direct tests and compiler warnings
0age Apr 25, 2023
4750599
Merge pull request #1190 from ProjectOpenSea/fix-up-fraction-util
0age Apr 25, 2023
7252356
Merge pull request #1191 from ProjectOpenSea/order-validator-comment-…
0age Apr 25, 2023
4b2bb5f
fix a filter
0age Apr 25, 2023
2fc7baa
actually check generateOrder + ratifyOrder calldata lol
0age Apr 26, 2023
5723c76
Merge pull request #1195 from ProjectOpenSea/contract-order-calldata-…
0age Apr 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"commitHash": "bb5d39539354e96cf6e69ad107906a0b6a46ea91",
"commitHash": "10d78fe57eb635a6d8a85e34236aa29548a1b52f",
"contractReports": {
"Conduit": {
"name": "Conduit",
"methods": [
{
"method": "execute",
"min": 77435,
"max": 2179914,
"avg": 451436,
"max": 2232387,
"avg": 460181,
"calls": 6
},
{
Expand All @@ -21,8 +21,8 @@
{
"method": "executeWithBatch1155",
"min": 97669,
"max": 361418,
"avg": 228749,
"max": 361430,
"avg": 228746,
"calls": 4
},
{
Expand Down Expand Up @@ -71,7 +71,7 @@
"method": "updateChannel",
"min": 34454,
"max": 121098,
"avg": 117293,
"avg": 117294,
"calls": 71
}
],
Expand Down Expand Up @@ -106,7 +106,7 @@
"method": "registerDigest",
"min": 22239,
"max": 44151,
"avg": 36843,
"avg": 36847,
"calls": 3
},
{
Expand Down Expand Up @@ -148,7 +148,7 @@
"method": "cancelOrders",
"min": null,
"max": null,
"avg": 65327,
"avg": 65339,
"calls": 1
}
],
Expand Down Expand Up @@ -176,14 +176,14 @@
"method": "assignPauser",
"min": null,
"max": null,
"avg": 47183,
"avg": 47171,
"calls": 1
},
{
"method": "cancelOrders",
"min": null,
"max": null,
"avg": 73870,
"avg": 73894,
"calls": 1
},
{
Expand All @@ -195,23 +195,23 @@
},
{
"method": "createZone",
"min": 1154302,
"max": 1154314,
"avg": 1154312,
"min": null,
"max": null,
"avg": 1154314,
"calls": 31
},
{
"method": "executeMatchAdvancedOrders",
"min": null,
"max": null,
"avg": 289151,
"avg": 289127,
"calls": 2
},
{
"method": "executeMatchOrders",
"min": null,
"max": null,
"avg": 282751,
"avg": 282727,
"calls": 2
},
{
Expand All @@ -225,7 +225,7 @@
"method": "transferOwnership",
"min": null,
"max": null,
"avg": 47199,
"avg": 47187,
"calls": 2
}
],
Expand All @@ -238,8 +238,8 @@
{
"method": "prepare",
"min": 49267,
"max": 2351690,
"avg": 1061771,
"max": 2351702,
"avg": 1061791,
"calls": 26
}
],
Expand All @@ -251,37 +251,37 @@
"methods": [
{
"method": "cancel",
"min": 41226,
"max": 58374,
"avg": 54030,
"min": 41250,
"max": 58422,
"avg": 54038,
"calls": 16
},
{
"method": "fulfillAdvancedOrder",
"min": 96288,
"max": 225181,
"avg": 159350,
"avg": 160736,
"calls": 194
},
{
"method": "fulfillAvailableAdvancedOrders",
"min": 149626,
"max": 260680,
"avg": 203090,
"max": 305236,
"avg": 209036,
"calls": 30
},
{
"method": "fulfillAvailableOrders",
"min": 164986,
"max": 215752,
"avg": 201359,
"avg": 201368,
"calls": 21
},
{
"method": "fulfillBasicOrder",
"min": 90639,
"max": 1621627,
"avg": 598705,
"avg": 598707,
"calls": 187
},
{
Expand All @@ -295,7 +295,7 @@
"method": "fulfillOrder",
"min": 119409,
"max": 225080,
"avg": 176770,
"avg": 178008,
"calls": 108
},
{
Expand All @@ -308,41 +308,41 @@
{
"method": "matchAdvancedOrders",
"min": 179574,
"max": 300473,
"avg": 248933,
"calls": 77
"max": 300485,
"avg": 249389,
"calls": 75
},
{
"method": "matchOrders",
"min": 157522,
"max": 348207,
"avg": 264552,
"calls": 151
"avg": 264801,
"calls": 149
},
{
"method": "validate",
"min": 53201,
"max": 83910,
"avg": 73546,
"max": 83922,
"avg": 73545,
"calls": 29
}
],
"bytecodeSize": 26114,
"deployedBytecodeSize": 24389
"bytecodeSize": 26128,
"deployedBytecodeSize": 24403
},
"SeaportRouter": {
"name": "SeaportRouter",
"methods": [
{
"method": "fulfillAvailableAdvancedOrders",
"min": 183954,
"max": 311883,
"avg": 233586,
"min": 183796,
"max": 311939,
"avg": 233615,
"calls": 6
}
],
"bytecodeSize": 6345,
"deployedBytecodeSize": 6158
"bytecodeSize": 6417,
"deployedBytecodeSize": 6230
},
"TestContractOfferer": {
"name": "TestContractOfferer",
Expand Down Expand Up @@ -400,15 +400,15 @@
"method": "mint",
"min": 47235,
"max": 49879,
"avg": 49421,
"calls": 236
"avg": 49474,
"calls": 273
},
{
"method": "setApprovalForAll",
"min": 26102,
"max": 46002,
"avg": 45380,
"calls": 448
"avg": 45468,
"calls": 522
}
],
"bytecodeSize": 4173,
Expand All @@ -421,8 +421,8 @@
"method": "approve",
"min": 28881,
"max": 46245,
"avg": 45780,
"calls": 338
"avg": 45749,
"calls": 292
},
{
"method": "blockTransfer",
Expand All @@ -433,10 +433,10 @@
},
{
"method": "mint",
"min": 33982,
"min": 33994,
"max": 68458,
"avg": 67466,
"calls": 164
"avg": 67348,
"calls": 141
},
{
"method": "setNoReturnData",
Expand All @@ -456,15 +456,15 @@
"method": "mint",
"min": 51492,
"max": 68796,
"avg": 66042,
"calls": 315
"avg": 65926,
"calls": 301
},
{
"method": "setApprovalForAll",
"min": 26195,
"max": 46095,
"avg": 45578,
"calls": 540
"avg": 45550,
"calls": 512
}
],
"bytecodeSize": 5238,
Expand Down Expand Up @@ -504,8 +504,8 @@
{
"method": "bulkTransfer",
"min": 77935,
"max": 1492854,
"avg": 664509,
"max": 1438866,
"avg": 632608,
"calls": 3
}
],
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ html
lcov.info

test/utils/eip712/gen.sol
.gas_reports/*.md
.gas_reports/*.md

# fuzz metrics
metrics.txt
*-metrics.txt

fuzz_debug.json
20 changes: 14 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/ds-test"]
path = lib/ds-test
url = https://github.com/dapphub/ds-test
[submodule "lib/murky"]
path = lib/murky
url = https://github.com/dmfxyz/murky
Expand All @@ -13,3 +7,17 @@
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/transmissions11/solmate
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = v1.5.0
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady
branch = v0.0.84
[submodule "lib/solarray"]
path = lib/solarray
url = https://github.com/emo-eth/solarray
[submodule "lib/ds-test"]
path = lib/ds-test
url = https://github.com/dapphub/ds-test
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,15 @@ yarn profile

### Foundry Tests

Seaport also includes a suite of fuzzing tests written in solidity with Foundry.
Seaport also includes a suite of fuzzing tests written in Solidity with Foundry.

Before running these tests, you will need to compile an optimized build by running:

```bash
FOUNDRY_PROFILE=optimized forge build
```

This should create an `optimized-out/` directory in your project root.

To run tests with full traces and debugging with source, create an `.env` file with the following line:

Expand All @@ -397,7 +405,7 @@ FOUNDRY_PROFILE=debug

You may then run tests with `forge test`, optionally specifying a level of verbosity (anywhere from one to five `v`'s, eg, `-vvv`)

This will compile tests and contracts without `via-ir` enabled, which is must faster, but will not exactly match the deployed bytecode.
This will compile tests and contracts without `via-ir` enabled, which is much faster, but will not exactly match the deployed bytecode.

To run tests against the actual bytecode intended to be deployed on networks, you will need to pre-compile the contracts, and remove the `FOUNDRY_PROFILE` variable from your `.env` file. **Note** that informative error traces may not be available, and the Forge debugger will not show the accompanying source code.

Expand All @@ -410,10 +418,12 @@ To run Forge coverage tests and open the generated coverage report locally:

```bash
brew install lcov
SEAPORT_COVERAGE=true forge coverage --report summary --report lcov && genhtml lcov.info -o html --branch
SEAPORT_COVERAGE=true forge coverage --report summary --report lcov && lcov -o lcov.info --remove lcov.info --rc lcov_branch_coverage=1 --rc lcov_function_coverage=1 "test/*" "script/*" && genhtml lcov.info -o html --branch
open html/index.html
```

When working on the test suite based around `FuzzEngine.sol`, using `FOUNDRY_PROFILE=moat_debug` will cut compile times roughly in half.

**Note** that Forge does not yet ignore specific filepaths when running coverage tests.

For information on Foundry, including installation and testing, see the [Foundry Book](https://book.getfoundry.sh/).
Expand Down
2 changes: 1 addition & 1 deletion contracts/Seaport.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Consideration } from "./lib/Consideration.sol";

/**
* @title Seaport
* @custom:version 1.4
* @custom:version 1.5
* @author 0age (0age.eth)
* @custom:coauthor d1ll0n (d1ll0n.eth)
* @custom:coauthor transmissions11 (t11s.eth)
Expand Down
Loading