-
Notifications
You must be signed in to change notification settings - Fork 18
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
Merge FpmmLiquidity and FpmmTrade #77
Comments
They come from different FPMM contract events. |
protofire/omen-exchange#1194 For example, using the following query, he gets the first 3 liquidities and trades. Is there any solution to implement his needs using query, do you think?
|
The entities are being used by the bots for different approaches. What about create a common entity? Eg:
Where There is also a |
Could be possible to include the tx hash on it? |
@davidalbela it seems that astro514 made those changes #80 for tx hash and also for main issue gejeduck@a66cab1 |
this issue was fixed by #81 |
* Add `FPMMTrade` entity into the subgraph * Fix TradeType enum and FPMMTrade creator type * Add custom trade subgraph to package info * Set `outcomeIndex` to type BigInt * Rename FPMMTrade attributes to `amount` and `outcomeTokensTrade` * Set FPMMTrade `creator` attribute to type string * Rename FpmmTrade attributes to `collateralAmount` and `outcomeTokensTraded` * Set package deployments to protofire * Fix omen subgraphs name * Add tradeNonce to Account * Increment the `tradeNonce` on every sell or buy event. * Set package deployments to protofire * Update Reality.eth adapter * Add RealitioScalarAdapter to deployment * Add ScalarQuestionLink entity * Refine testing workflow, adding test-fresh-deploy task * Enable standard uint questions from Realitio to be indexed * WIP scalar market tests * Preannounced scalar market links now enable scalar markets * Scalar market link can be established after condition created * Add more details about different question IDs when using scalar markets * Fully switch to Yarn * Use switch task runner from NPM to Yarn * Fix set `account.tradeNonce` on recordTrade * Set package deployments to protofire * Deploy RealitioScalarAdapter on Rinkeby and Mainnet * Fix Omen Verified Markets on Rinkeby The previous version of the list used a buggy centralized arbitrator. This fixes the issue. * Copy bounds to condition and FPMM entities * Set rinkeby and mainnet deployments to protofire * Fix repository endpoint on package.json * Add USD amount in FPMMTrade entity Add a new field `collateralAmountUSD` as BigDecimal type to calculate the value of `collateralAmount` in USD value at the moment of the trade. Resolves: #72 * Add FPMM Liquidity entity Add a new `FPMMLiquidity` entity with the record of every `FPMMFundingAdded` and `FPMMFundingRemoved` events from all FixedProductMarketMakert contracts. Add a new `fpmm.calculateLiquidityParameter` method to calculate with the `nthRoot` the collateral liquidity parameter. Resolves: #71 * Rename field `collateralTokenAmount` * Assignments for `collateralUSDPrice` and `collateralAmountUSD` into if conditional block. Set to `zeroDec` on declaration. * Add FPMM Liquidity entity Add a new `FPMMLiquidity` entity with the record of every `FPMMFundingAdded` and `FPMMFundingRemoved` events from all FixedProductMarketMakert contracts. Add a new `fpmm.calculateLiquidityParameter` method to calculate with the `nthRoot` the collateral liquidity parameter. Resolves: #71 * Rename field `collateralTokenAmount` * Add `additionalLiquidityParameter` Liquidity field Add `additionalLiquidityParameter` field with the `calculateLiquidityParameter` value. Replace `collateralTokenAmount` to max/min value from `outcomeTokenAmounts` list. Add new `utils/Math.ts` file with max and min methods for BigInt[]. * Fix call as `recordFPMMLiquidity` BigInt parameter to `fromI32(0)` * Add Outcome token marginal price to Trade entity Set the old and new values for the `OutcomeTokenMarginalPrices` of the selected outcome on the `FPMMBuy` and `FPMMSell` events to store that values on FPMMTrade entity. * Use original ConditionalTokens deployed on Rinkeby (#76) * Add cast to `Array<BigDecimal>` to new and old `outcomeTokenMarginalPrices` * Add transaction Hash to Trade and Liquidity entities * Merge FpmmLiquidity and FpmmTrade #77 (#81) * Add CollateralAmountUSD, FpmmType and TransactionHash to FpmmTransaction * Add Answer event logic * Add the TokenList entity for DxTokenRegister contract * fix: add ERC20Details abi to DXTokenRegistry Co-authored-by: David Albela Pérez <3659067+davidalbela@users.noreply.github.com> Co-authored-by: Mariano Aguero <mariano.aguero@altoros.com> Co-authored-by: Alan Lu <alanlu1023@gmail.com> Co-authored-by: Matheus Faria de Alencar <mtsalenc@gmail.com> Co-authored-by: Astro <bramchen77@outlook.com> Co-authored-by: Thomas Pulber <corkus@pm.me>
I think we can merge all fields and add one more field to check if it's FpmmLiquidity or FpmmTrade.
The text was updated successfully, but these errors were encountered: