Created: Fractional Market Wrapper - #82
Open
Saw-mon-and-Natalie wants to merge 2 commits into
Open
Saw-mon-and-Natalie wants to merge 2 commits into
Saw-mon-and-Natalie wants to merge 2 commits into
Conversation
… changed PartyBid to allow rebalancing ETH from wETH deposits from ERC721TokenVault
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a market wrapper for Fractional auctions.
Summary of Addition and Changes
Contracts
FractionalMarketWrapper.sol.PartyBid.solis slightly changed (v4) to accommodate rebalancing itswETHandETHbalances. The changes are not required if the party is winning or it has not placed a bid yet. It is only necessary if the party has lost or themultisigis forcing the party to lose. Every time thebidfunction is called the call is delegated toFractionalMarketWrapper'sbid(uint256 auctionId, uint256 bidAmount)and there we are also making sure thewETHis withdrawn to party's balance.Tests
Fractionalauction ends usingevm_increaseTimemethod, we added a new constantEIGHT_DAYS_IN_SECONDSand for the tests regardingFractionalthat value has been used.wETH + ETHbalance to be invariant forFractionalauctions instead of onlyPartyBid'sETHbalance.ERC721TokenVault.soluses a hardcoded/constantwethaddress, a constant for0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2is also created and by using thehardhat_setCodemethod we etch the compiled runtime bytecode forEtherTokenat that address.All tests are passing. For running the tests faster use the following command: