-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
43 lines (39 loc) · 1019 Bytes
/
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
type EscrowAccount @entity{
# Thaw transaction hash is used as ID
id: ID!
sender: Sender!
receiver: Receiver!
balance: BigInt!
totalAmountThawing: BigInt!
thawEndTimestamp: BigInt!
transactions: [Transaction!] @derivedFrom(field: "escrowAccount")
}
type Sender @entity {
# sender address
id: ID!
# Sender Escrow
escrowAccounts: [EscrowAccount!] @derivedFrom(field: "sender")
transactions: [Transaction!] @derivedFrom(field: "sender")
authorizedSigners: [AuthorizedSigner!] @derivedFrom(field: "sender")
}
type Receiver @entity {
# receiver address
id: ID!
escrowAccounts: [EscrowAccount!] @derivedFrom(field: "receiver")
transactions: [Transaction!] @derivedFrom(field: "receiver")
}
type Transaction @entity{
id: ID!
type: String!
sender: Sender!
receiver: Receiver!
allocationID: String
expectedAmount: BigInt
amount: BigInt!
escrowAccount: EscrowAccount!
}
type AuthorizedSigner @entity{
id: ID!
is_authorized: Boolean
sender: Sender!
}