Skip to content

Commit

Permalink
change script_data_hash calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Salvionied committed Aug 24, 2024
1 parent ff54a3c commit 20c9e7f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions txBuilding/TxBuilder/TxBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,14 @@ func ScriptDataHash(witnessSet TransactionWitnessSet.TransactionWitnessSet) (*se
cost_models = PlutusData.COST_MODELSV2
}
}
var redeemer_bytes []byte

if redeemers == nil {
redeemers = []Redeemer.Redeemer{}
}
redeemer_bytes, err := cbor.Marshal(redeemers)
if err != nil {
return nil, err
redeemer_bytes, _ = hex.DecodeString("A0")
} else {
redeemer_bytes, _ = cbor.Marshal(redeemers)
}

var datum_bytes []byte
if datums.Len() > 0 {

Expand Down

0 comments on commit 20c9e7f

Please sign in to comment.