-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
106 lines (106 loc) · 2.73 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
99
100
101
102
103
104
105
106
type Account @entity {
id: ID!
asAccessControl: AccessControl
membership: [AccessControlRoleMember!]! @derivedFrom(field: "account")
roleGranted: [RoleGranted!]! @derivedFrom(field: "account")
roleGrantedSender: [RoleGranted!]! @derivedFrom(field: "sender")
roleRevoked: [RoleRevoked!]! @derivedFrom(field: "account")
roleRevokedSender: [RoleRevoked!]! @derivedFrom(field: "sender")
asOwnable: Ownable
ownerOf: [Ownable!]! @derivedFrom(field: "owner")
ownershipTransferred: [OwnershipTransferred!]! @derivedFrom(field: "owner")
asPausable: Pausable
events: [Event!]! @derivedFrom(field: "emitter")
}
type AccessControl @entity {
id: ID!
asAccount: Account!
roles: [AccessControlRole!]! @derivedFrom(field: "contract")
}
type Role @entity {
id: ID!
roleOf: [AccessControlRole!]! @derivedFrom(field: "role")
}
type AccessControlRole @entity {
id: ID!
contract: AccessControl!
role: Role!
admin: AccessControlRole!
adminOf: [AccessControlRole!]! @derivedFrom(field: "admin")
members: [AccessControlRoleMember!]! @derivedFrom(field: "accesscontrolrole")
roleGranted: [RoleGranted!]! @derivedFrom(field: "role")
roleRevoked: [RoleRevoked!]! @derivedFrom(field: "role")
roleAdminChanged: [RoleAdminChanged!]! @derivedFrom(field: "role")
}
type AccessControlRoleMember @entity {
id: ID!
accesscontrolrole: AccessControlRole!
account: Account!
}
type RoleAdminChanged implements Event @entity {
id: ID!
emitter: Account!
transaction: Transaction!
timestamp: BigInt!
role: AccessControlRole!
newAdminRole: AccessControlRole!
previousAdminRole: AccessControlRole!
}
type RoleGranted implements Event @entity {
id: ID!
emitter: Account!
transaction: Transaction!
timestamp: BigInt!
role: AccessControlRole!
account: Account!
sender: Account!
}
type RoleRevoked implements Event @entity {
id: ID!
emitter: Account!
transaction: Transaction!
timestamp: BigInt!
role: AccessControlRole!
account: Account!
sender: Account!
}
type Ownable @entity {
id: ID!
asAccount: Account!
owner: Account!
ownershipTransferred: [OwnershipTransferred!]! @derivedFrom(field: "contract")
}
type OwnershipTransferred implements Event @entity {
id: ID!
emitter: Account!
transaction: Transaction!
timestamp: BigInt!
contract: Ownable!
owner: Account!
}
type Pausable @entity {
id: ID!
asAccount: Account!
isPaused: Boolean!
paused: [Paused!]! @derivedFrom(field: "contract")
}
type Paused implements Event @entity {
id: ID!
emitter: Account!
transaction: Transaction!
timestamp: BigInt!
contract: Pausable!
isPaused: Boolean!
}
interface Event {
id: ID!
transaction: Transaction!
emitter: Account!
timestamp: BigInt!
}
type Transaction @entity {
id: ID!
timestamp: BigInt!
blockNumber: BigInt!
events: [Event!]! @derivedFrom(field: "transaction")
}