Skip to content

Commit 443da01

Browse files
chore(deps): bump github.com/blinklabs-io/gouroboros from 0.130.0 to 0.130.1 (#96)
* chore(deps): bump github.com/blinklabs-io/gouroboros Bumps [github.com/blinklabs-io/gouroboros](https://github.com/blinklabs-io/gouroboros) from 0.130.0 to 0.130.1. - [Release notes](https://github.com/blinklabs-io/gouroboros/releases) - [Commits](blinklabs-io/gouroboros@v0.130.0...v0.130.1) --- updated-dependencies: - dependency-name: github.com/blinklabs-io/gouroboros dependency-version: 0.130.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * fix: update for redeemer refactor in gouroboros Signed-off-by: Chris Gianelloni <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Chris Gianelloni <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Gianelloni <[email protected]>
1 parent 5fbe4cc commit 443da01

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.0
55
toolchain go1.24.3
66

77
require (
8-
github.com/blinklabs-io/gouroboros v0.130.0
8+
github.com/blinklabs-io/gouroboros v0.130.1
99
github.com/btcsuite/btcd/btcec/v2 v2.3.5
1010
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
1111
github.com/consensys/gnark-crypto v0.18.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4
33
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
44
github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU=
55
github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
6-
github.com/blinklabs-io/gouroboros v0.130.0 h1:UG3lJBOw/1AIhibSOAgTU5MHIohBjoTW4OEA/DabpsM=
7-
github.com/blinklabs-io/gouroboros v0.130.0/go.mod h1:Kh7ahMW4g9hkTbJgch1r33VV+sa0Auf24z4QIiRd32k=
6+
github.com/blinklabs-io/gouroboros v0.130.1 h1:OrNxV1z/YIqAYBkAJZcVi2lDg16rZ3RJCk9YxsJvp6M=
7+
github.com/blinklabs-io/gouroboros v0.130.1/go.mod h1:+tBHYgbI9TsFs31WQrLXItWLVQhcahXS5YzthS0bwfQ=
88
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
99
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M=
1010
github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A=

scriptcontext/scriptcontext.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"strings"
77

88
lcommon "github.com/blinklabs-io/gouroboros/ledger/common"
9-
"github.com/blinklabs-io/gouroboros/ledger/conway"
109
"github.com/blinklabs-io/plutigo/data"
1110
)
1211

@@ -338,16 +337,16 @@ func collapseOutputs(outputs []lcommon.Utxo) []lcommon.TransactionOutput {
338337
return ret
339338
}
340339

341-
func sortedRedeemerKeys(redeemers lcommon.TransactionWitnessRedeemers) []conway.ConwayRedeemerKey {
340+
func sortedRedeemerKeys(redeemers lcommon.TransactionWitnessRedeemers) []lcommon.RedeemerKey {
342341
tags := []lcommon.RedeemerTag{lcommon.RedeemerTagSpend, lcommon.RedeemerTagMint, lcommon.RedeemerTagCert, lcommon.RedeemerTagReward, lcommon.RedeemerTagVoting, lcommon.RedeemerTagProposing}
343-
ret := make([]conway.ConwayRedeemerKey, 0)
342+
ret := make([]lcommon.RedeemerKey, 0)
344343
for _, tag := range tags {
345344
idxs := redeemers.Indexes(tag)
346345
slices.Sort(idxs)
347346
for _, idx := range idxs {
348347
ret = append(
349348
ret,
350-
conway.ConwayRedeemerKey{
349+
lcommon.RedeemerKey{
351350
Tag: tag,
352351
Index: uint32(idx),
353352
},
@@ -362,8 +361,8 @@ func redeemersInfo(witnessSet lcommon.TransactionWitnessSet, toScriptPurpose toS
362361
redeemers := witnessSet.Redeemers()
363362
redeemerKeys := sortedRedeemerKeys(redeemers)
364363
for _, key := range redeemerKeys {
365-
lvData, exUnits := redeemers.Value(uint(key.Index), key.Tag)
366-
datum := lazyValueToPlutusData(lvData)
364+
redeemerValue := redeemers.Value(uint(key.Index), key.Tag)
365+
datum := lazyValueToPlutusData(redeemerValue.Data)
367366
purpose := toScriptPurpose(key, datum)
368367
ret = append(
369368
ret,
@@ -373,15 +372,15 @@ func redeemersInfo(witnessSet lcommon.TransactionWitnessSet, toScriptPurpose toS
373372
Tag: key.Tag,
374373
Index: key.Index,
375374
Data: datum,
376-
ExUnits: exUnits,
375+
ExUnits: redeemerValue.ExUnits,
377376
},
378377
},
379378
)
380379
}
381380
return ret
382381
}
383382

384-
type toScriptPurposeFunc func(conway.ConwayRedeemerKey, data.PlutusData) ScriptInfo
383+
type toScriptPurposeFunc func(lcommon.RedeemerKey, data.PlutusData) ScriptInfo
385384

386385
// scriptPurposeBuilder creates a reusable function preloaded with information about a particular transaction
387386
func scriptPurposeBuilder(
@@ -392,7 +391,7 @@ func scriptPurposeBuilder(
392391
// TODO: proposal procedures
393392
// TODO: votes
394393
) toScriptPurposeFunc {
395-
return func(redeemerKey conway.ConwayRedeemerKey, datum data.PlutusData) ScriptInfo {
394+
return func(redeemerKey lcommon.RedeemerKey, datum data.PlutusData) ScriptInfo {
396395
switch redeemerKey.Tag {
397396
case lcommon.RedeemerTagSpend:
398397
return ScriptInfoSpending{

0 commit comments

Comments
 (0)