forked from 0xLucca/ink-multisig-squid-shibuya
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
98 lines (89 loc) · 1.97 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
86
87
88
89
90
91
92
93
94
95
96
97
98
enum TransactionStatus {
PROPOSED
EXECUTED_SUCCESS
EXECUTED_FAILURE
CANCELLED
}
enum TransferType {
NATIVE
PSP22
}
type MultisigFactory @entity {
id: ID!
address: String!
codeHash: String!
}
type Multisig @entity {
id: ID!
addressSS58: String!
addressHex: String!
deploymentSalt: String!
threshold: Int!
owners: [String!]!
creationTimestamp: DateTime!
creationBlockNumber: Int!
transactions: [Transaction!]! @derivedFrom(field: "multisig")
transfers: [Transfer!]! @derivedFrom(field: "multisig")
}
type ExternalTransactionData @entity{
id: ID! # Tx Hash
methodName: String!
args: Bytes!
creationTimestamp: DateTime!
inUse: Boolean!
}
interface Tx @query {
id: ID!
creationTimestamp: DateTime!
creationBlockNumber: Int!
multisig: Multisig!
}
type Transaction implements Tx @entity {
id: ID!
proposalTxHash: String!
executionTxHash: String
multisig: Multisig!
txId: BigInt!
proposer: String!
contractAddress: String!
selector: String!
args: String!
value: BigInt!
externalTransactionData: ExternalTransactionData
status: TransactionStatus!
error: String
approvals: [Approval!]! @derivedFrom(field: "transaction")
rejections: [Rejection!]! @derivedFrom(field: "transaction")
approvalCount: Int!
rejectionCount: Int!
creationTimestamp: DateTime!
creationBlockNumber: Int!
lastUpdatedTimestamp: DateTime!
lastUpdatedBlockNumber: Int!
}
type Transfer implements Tx @entity {
id: ID! #TxHash
multisig: Multisig!
from: String!
to: String!
value: BigInt!
transferType: TransferType!
tokenAddress: String # Only for PSP
tokenDecimals: Int # Only for PSP
creationTimestamp: DateTime!
creationBlockNumber: Int!
}
type Approval @entity {
id: ID!
transaction: Transaction!
approver: String!
approvalTimestamp: DateTime!
approvalBlockNumber: Int!
}
type Rejection @entity {
id: ID!
transaction: Transaction!
rejector: String!
rejectionTimestamp: DateTime!
rejectionBlockNumber: Int!
}