This repository was archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
77 lines (65 loc) · 2.26 KB
/
schema.graphql
File metadata and controls
77 lines (65 loc) · 2.26 KB
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
# Copyright 2019-2021 PureStake Inc.
# This file is part of Moonbridge-Subgraph.
# Moonbridge-Subgraph is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Moonbridge-Subgraph is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Moonbridge-Subgraph. If not, see <http://www.gnu.org/licenses/>.
type Relayer @entity {
id: ID! # address of relayer
address: Bytes!
votes: [Vote!] @derivedFrom(field: "relayer")
voteCount: BigInt!
createdProposals: [Proposal!] @derivedFrom(field: "createdBy")
passedProposals: [Proposal!] @derivedFrom(field: "passedBy")
executedProposals: [Proposal!] @derivedFrom(field: "executedBy")
cancelledProposals: [Proposal!] @derivedFrom(field: "cancelledBy")
addedAt: BigInt # timestamp
addedAtBlock: BigInt # block number
}
type Deposit @entity {
id: ID! # originChainId + destinationChainId + nonce
originChainId: Int!
destinationChainId: Int!
resourceId: Bytes!
nonce: BigInt!
proposal: Proposal
createdAt: BigInt! # timestamp
}
type Proposal @entity {
id: ID! # originChainId + destinationChainId + nonce
deposit: Deposit! @derivedFrom(field: "proposal")
originChainId: Int!
destinationChainId: Int!
resourceId: Bytes!
status: String!
dataHash: Bytes!
createdBy: Relayer
passedBy: Relayer
executedBy: Relayer
cancelledBy: Relayer
votes: [Vote!] @derivedFrom(field: "proposal")
createdAt: BigInt! # timestamp
passedAt: BigInt # timestamp
executedAt: BigInt # timestamp
cancelledAt: BigInt # timestamp
}
type Vote @entity {
id: ID! # originChainId + destinationChainId + nonce + relayerAddress
relayer: Relayer!
proposal: Proposal!
isYesVote: Boolean!
isNoVote: Boolean!
votedAt: BigInt! # timestamp
}
type ProposalCount @entity {
id: ID! # originChainId + destinationChainId
originChainId: Int!
destinationChainId: Int!
proposalCount: BigInt!
}