-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.graphql
46 lines (42 loc) · 1.08 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
type EscrowAccount @entity{
# Thaw transaction hash is used as ID
id: Bytes!
sender: Sender!
receiver: Receiver!
balance: BigInt!
totalAmountThawing: BigInt!
thawEndTimestamp: BigInt!
transactions: [Transaction!]! @derivedFrom(field: "escrowAccount")
}
type Sender @entity {
# sender address
id: Bytes!
# Sender Escrow
escrowAccounts: [EscrowAccount!]! @derivedFrom(field: "sender")
transactions: [Transaction!]! @derivedFrom(field: "sender")
signers: [Signer!]! @derivedFrom(field: "sender")
}
type Receiver @entity {
# receiver address
id: Bytes!
escrowAccounts: [EscrowAccount!]! @derivedFrom(field: "receiver")
transactions: [Transaction!]! @derivedFrom(field: "receiver")
}
type Transaction @entity(immutable: true){
id: Bytes!
transactionGroupID: Bytes!
type: String!
sender: Sender!
receiver: Receiver!
allocationID: Bytes
expectedAmount: BigInt
amount: BigInt!
escrowAccount: EscrowAccount!
timestamp: BigInt!
}
type Signer @entity{
id: Bytes!
isAuthorized: Boolean!
sender: Sender!
thawEndTimestamp: BigInt!
}