Goal of this PR is to unify MarketPosition type across FPMMs and the Orderbook.
This is done by using the ConditionalTokens ERC1155 tokenId as the primary identifier for a position.
Refactor MarketPosition:
Add utility function to generate the tokenId from conditionId + outcomeTokenCount + collateral
Remove tight coupling with FixedProductMarketMaker and replace with tokenId
Rewrite updateMarketPosition* functions so that they use tokenId
Update Exchange:
Implement updateMarketPositionFromOrderFilled to create/update a MarketPosition given an OrderFilled event
Goal of this PR is to unify MarketPosition type across FPMMs and the Orderbook. This is done by using the ConditionalTokens ERC1155 tokenId as the primary identifier for a position.
Refactor MarketPosition:
conditionId
+outcomeTokenCount
+collateral
updateMarketPosition*
functions so that they use tokenIdUpdate Exchange:
updateMarketPositionFromOrderFilled
to create/update a MarketPosition given an OrderFilled event