-
Notifications
You must be signed in to change notification settings - Fork 3
/
schema.graphql
76 lines (66 loc) · 1.55 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
enum BondType {
FixedTerm
FixedExpiry
}
type Market @entity {
id: ID! # <contract address>/type/<market id>
marketId: BigInt!
bondContract: Bytes!
bondType: BondType!
owner: Bytes!
payoutToken: Bytes!
quoteToken: Bytes!
vesting: BigInt!
durationMilliseconds: BigInt!
durationActualMilliseconds: BigInt
capacityInPayoutToken: BigDecimal!
totalDebtInPayoutToken: BigDecimal!
maxPayoutInPayoutToken: BigDecimal!
initialPriceInQuoteToken: BigDecimal!
minPriceInQuoteToken: BigDecimal!
soldInPayoutToken: BigDecimal!
purchasedInQuoteToken: BigDecimal!
createdBlock: BigInt!
createdDate: String!
createdTimestamp: BigInt!
closedBlock: BigInt
closedDate: String
closedTimestamp: BigInt
}
type MarketCreatedEvent @entity(immutable: true) {
id: ID! # <contract address>/type/<market id>
marketId: BigInt!
bondContract: Bytes!
bondType: BondType!
date: String!
timestamp: BigInt!
block: BigInt!
market: Market!
}
type MarketClosedEvent @entity(immutable: true) {
id: ID! # <contract address>/type/<market id>
marketId: BigInt!
bondContract: Bytes!
bondType: BondType!
date: String!
timestamp: BigInt!
block: BigInt!
market: Market!
}
type BondPurchase @entity(immutable: true) {
id: ID!
date: String!
block: BigInt!
timestamp: BigInt!
transaction: Bytes!
contract: Bytes!
type: BondType!
marketId: BigInt!
referrer: Bytes!
amountInQuoteToken: BigDecimal!
payoutInPayoutToken: BigDecimal!
payoutToken: Bytes!
quoteToken: Bytes!
expiryTimestamp: BigInt!
expiryDate: String!
}