File tree Expand file tree Collapse file tree 8 files changed +58
-0
lines changed Expand file tree Collapse file tree 8 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,14 @@ func (t AllegraTransaction) IsValid() bool {
170
170
return true
171
171
}
172
172
173
+ func (t * AllegraTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
174
+ updateMap := make (map [Blake2b224 ]any )
175
+ for k , v := range t .Body .Update .ProtocolParamUpdates {
176
+ updateMap [k ] = v
177
+ }
178
+ return updateMap
179
+ }
180
+
173
181
func (t * AllegraTransaction ) Cbor () []byte {
174
182
// Return stored CBOR if we have any
175
183
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -268,6 +268,14 @@ func (t AlonzoTransaction) IsValid() bool {
268
268
return t .IsTxValid
269
269
}
270
270
271
+ func (t * AlonzoTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
272
+ updateMap := make (map [Blake2b224 ]any )
273
+ for k , v := range t .Body .Update .ProtocolParamUpdates {
274
+ updateMap [k ] = v
275
+ }
276
+ return updateMap
277
+ }
278
+
271
279
func (t * AlonzoTransaction ) Cbor () []byte {
272
280
// Return stored CBOR if we have any
273
281
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -438,6 +438,14 @@ func (t BabbageTransaction) IsValid() bool {
438
438
return t .IsTxValid
439
439
}
440
440
441
+ func (t * BabbageTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
442
+ updateMap := make (map [Blake2b224 ]any )
443
+ for k , v := range t .Body .Update .ProtocolParamUpdates {
444
+ updateMap [k ] = v
445
+ }
446
+ return updateMap
447
+ }
448
+
441
449
func (t * BabbageTransaction ) Cbor () []byte {
442
450
// Return stored CBOR if we have any
443
451
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -187,6 +187,15 @@ func (t *ByronTransaction) Utxorpc() *utxorpc.Tx {
187
187
return & utxorpc.Tx {}
188
188
}
189
189
190
+ func (t * ByronTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
191
+ // TODO: Implement this add missing Body TransactionBody
192
+ updateMap := make (map [Blake2b224 ]any )
193
+ // for k, v := range t.Body.Update.ProtocolParamUpdates {
194
+ // updateMap[k] = v
195
+ // }
196
+ return updateMap
197
+ }
198
+
190
199
type ByronTransactionInput struct {
191
200
cbor.StructAsArray
192
201
TxId Blake2b256
Original file line number Diff line number Diff line change @@ -172,6 +172,14 @@ func (t ConwayTransaction) IsValid() bool {
172
172
return t .IsTxValid
173
173
}
174
174
175
+ func (t * ConwayTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
176
+ updateMap := make (map [Blake2b224 ]any )
177
+ for k , v := range t .Body .Update .ProtocolParamUpdates {
178
+ updateMap [k ] = v
179
+ }
180
+ return updateMap
181
+ }
182
+
175
183
func (t * ConwayTransaction ) Cbor () []byte {
176
184
// Return stored CBOR if we have any
177
185
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -183,6 +183,14 @@ func (t MaryTransaction) IsValid() bool {
183
183
return true
184
184
}
185
185
186
+ func (t * MaryTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
187
+ updateMap := make (map [Blake2b224 ]any )
188
+ for k , v := range t .Body .Update .ProtocolParamUpdates {
189
+ updateMap [k ] = v
190
+ }
191
+ return updateMap
192
+ }
193
+
186
194
func (t * MaryTransaction ) Cbor () []byte {
187
195
// Return stored CBOR if we have any
188
196
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -371,6 +371,14 @@ func (t ShelleyTransaction) Utxorpc() *utxorpc.Tx {
371
371
return t .Body .Utxorpc ()
372
372
}
373
373
374
+ func (t * ShelleyTransaction ) ProtocolParametersUpdate () map [Blake2b224 ]any {
375
+ updateMap := make (map [Blake2b224 ]any )
376
+ for k , v := range t .Body .Update .ProtocolParamUpdates {
377
+ updateMap [k ] = v
378
+ }
379
+ return updateMap
380
+ }
381
+
374
382
func (t * ShelleyTransaction ) Cbor () []byte {
375
383
// Return stored CBOR if we have any
376
384
cborData := t .DecodeStoreCbor .Cbor ()
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ type Transaction interface {
28
28
TransactionBody
29
29
Metadata () * cbor.Value
30
30
IsValid () bool
31
+ ProtocolParametersUpdate () map [Blake2b224 ]any
31
32
}
32
33
33
34
type TransactionBody interface {
You can’t perform that action at this time.
0 commit comments