File tree Expand file tree Collapse file tree 7 files changed +68
-44
lines changed Expand file tree Collapse file tree 7 files changed +68
-44
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,14 @@ func (b *AllegraTransactionBody) ValidityIntervalStart() uint64 {
130
130
return b .TxValidityIntervalStart
131
131
}
132
132
133
+ func (b * AllegraTransactionBody ) ProtocolParametersUpdate () map [Blake2b224 ]any {
134
+ updateMap := make (map [Blake2b224 ]any )
135
+ for k , v := range b .Update .ProtocolParamUpdates {
136
+ updateMap [k ] = v
137
+ }
138
+ return updateMap
139
+ }
140
+
133
141
type AllegraTransaction struct {
134
142
cbor.StructAsArray
135
143
cbor.DecodeStoreCbor
@@ -238,12 +246,8 @@ func (t AllegraTransaction) Produced() []TransactionOutput {
238
246
return t .Outputs ()
239
247
}
240
248
241
- func (t * AllegraTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
242
- updateMap := make (map [Blake2b224 ]any )
243
- for k , v := range t .Body .Update .ProtocolParamUpdates {
244
- updateMap [k ] = v
245
- }
246
- return updateMap
249
+ func (t AllegraTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
250
+ return t .Body .ProtocolParametersUpdate ()
247
251
}
248
252
249
253
func (t * AllegraTransaction ) Cbor () []byte {
Original file line number Diff line number Diff line change @@ -147,6 +147,14 @@ func (b *AlonzoTransactionBody) Outputs() []TransactionOutput {
147
147
return ret
148
148
}
149
149
150
+ func (b * AlonzoTransactionBody ) ProtocolParametersUpdate () map [Blake2b224 ]any {
151
+ updateMap := make (map [Blake2b224 ]any )
152
+ for k , v := range b .Update .ProtocolParamUpdates {
153
+ updateMap [k ] = v
154
+ }
155
+ return updateMap
156
+ }
157
+
150
158
func (b * AlonzoTransactionBody ) Collateral () []TransactionInput {
151
159
ret := []TransactionInput {}
152
160
for _ , collateral := range b .TxCollateral {
@@ -289,6 +297,10 @@ func (t AlonzoTransaction) ValidityIntervalStart() uint64 {
289
297
return t .Body .ValidityIntervalStart ()
290
298
}
291
299
300
+ func (t AlonzoTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
301
+ return t .Body .ProtocolParametersUpdate ()
302
+ }
303
+
292
304
func (t AlonzoTransaction ) ReferenceInputs () []TransactionInput {
293
305
return t .Body .ReferenceInputs ()
294
306
}
@@ -370,14 +382,6 @@ func (t AlonzoTransaction) Produced() []TransactionOutput {
370
382
}
371
383
}
372
384
373
- func (t * AlonzoTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
374
- updateMap := make (map [Blake2b224 ]any )
375
- for k , v := range t .Body .Update .ProtocolParamUpdates {
376
- updateMap [k ] = v
377
- }
378
- return updateMap
379
- }
380
-
381
385
func (t * AlonzoTransaction ) Cbor () []byte {
382
386
// Return stored CBOR if we have any
383
387
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -199,6 +199,14 @@ func (b *BabbageTransactionBody) Outputs() []TransactionOutput {
199
199
return ret
200
200
}
201
201
202
+ func (b * BabbageTransactionBody ) ProtocolParametersUpdate () map [Blake2b224 ]any {
203
+ updateMap := make (map [Blake2b224 ]any )
204
+ for k , v := range b .Update .ProtocolParamUpdates {
205
+ updateMap [k ] = v
206
+ }
207
+ return updateMap
208
+ }
209
+
202
210
func (b * BabbageTransactionBody ) ReferenceInputs () []TransactionInput {
203
211
ret := []TransactionInput {}
204
212
for _ , input := range b .TxReferenceInputs {
@@ -455,6 +463,10 @@ func (t BabbageTransaction) ValidityIntervalStart() uint64 {
455
463
return t .Body .ValidityIntervalStart ()
456
464
}
457
465
466
+ func (t BabbageTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
467
+ return t .Body .ProtocolParametersUpdate ()
468
+ }
469
+
458
470
func (t BabbageTransaction ) ReferenceInputs () []TransactionInput {
459
471
return t .Body .ReferenceInputs ()
460
472
}
@@ -538,14 +550,6 @@ func (t BabbageTransaction) Produced() []TransactionOutput {
538
550
}
539
551
}
540
552
541
- func (t * BabbageTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
542
- updateMap := make (map [Blake2b224 ]any )
543
- for k , v := range t .Body .Update .ProtocolParamUpdates {
544
- updateMap [k ] = v
545
- }
546
- return updateMap
547
- }
548
-
549
553
func (t * BabbageTransaction ) Cbor () []byte {
550
554
// Return stored CBOR if we have any
551
555
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -131,6 +131,14 @@ func (b *ConwayTransactionBody) UnmarshalCBOR(cborData []byte) error {
131
131
return b .UnmarshalCbor (cborData , b )
132
132
}
133
133
134
+ func (b * ConwayTransactionBody ) ProtocolParametersUpdate () map [Blake2b224 ]any {
135
+ updateMap := make (map [Blake2b224 ]any )
136
+ for k , v := range b .Update .ProtocolParamUpdates {
137
+ updateMap [k ] = v
138
+ }
139
+ return updateMap
140
+ }
141
+
134
142
func (b * ConwayTransactionBody ) VotingProcedures () VotingProcedures {
135
143
return b .TxVotingProcedures
136
144
}
@@ -357,6 +365,10 @@ func (t ConwayTransaction) ValidityIntervalStart() uint64 {
357
365
return t .Body .ValidityIntervalStart ()
358
366
}
359
367
368
+ func (t ConwayTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
369
+ return t .Body .ProtocolParametersUpdate ()
370
+ }
371
+
360
372
func (t ConwayTransaction ) ReferenceInputs () []TransactionInput {
361
373
return t .Body .ReferenceInputs ()
362
374
}
@@ -440,14 +452,6 @@ func (t ConwayTransaction) Produced() []TransactionOutput {
440
452
}
441
453
}
442
454
443
- func (t * ConwayTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
444
- updateMap := make (map [Blake2b224 ]any )
445
- for k , v := range t .Body .Update .ProtocolParamUpdates {
446
- updateMap [k ] = v
447
- }
448
- return updateMap
449
- }
450
-
451
455
func (t * ConwayTransaction ) Cbor () []byte {
452
456
// Return stored CBOR if we have any
453
457
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -137,6 +137,14 @@ func (b *MaryTransactionBody) Outputs() []TransactionOutput {
137
137
return ret
138
138
}
139
139
140
+ func (b * MaryTransactionBody ) ProtocolParametersUpdate () map [Blake2b224 ]any {
141
+ updateMap := make (map [Blake2b224 ]any )
142
+ for k , v := range b .Update .ProtocolParamUpdates {
143
+ updateMap [k ] = v
144
+ }
145
+ return updateMap
146
+ }
147
+
140
148
func (b * MaryTransactionBody ) AssetMint () * MultiAsset [MultiAssetTypeMint ] {
141
149
return b .TxMint
142
150
}
@@ -179,6 +187,10 @@ func (t MaryTransaction) ValidityIntervalStart() uint64 {
179
187
return t .Body .ValidityIntervalStart ()
180
188
}
181
189
190
+ func (t MaryTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
191
+ return t .Body .ProtocolParametersUpdate ()
192
+ }
193
+
182
194
func (t MaryTransaction ) ReferenceInputs () []TransactionInput {
183
195
return t .Body .ReferenceInputs ()
184
196
}
@@ -251,14 +263,6 @@ func (t MaryTransaction) Produced() []TransactionOutput {
251
263
return t .Outputs ()
252
264
}
253
265
254
- func (t * MaryTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
255
- updateMap := make (map [Blake2b224 ]any )
256
- for k , v := range t .Body .Update .ProtocolParamUpdates {
257
- updateMap [k ] = v
258
- }
259
- return updateMap
260
- }
261
-
262
266
func (t * MaryTransaction ) Cbor () []byte {
263
267
// Return stored CBOR if we have any
264
268
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -218,6 +218,14 @@ func (b *ShelleyTransactionBody) ValidityIntervalStart() uint64 {
218
218
return 0
219
219
}
220
220
221
+ func (b * ShelleyTransactionBody ) ProtocolParametersUpdate () map [Blake2b224 ]any {
222
+ updateMap := make (map [Blake2b224 ]any )
223
+ for k , v := range b .Update .ProtocolParamUpdates {
224
+ updateMap [k ] = v
225
+ }
226
+ return updateMap
227
+ }
228
+
221
229
func (b * ShelleyTransactionBody ) ReferenceInputs () []TransactionInput {
222
230
return []TransactionInput {}
223
231
}
@@ -503,11 +511,7 @@ func (t ShelleyTransaction) Utxorpc() *utxorpc.Tx {
503
511
}
504
512
505
513
func (t * ShelleyTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
506
- updateMap := make (map [Blake2b224 ]any )
507
- for k , v := range t .Body .Update .ProtocolParamUpdates {
508
- updateMap [k ] = v
509
- }
510
- return updateMap
514
+ return t .Body .ProtocolParametersUpdate ()
511
515
}
512
516
513
517
func (t * ShelleyTransaction ) Cbor () []byte {
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ type Transaction interface {
30
30
IsValid () bool
31
31
Consumed () []TransactionInput
32
32
Produced () []TransactionOutput
33
- ProtocolParametersUpdate () map [Blake2b224 ]any
34
33
}
35
34
36
35
type TransactionBody interface {
@@ -40,6 +39,7 @@ type TransactionBody interface {
40
39
Inputs () []TransactionInput
41
40
Outputs () []TransactionOutput
42
41
TTL () uint64
42
+ ProtocolParametersUpdate () map [Blake2b224 ]any
43
43
ValidityIntervalStart () uint64
44
44
ReferenceInputs () []TransactionInput
45
45
Collateral () []TransactionInput
You can’t perform that action at this time.
0 commit comments