-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphqls
53 lines (46 loc) · 2.2 KB
/
schema.graphqls
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
# GraphQL schema example
#
# https://gqlgen.com/getting-started/
directive @goTag(
key: String!
value: String
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
type ChainInfo {
lastBlockHeightReceived: Int! @goTag(key: "firestore", value: "lastBlockHeightReceived")
lastBlockTimeUnixReceived: Int! @goTag(key: "firestore", value: "lastBlockTimeUnixReceived")
chainID: String! @goTag(key: "firestore", value: "chainID")
cosmosMsgs: [CosmosMsgIndexed!]! @goTag(key: "firestore", value: "cosmosMsgs")
}
type CosmosMsgIndexed {
protoMsgName: String! @goTag(key: "firestore", value: "protoMsgName")
# ordered list of indexed block height interval, never should have an interpolate of block heights indexed.
blocksIndexed: [BlockIndexedInterval!]! @goTag(key: "firestore", value: "blocksIndexed")
}
type BlockIndexedInterval {
idxFromBlockHeight: Int! @goTag(key: "firestore", value: "idxFromBlockHeight")
idxToBlockHeight: Int! @goTag(key: "firestore", value: "idxToBlockHeight")
}
type IndexedTx {
txHash: String! @goTag(key: "firestore", value: "txHash")
protoMsgName: String! @goTag(key: "firestore", value: "protoMsgName")
blockHeight: Int! @goTag(key: "firestore", value: "blockHeight")
blockTimeUnix: Int! @goTag(key: "firestore", value: "blockTimeUnix")
msgLiquidate: MsgLiquidate @goTag(key: "firestore", value: "msgLiquidate")
msgLeverageLiquidate: MsgLeverageLiquidate @goTag(key: "firestore", value: "msgLeverageLiquidate")
}
type MsgLiquidate {
liquidator: String! @goTag(key: "firestore", value: "liquidator")
borrower: String! @goTag(key: "firestore", value: "borrower")
repayment: String! @goTag(key: "firestore", value: "repayment")
rewardDenom: String! @goTag(key: "firestore", value: "rewardDenom")
}
type MsgLeverageLiquidate {
liquidator: String! @goTag(key: "firestore", value: "liquidator")
borrower: String! @goTag(key: "firestore", value: "borrower")
repayDenom: String! @goTag(key: "firestore", value: "repayDenom")
rewardDenom: String! @goTag(key: "firestore", value: "rewardDenom")
maxRepay: String! @goTag(key: "firestore", value: "maxRepay")
}
type Query {
getLiquidateMsgs(chainID: String, borrower: String!): [IndexedTx!]!
}