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
// Use TokensTransferred events to calculate `balance` for an account? | |
// Use `TokensMinted` to calculate supply? | |
export interface UniversesInfo<BigNumberType> { | |
balance: BigNumberType; | |
isInvalid: boolean; // Use UniverseCreated.payoutNumerators | |
numMarkets: BigNumberType; // Keep running total of MarketCreated events in this universe | |
parentUniverse: Address; // Universecreated.parentUniverse | |
payout: Array<number>; // UniverseCreated.payoutNumerators | |
supply: BigNumberType; |
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
// Might need to add logs for the total fields? | |
export interface UIFeeWindowCurrent<BigNumberType> { | |
endTime: number; // DisputeWindowCreated.endTime | |
feeWindow: Address|null; // DisputeWindowCreated.disputeWindow | |
feeWindowId: number; // DisputeWindowCreated.id | |
startTime: number; // DisputeWindowCreated.startTime | |
universe: Address; // DisputeWindowCreated.universe | |
totalStake?: BigNumberType; | |
feeWindowEthFees?: BigNumberType; |
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
// Returns breakdown of how many markets are in each reporting state. | |
// Might want to add logs to emit these totals? | |
interface UIReportingSummary { | |
[reportingState: string]: number; | |
} |
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 |
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
// This will require getting data from a lot of different logs. Might want to create new logs for fields in `totals . | |
export interface CrowdsourcerState { | |
crowdsourcerId: Address; | |
needsFork: boolean; | |
} | |
export interface InitialReporterState { | |
initialReporterId: Address; | |
needsFork: boolean; |
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
// Should add initial reporter address to logging | |
export interface InitialReportersRow<BigNumberType> { | |
marketId: Address; // InitialReportSubmitted.market | |
reporter: Address; // InitialReportSubmitted.reporter | |
amountStaked: BigNumberType; // InitialReportSubmitted.amountStaked | |
initialReporter: Address; // Should be logged | |
redeemed: boolean; // Whether InitialReporterRedeemed has been logged | |
isDesignatedReporter: boolean; // InitialReportSubmitted.isDesignatedReporter | |
repBalance: BigNumberType; // InitialReportSubmitted.amountStaked or 0 (if claimed) |
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
// Somewhat similar to getDisputeInfo. Will probably need to add logging for most of these? | |
export interface DisputeToken<BigNumberType> { | |
disputeToken: Address, | |
marketId: Address, | |
payout0: number, | |
payout1: number, | |
payout2: number, | |
payout3: number, | |
payout4: number, |
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
// Most of these fields will probably need to be logged | |
export interface NormalizedPayoutNumerators<BigNumberType> { | |
payout: Array<BigNumberType>; | |
} | |
export interface NormalizedPayout<BigNumberType> extends NormalizedPayoutNumerators<BigNumberType> { | |
isInvalid: boolean|number; | |
} |
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
// Should not require any additional logging | |
export interface Timestamped { | |
timestamp: number; | |
} | |
export interface FrozenFunds { | |
frozenFunds: BigNumber; // in whole tokens (eg. ETH) | |
} |
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
// Should add `outcome`, `price`, & `maker` to TradingProceedsClaimed | |
export interface ProceedTradesRow { | |
logIndex: number, // Block logIndex | |
blockNumber: number, // Block number | |
timestamp: number, // Block timestamp | |
marketId: Address, // TradingProceedsClaimed.market | |
outcome: number, // Share token's outcome | |
price: BigNumberType, // Payout * tickSize * MarketCreated.minPrice | |
amount: BigNumberType, // TradingProceedsClaimed.numShares |