@@ -13,13 +13,27 @@ use super::OutputType;
13
13
format = "outputs.coin.{block_height}.{tx_id}.{tx_index}.{output_index}.{to}.{asset}"
14
14
) ]
15
15
pub struct OutputsCoinSubject {
16
+ #[ subject(
17
+ description = "The height of the block containing this coin output"
18
+ ) ]
16
19
pub block_height : Option < BlockHeight > ,
20
+ #[ subject(
21
+ description = "The ID of the transaction containing this coin output (32 byte string prefixed by 0x)"
22
+ ) ]
17
23
pub tx_id : Option < TxId > ,
24
+ #[ subject( description = "The index of the transaction within the block" ) ]
18
25
pub tx_index : Option < u32 > ,
26
+ #[ subject( description = "The index of this output within the transaction" ) ]
19
27
pub output_index : Option < u32 > ,
20
- #[ subject( sql_column = "to_address" ) ]
28
+ #[ subject(
29
+ sql_column = "to_address" ,
30
+ description = "The recipient address of the coin output (32 byte string prefixed by 0x)"
31
+ ) ]
21
32
pub to : Option < Address > ,
22
- #[ subject( sql_column = "asset_id" ) ]
33
+ #[ subject(
34
+ sql_column = "asset_id" ,
35
+ description = "The asset ID of the coin (32 byte string prefixed by 0x)"
36
+ ) ]
23
37
pub asset : Option < AssetId > ,
24
38
}
25
39
@@ -32,11 +46,22 @@ pub struct OutputsCoinSubject {
32
46
format = "outputs.contract.{block_height}.{tx_id}.{tx_index}.{output_index}.{contract}"
33
47
) ]
34
48
pub struct OutputsContractSubject {
49
+ #[ subject(
50
+ description = "The height of the block containing this contract output"
51
+ ) ]
35
52
pub block_height : Option < BlockHeight > ,
53
+ #[ subject(
54
+ description = "The ID of the transaction containing this contract output (32 byte string prefixed by 0x)"
55
+ ) ]
36
56
pub tx_id : Option < TxId > ,
57
+ #[ subject( description = "The index of the transaction within the block" ) ]
37
58
pub tx_index : Option < u32 > ,
59
+ #[ subject( description = "The index of this output within the transaction" ) ]
38
60
pub output_index : Option < u32 > ,
39
- #[ subject( sql_column = "contract_id" ) ]
61
+ #[ subject(
62
+ sql_column = "contract_id" ,
63
+ description = "The ID of the contract (32 byte string prefixed by 0x)"
64
+ ) ]
40
65
pub contract : Option < ContractId > ,
41
66
}
42
67
@@ -49,13 +74,27 @@ pub struct OutputsContractSubject {
49
74
format = "outputs.change.{block_height}.{tx_id}.{tx_index}.{output_index}.{to}.{asset}"
50
75
) ]
51
76
pub struct OutputsChangeSubject {
77
+ #[ subject(
78
+ description = "The height of the block containing this change output"
79
+ ) ]
52
80
pub block_height : Option < BlockHeight > ,
81
+ #[ subject(
82
+ description = "The ID of the transaction containing this change output (32 byte string prefixed by 0x)"
83
+ ) ]
53
84
pub tx_id : Option < TxId > ,
85
+ #[ subject( description = "The index of the transaction within the block" ) ]
54
86
pub tx_index : Option < u32 > ,
87
+ #[ subject( description = "The index of this output within the transaction" ) ]
55
88
pub output_index : Option < u32 > ,
56
- #[ subject( sql_column = "to_address" ) ]
89
+ #[ subject(
90
+ sql_column = "to_address" ,
91
+ description = "The recipient address of the change output (32 byte string prefixed by 0x)"
92
+ ) ]
57
93
pub to : Option < Address > ,
58
- #[ subject( sql_column = "asset_id" ) ]
94
+ #[ subject(
95
+ sql_column = "asset_id" ,
96
+ description = "The asset ID of the change output (32 byte string prefixed by 0x)"
97
+ ) ]
59
98
pub asset : Option < AssetId > ,
60
99
}
61
100
@@ -68,13 +107,27 @@ pub struct OutputsChangeSubject {
68
107
format = "outputs.variable.{block_height}.{tx_id}.{tx_index}.{output_index}.{to}.{asset}"
69
108
) ]
70
109
pub struct OutputsVariableSubject {
110
+ #[ subject(
111
+ description = "The height of the block containing this variable output"
112
+ ) ]
71
113
pub block_height : Option < BlockHeight > ,
114
+ #[ subject(
115
+ description = "The ID of the transaction containing this variable output (32 byte string prefixed by 0x)"
116
+ ) ]
72
117
pub tx_id : Option < TxId > ,
118
+ #[ subject( description = "The index of the transaction within the block" ) ]
73
119
pub tx_index : Option < u32 > ,
120
+ #[ subject( description = "The index of this output within the transaction" ) ]
74
121
pub output_index : Option < u32 > ,
75
- #[ subject( sql_column = "to_address" ) ]
122
+ #[ subject(
123
+ sql_column = "to_address" ,
124
+ description = "The recipient address of the variable output (32 byte string prefixed by 0x)"
125
+ ) ]
76
126
pub to : Option < Address > ,
77
- #[ subject( sql_column = "asset_id" ) ]
127
+ #[ subject(
128
+ sql_column = "asset_id" ,
129
+ description = "The asset ID of the variable output (32 byte string prefixed by 0x)"
130
+ ) ]
78
131
pub asset : Option < AssetId > ,
79
132
}
80
133
@@ -87,11 +140,22 @@ pub struct OutputsVariableSubject {
87
140
format = "outputs.contract_created.{block_height}.{tx_id}.{tx_index}.{output_index}.{contract}"
88
141
) ]
89
142
pub struct OutputsContractCreatedSubject {
143
+ #[ subject(
144
+ description = "The height of the block containing this contract creation output"
145
+ ) ]
90
146
pub block_height : Option < BlockHeight > ,
147
+ #[ subject(
148
+ description = "The ID of the transaction containing this contract creation output (32 byte string prefixed by 0x)"
149
+ ) ]
91
150
pub tx_id : Option < TxId > ,
151
+ #[ subject( description = "The index of the transaction within the block" ) ]
92
152
pub tx_index : Option < u32 > ,
153
+ #[ subject( description = "The index of this output within the transaction" ) ]
93
154
pub output_index : Option < u32 > ,
94
- #[ subject( sql_column = "contract_id" ) ]
155
+ #[ subject(
156
+ sql_column = "contract_id" ,
157
+ description = "The ID of the created contract (32 byte string prefixed by 0x)"
158
+ ) ]
95
159
pub contract : Option < ContractId > ,
96
160
}
97
161
@@ -104,9 +168,18 @@ pub struct OutputsContractCreatedSubject {
104
168
format = "outputs.{output_type}.{block_height}.{tx_id}.{tx_index}.{output_index}"
105
169
) ]
106
170
pub struct OutputsSubject {
171
+ #[ subject(
172
+ description = "The type of output (coin, contract, change, variable, or contract_created)"
173
+ ) ]
107
174
pub output_type : Option < OutputType > ,
175
+ #[ subject( description = "The height of the block containing this output" ) ]
108
176
pub block_height : Option < BlockHeight > ,
177
+ #[ subject(
178
+ description = "The ID of the transaction containing this output (32 byte string prefixed by 0x)"
179
+ ) ]
109
180
pub tx_id : Option < TxId > ,
181
+ #[ subject( description = "The index of the transaction within the block" ) ]
110
182
pub tx_index : Option < u32 > ,
183
+ #[ subject( description = "The index of this output within the transaction" ) ]
111
184
pub output_index : Option < u32 > ,
112
185
}
0 commit comments