-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathschema.graphql
52 lines (46 loc) · 1.15 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
type MessageSent @entity(immutable: true) {
id: Bytes!
inbox: Inbox! # address
nonce: BigInt! # uint64
to: Receiver! # address
msgSender: Sender! # address
data: Bytes! # bytes
epoch: BigInt! # uint64
node: Node! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type Node @entity(immutable: true) {
id: ID!
hash: Bytes! # bytes32
}
type Inbox @entity(immutable: true) {
id: Bytes! # address
messages: [MessageSent!]! @derivedFrom(field: "inbox")
}
type Receiver @entity(immutable: true) {
id: Bytes! # address
messages: [MessageSent!]! @derivedFrom(field: "to")
}
type Sender @entity(immutable: true) {
id: Bytes! # address
messages: [MessageSent!]! @derivedFrom(field: "msgSender")
}
type SnapshotSaved @entity(immutable: true) {
id: Bytes!
stateRoot: Bytes! # bytes32
epoch: BigInt! # uint64
count: BigInt! # uint64
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type SnapshotSent @entity(immutable: true) {
id: Bytes!
epochSent: BigInt! # uint256
ticketId: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}