Skip to content

Commit 75be3da

Browse files
committed
feat(ledger): Modified the GetScriptRef() to ScriptRef() for constistency and to be idiomatic Go
Signed-off-by: Akhil Repala <[email protected]>
1 parent 58bc927 commit 75be3da

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

ledger/alonzo/alonzo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func (o AlonzoTransactionOutput) Address() common.Address {
324324
return o.OutputAddress
325325
}
326326

327-
func (o AlonzoTransactionOutput) GetScriptRef() *cbor.LazyValue {
327+
func (o AlonzoTransactionOutput) ScriptRef() *cbor.LazyValue {
328328
return nil
329329
}
330330

ledger/babbage/babbage.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ type BabbageTransactionOutput struct {
423423
OutputAddress common.Address `cbor:"0,keyasint,omitempty"`
424424
OutputAmount mary.MaryTransactionOutputValue `cbor:"1,keyasint,omitempty"`
425425
DatumOption *BabbageTransactionOutputDatumOption `cbor:"2,keyasint,omitempty"`
426-
ScriptRef *cbor.Tag `cbor:"3,keyasint,omitempty"`
426+
TxScriptRef *cbor.Tag `cbor:"3,keyasint,omitempty"`
427427
legacyOutput bool
428428
}
429429

@@ -486,11 +486,11 @@ func (o BabbageTransactionOutput) Address() common.Address {
486486
return o.OutputAddress
487487
}
488488

489-
func (o BabbageTransactionOutput) GetScriptRef() *cbor.LazyValue {
490-
if o.ScriptRef == nil {
489+
func (o BabbageTransactionOutput) ScriptRef() *cbor.LazyValue {
490+
if o.TxScriptRef == nil {
491491
return nil
492492
}
493-
if lazyVal, ok := o.ScriptRef.Content.(*cbor.LazyValue); ok {
493+
if lazyVal, ok := o.TxScriptRef.Content.(*cbor.LazyValue); ok {
494494
return lazyVal
495495
}
496496
return nil

ledger/byron/byron.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ func (o ByronTransactionOutput) Address() common.Address {
414414
return o.OutputAddress
415415
}
416416

417-
func (o ByronTransactionOutput) GetScriptRef() *cbor.LazyValue {
417+
func (o ByronTransactionOutput) ScriptRef() *cbor.LazyValue {
418418
return nil
419419
}
420420

ledger/common/tx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type TransactionOutput interface {
7171
DatumHash() *Blake2b256
7272
Cbor() []byte
7373
Utxorpc() (*utxorpc.TxOutput, error)
74-
GetScriptRef() *cbor.LazyValue
74+
ScriptRef() *cbor.LazyValue
7575
}
7676

7777
type TransactionWitnessSet interface {

ledger/mary/mary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ func (o MaryTransactionOutput) Address() common.Address {
446446
return o.OutputAddress
447447
}
448448

449-
func (txo MaryTransactionOutput) GetScriptRef() *cbor.LazyValue {
449+
func (txo MaryTransactionOutput) ScriptRef() *cbor.LazyValue {
450450
return nil
451451
}
452452

ledger/shelley/shelley.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func (o ShelleyTransactionOutput) Address() common.Address {
388388
return o.OutputAddress
389389
}
390390

391-
func (o ShelleyTransactionOutput) GetScriptRef() *cbor.LazyValue {
391+
func (o ShelleyTransactionOutput) ScriptRef() *cbor.LazyValue {
392392
return nil
393393
}
394394

0 commit comments

Comments
 (0)