Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ledger/allegra/allegra.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ type AllegraTransaction struct {
TxMetadata *cbor.LazyValue
}

func (t *AllegraTransaction) UnmarshalCBOR(data []byte) error {
return t.UnmarshalCbor(data, t)
}

func (AllegraTransaction) Type() int {
return TxTypeAllegra
}
Expand Down
4 changes: 4 additions & 0 deletions ledger/alonzo/alonzo.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ type AlonzoTransaction struct {
TxMetadata *cbor.LazyValue
}

func (t *AlonzoTransaction) UnmarshalCBOR(data []byte) error {
return t.UnmarshalCbor(data, t)
}

func (AlonzoTransaction) Type() int {
return TxTypeAlonzo
}
Expand Down
4 changes: 4 additions & 0 deletions ledger/babbage/babbage.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ type BabbageTransaction struct {
TxMetadata *cbor.LazyValue
}

func (t *BabbageTransaction) UnmarshalCBOR(data []byte) error {
return t.UnmarshalCbor(data, t)
}

func (BabbageTransaction) Type() int {
return TxTypeBabbage
}
Expand Down
4 changes: 4 additions & 0 deletions ledger/common/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ type StakeCredential struct {
Credential []byte
}

func (c *StakeCredential) UnmarshalCBOR(data []byte) error {
return c.UnmarshalCbor(data, c)
}

func (c *StakeCredential) Hash() Blake2b224 {
hash, err := blake2b.New(28, nil)
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions ledger/conway/conway.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ type ConwayTransaction struct {
TxMetadata *cbor.LazyValue
}

func (t *ConwayTransaction) UnmarshalCBOR(data []byte) error {
return t.UnmarshalCbor(data, t)
}

func (ConwayTransaction) Type() int {
return TxTypeConway
}
Expand Down
8 changes: 8 additions & 0 deletions ledger/mary/mary.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ type MaryTransaction struct {
TxMetadata *cbor.LazyValue
}

func (t *MaryTransaction) UnmarshalCBOR(data []byte) error {
return t.UnmarshalCbor(data, t)
}

func (MaryTransaction) Type() int {
return TxTypeMary
}
Expand Down Expand Up @@ -336,6 +340,10 @@ type MaryTransactionOutput struct {
OutputAmount MaryTransactionOutputValue
}

func (o *MaryTransactionOutput) UnmarshalCBOR(data []byte) error {
return o.UnmarshalCbor(data, o)
}

func (o MaryTransactionOutput) MarshalJSON() ([]byte, error) {
tmpObj := struct {
Address common.Address `json:"address"`
Expand Down
8 changes: 8 additions & 0 deletions ledger/shelley/shelley.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,10 @@ type ShelleyTransactionOutput struct {
OutputAmount uint64 `json:"amount"`
}

func (o *ShelleyTransactionOutput) UnmarshalCBOR(data []byte) error {
return o.UnmarshalCbor(data, o)
}

func (o ShelleyTransactionOutput) Address() common.Address {
return o.OutputAddress
}
Expand Down Expand Up @@ -527,6 +531,10 @@ type ShelleyTransaction struct {
TxMetadata *cbor.LazyValue
}

func (t *ShelleyTransaction) UnmarshalCBOR(data []byte) error {
return t.UnmarshalCbor(data, t)
}

func (ShelleyTransaction) Type() int {
return TxTypeShelley
}
Expand Down
Loading