Last active
April 2, 2019 20:03
-
-
Save adrake33/c94b01f1b049ef6eeae96d00e6aef09b 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
// Will require data from multiple event types. Should log `crowdsourcerId` for initial reporters. | |
export interface UIReport<BigNumberType> { | |
creationBlockNumber: number; | |
creationTime: number; | |
logIndex: number; | |
transactionHash: Bytes32; | |
blockHash: Bytes32; | |
marketId: Address; // InitialReportSubmitted.market or DisputeCrowdsourcerContribution.market | |
feeWindow: Address; // DisputeWindowCreated.disputeWindow in v2 | |
payoutNumerators: Array<BigNumberType|null>; // InitialReportSubmitted.payoutNumerators or DisputeCrowdsourcerCreated.payoutNumerators | |
amountStaked: BigNumberType; // InitialReportSubmitted.amountStaked or DisputeCrowdsourcerContribution.amountStaked | |
crowdsourcerId: Address; // DisputeCrowdsourcerContribution.amountStaked. Needs logging for initial reporters | |
isCategorical: boolean; // MarketCreated.marketType | |
isScalar: boolean; // MarketCreated.marketType | |
isInvalid: boolean; // InitialReportSubmitted.payoutNumerators or DisputeCrowdsourcerContribution.payoutNumerators | |
isSubmitted: boolean; // Vestigial value - always set to true | |
} | |
export interface UIReports<BigNumberType> { | |
[universe: string]: { | |
[marketId: string]: { | |
crowdsourcers: Array<UIReport<BigNumberType>>; | |
initialReporter: UIReport<BigNumberType>|null; | |
}, | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment