Commit 27d0e57
Marketplace V3 + Latest Plugin Pattern (#308)
* first pass at extension interfaces
* forge updates
* DirectListings extension WIP
* english auction
* wip Offers.sol
* getOffers
* getOffers update
* update DirectListings
* update interfaces
* optimize
* optimize
* Format DirectListings in library storage code pattern
* DirectListings timestamps
* Offers: library storage pattern
* EnglishAuctions: library storage pattern
* marketplace implementation
* forge update
* WIP Marketplace entrypoint
* Inherit relevant extensions in entrypoint
* Add fallback logic to entrypoint
* rename extensions -> extension
* Write funcSig -> ext address Map contract
* Fix compilation errors
* run prettier
* remove unused Context
* Cleanup extensions inherited by entrypoint
* replace IContext with ERC2771ContextConsumer
* Fix typos lisiting -> listing
* use platform fee extension in DirectListings
* add totalListings to IDirectListings
* Create DirectListings test
* Add totalAuctions view fn to EnglishAuctions
* remove redundant native token from Offers
* remove PlatformFee from marketplace extensions storage
* Marketplace tests scaffolding
* DirectListings: add createListing tests
* DirectListings: add updateListing tests
* DirectListings: add cancelListing tests
* Use modifier in approveCurrencyForListing
* DirectListings: add approveBuyerForListing tests
* DirectListings: add view fns for mappings in state
* DirectListings: add approveCurrencyForListing tests
* DirectListings fix: provide expected currency and total price in buyFromListing
* DirectListings fix: startTimestamps are inclusive
* DirectListings: add buyFromListing tests
* cannot fuzz view fns quick enough
* EnglishAuctions: add createAuction tests
* EnglishAuctions: cancel auctions only when no bids
* EnglishAuctions: correct timestamps
* EnglishAuctions: add tests for cancelAuction
* EnglishAuctions: add tests for bidInAuction
* EnglishAuctions: add tests for collectAuctionPayout and collectAuctionTokens
* EnglishAuctions: tests for view functions
* Offers: tests for makeOffer
* Offers: tests for cancelOffer
* Offers: change payout to currencyTransferWithWrapper
* Offers: tests for acceptOffer
* correct timestamps
* Offers: tests for view functions
* remove regular implementations of extensions
* Update require statement
* Give startTimestamp a 1 hour buffer
* Cleanup: createListing related logic
* cleanup require statments
* update comments for updateListing
* cleanup DirectListings
* Cleanup directlistings file
* Add rest of the code comments to IMarketplace
* remove updateAuction
* Cleanup EnglishAuctions
* DirectListings: use onlyExistingListing modifier in getListing
* consistent behavior of getAll.. functions
* wip cleanup Offers
* cleanup offers
* Fix DirectListings tests
* Fix EnglighAuctions test
* Fix Offers tests
* re-organize marketplace files
* docs update
* docs update
* pkg bump
* pkg release
* Fix: (C-1) Marketplace funds can be drained due to lack of auction payout accounting
* Fix: (C-4) Auction token collection not tracked enables stealing ERC-1155 tokens
* Already fixed: (C-3) Auction creator collecting payout causes buyer to lose their purchased tokens
* Fix: (C-2) Unsafe listing update allows seller front-run to buyer purchase
* patch tests
* update forge
* (M-1) setExtension allows selector clashes enables incorrect select→extension mapping
* (L-1), (L-2) - fix timestamps
* (L-3) Buyer can overpay when using buy out option
* (L-4) Off-chain application might block itself from buying listing
* (Q-1) _validateOwnershipAndApproval is not needed for creating auctions
* (Q-2) Unused state variable
* Nitpicks: Validate bid amounts inside _validateNewAuction()
* docs
* v3.3.0-1
* v3.3.0-2
* revised fix: (L-4) Off-chain application might block itself from buying listing
* test for fix: (M-1) setExtension allows selector clashes enables incorrect select→extension mapping
* update version
* setup lister and asset roles in initialize
* update marketplace-v3 with latest plugin pattern
* docs
* fix getters
* v3.3.1-0
* change contract-type to MarketplaceRouter
* v3.3.1-1
* forge update
* fix getters
* v3.3.1-2
* add a status flag, remove deletion
* update tests, fix bugs
* v3.3.1-3
* update event params
* rename status DNE -> UNSET
* docs
* v3.3.3-0
* update events
* rename to MarketplaceV3
---------
Co-authored-by: Krishang Nadgauda <nkrishang@Krishangs-MacBook-Pro.local>
Co-authored-by: Krishang Nadgauda <nkrishang@Krishangs-MBP.lan>
Co-authored-by: Krishang <krishang@thirdweb.com>1 parent 107a227 commit 27d0e57
File tree
54 files changed
+10394
-8
lines changed- contracts
- extension
- interface/plugin
- plugin
- marketplace
- direct-listings
- english-auctions
- entrypoint
- offers
- old-marketplace
- registry
- entrypoint
- registry-extension
- docs
- lib
- src/test
- marketplace
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+10394
-8
lines changedFile renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments