-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
85 lines (80 loc) · 1.6 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
77
78
79
80
81
82
83
84
85
type Order @entity {
id: ID!
maker:Account
taker:Account
exchangeAddress: String
takerRelayerFee: BigInt
makerRelayerFee: BigInt
takerProtocolFee: BigInt
makerProtocolFee: BigInt
feeRecipient: Account
staticTarget:String
feeMethod:Int
side:Int
saleKind:Int
target:String!
howToCall:Int
calldata:Bytes
paymentToken:PaymentToken
basePrice:BigInt
extra:BigInt
listingTime:BigInt
expirationTime:BigInt
salt:BigInt
invalid:Boolean
parcel:Parcel
date:BigInt
}
#0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
type PaymentToken @entity {
id:ID!
symbol:String!
decimals:Int!
}
type Account @entity {
id: ID!
parcels:[Parcel!]! @derivedFrom (field:"owner")
makerOrders: [Order!]! @derivedFrom (field:"maker")
takerOrders: [Order!]! @derivedFrom (field:"taker")
transactions: [Transaction!]! @derivedFrom (field: "from")
}
type Parcel @entity{
id: ID!
owner:Account!
numTransfers:BigInt
orders:[Order!]! @derivedFrom (field: "parcel")
saleEvents: [SaleEvent!]! @derivedFrom (field: "parcel")
transfers: [Transfer!]! @derivedFrom (field: "parcel")
}
type SaleEvent @entity{
id: ID!
sellOrder: Order
buyOrder: Order
maker: Account
taker: Account
price: BigInt
parcel: Parcel!
transfer: Transfer
date: BigInt
saleKind:Int
nthTradeOfParcel:BigInt
}
type Transfer @entity{
id: ID!
saleEvent:SaleEvent
from: Account!
to: Account!
parcel: Parcel!
transaction: Transaction!
date:BigInt
nthTradeOfParcel:BigInt!
}
type Transaction @entity {
id: ID!
date: BigInt!
block: BigInt!
from: Account!
gasPrice:BigInt
gasLimit:BigInt
gasUsed:BigInt
}