-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathschema.near.graphql
72 lines (66 loc) · 1.58 KB
/
schema.near.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
# The entity is a close as possible to schema.graphql. Differences are highlighted:
type Payment @entity {
id: ID!
contractAddress: String! # vs Bytes!
tokenAddress: String # vs Bytes
to: String! # vs Bytes!
from: String! # vs Bytes!
reference: String! # vs Bytes!
block: Int!
timestamp: BigInt!
txHash: String # (missing) instead of Bytes!
receiptId: String! # vs (non-existant on EVM)
gasUsed: BigInt!
gasPrice: BigInt!
amount: BigDecimal!
currency: String! # vs Bytes
# fee values
feeAmount: BigDecimal
feeAddress: String # vs Bytes
# conversion values
amountInCrypto: BigDecimal # FIXME - not set
feeAmountInCrypto: BigDecimal # FIXME - not set
maxRateTimespan: Int
}
enum EscrowState {
paidEscrow
paidIssuer
emergency
frozen
}
type Escrow @entity {
id: ID!
contractAddress: Bytes!
paymentProxyAddress: Bytes!
reference: Bytes!
creationBlock: Int!
creationTimestamp: Int!
escrowState: EscrowState!
tokenAddress: Bytes!
amount: BigDecimal!
feeAmount: BigDecimal!
feeAddress: Bytes!
from: Bytes!
to: Bytes
events: [EscrowEvent!] @derivedFrom(field: "escrow")
}
enum EventName {
paidEscrow
paidIssuer
initiateEmergencyClaim
revertEmergencyClaim
freezeEscrow
}
type EscrowEvent @entity {
id: ID!
contractAddress: Bytes!
reference: Bytes!
escrow: Escrow!
block: Int!
timestamp: Int!
txHash: Bytes!
eventName: EventName!
from: Bytes!
gasUsed: BigInt!
gasPrice: BigInt!
}