forked from Agoric/agoric-subql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
88 lines (83 loc) · 2.19 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
# To improve query performance, we strongly suggest adding indexes to any field that you plan to filter or sort by
# Add the `@index` or `@index(unique: true)` annotation after any non-key field
# https://academy.subquery.network/build/graphql.html#indexing-by-non-primary-key-field
type StateChangeEvent @entity {
id: ID!
blockHeight: BigInt!
blockTime: Date!
module: String! @index
path: String! @index
idx: Int!
slots: String!
body: String!
}
enum FastUsdcTransactionStatus {
OBSERVED
ADVANCING
ADVANCED
ADVANCE_FAILED
FORWARDING
FORWARDED
FORWARD_FAILED
DISBURSED
}
type FastUsdcTransaction @entity {
id: ID! @index(unique: true)
"""
EVM address from which the USCD funds originated
"""
sourceAddress: String! @index
"""
EIP-155 chain ID from which the USCD funds originated
"""
sourceChainId: Int! @index
"""
Unix epoch timestamp on the source chain.
Note that different chains have different clocks but they should be equivalant to precision of minutes.
"""
sourceBlockTimestamp: BigInt! @index
"""
The CAIP-10 or Cosmos Bech32 address to receive the USDC
"""
eud: String!
"""
The amount of USDC to send (in 6 decimal format)
"""
usdcAmount: BigInt!
"""
The last reported status of the transaction
"""
status: FastUsdcTransactionStatus! @index
"""
The block height of the Agoric chain at which the current status was recorded
"""
statusHeight: Int
"""
Any risks identified during transaction processing
"""
risksIdentified: [String]
"""
Payment to the contract
"""
contractFee: BigInt
"""
Payment to the liquidity pool underwriting the transaction
"""
poolFee: BigInt
# The following heights/times are of key states of the happy path. Unhappy outcomes require investigation with other tools.
"""
The block height of the Agoric chain at which the transaction was Observed
"""
heightObserved: Int
timeObserved: Date
"""
The block height of the Agoric chain at which the transaction was Advanced to the EUD
"""
heightAdvanced: Int
timeAdvanced: Date
"""
The block height of the Agoric chain at which funds were Disbursed back to the LP
"""
heightDisbursed: Int
timeDisbursed: Date
}