Last active
March 17, 2019 23:59
-
-
Save adrake33/f8877156a5d2a703ff2dd0d6a7ef2fb9 to your computer and use it in GitHub Desktop.
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
| export interface GetOrdersResults { | |
| [marketId: string]: { | |
| [outcome: number]: { | |
| [orderType: string]: { | |
| [orderId: string]: Order; | |
| }; | |
| }; | |
| }; | |
| } | |
| export interface Order { | |
| amount: string, // fullPrecisionAmount (rounded) | |
| creationBlockNumber: number, // Block number of OrderCreated event | |
| creationTime: number, // Block timestamp of OrderCreated event | |
| fullPrecisionAmount: string, // Not sure what the best way to get this is? | |
| fullPrecisionPrice: string, // Not sure what the best way to get this is? | |
| logIndex: // Block log index of OrderCreated event | |
| orderId: OrderId, // OrderCreated.orderId | |
| orderState: OrderState, // Not sure what the best way to get this is? | |
| originalAmount: string, // OrderCreated.amount (rounded) | |
| originalFullPrecisionAmount: string, // OrderCreated.amount | |
| originalSharesEscrowed: string, // OrderCreated.sharesEscrowed | |
| originalTokensEscrowed: string, // OrderCreated.moneyEscrowed | |
| owner: Address, // OrderCreated.creator | |
| price: string, // fullPrecisionPrice (rounded) | |
| shareToken: Address, // OrderCreated.shareToken | |
| sharesEscrowed: string, // OrderCreated.sharesEscrowed | |
| tokensEscrowed: string, // OrderCreated.moneyEscrowed | |
| transactionHash: TransactionHash, // Block transaction hash of OrderCreated event | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This getter can be used in either situation. (There is an optional
creatorparameter, and either auniverseormarketaddress must be specified.) We can retrieve/calculate the full precision amounts depending on whether thecreatoris specified. We can also rename the "full precision" values to something else and get rid of the order state.