This PR adds a FractionalMarketWrapper to PartyBid, and adds the functions (eg deployFractionalAndStartAuction) required to get all tests passing.
Previous attempt at this couldn't work because Fractional always refunded smart contracts in WETH. However, there is now a v1.1 of Fractional's ERC721VaultFactory that refunds in ETH when possible. This MarketWrapper only works with the v1.1 MarketWrapper (and should be able to confirm it's set up with the right one in auctionIdMatchesToken).
Some other things to note:
I updated external/Fractional/ERC721TokenVault.sol to v1.1. If you prefer it gets added as a second file instead of replacing the first, happy to do so! Note that this updated version makes use of OpenZeppelin/upgradeable so I had to add a folder with a bunch of files, which contributes to most of the files changed in this PR.
Unlike other markets, Fractional calls a different method between start()ing an auction vs bid()ing on an existing one. As a result, some logic has been added to the testing files so they can keep track of whether to expect emit Start vs emit Bid.
I'm calling this concept a "Corporate Buyout" 📈 because you're kind of buying out this thing that has shares and distributing it to new shareholders.
This PR adds a
FractionalMarketWrapper
to PartyBid, and adds the functions (egdeployFractionalAndStartAuction
) required to get all tests passing.Previous attempt at this couldn't work because Fractional always refunded smart contracts in WETH. However, there is now a v1.1 of Fractional's
ERC721VaultFactory
that refunds in ETH when possible. This MarketWrapper only works with the v1.1 MarketWrapper (and should be able to confirm it's set up with the right one inauctionIdMatchesToken
).Some other things to note:
external/Fractional/ERC721TokenVault.sol
to v1.1. If you prefer it gets added as a second file instead of replacing the first, happy to do so! Note that this updated version makes use of OpenZeppelin/upgradeable so I had to add a folder with a bunch of files, which contributes to most of the files changed in this PR.start()
ing an auction vsbid()
ing on an existing one. As a result, some logic has been added to the testing files so they can keep track of whether to expectemit Start
vsemit Bid
.