diff --git a/go.mod b/go.mod index ffed45e..d7ddfbe 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/blinklabs-io/adder v0.22.1 github.com/blinklabs-io/bursa v0.8.0 github.com/blinklabs-io/cardano-models v0.3.5 - github.com/blinklabs-io/gouroboros v0.89.1 + github.com/blinklabs-io/gouroboros v0.90.0 github.com/blinklabs-io/merkle-patricia-forestry v0.1.0 github.com/dgraph-io/badger/v4 v4.2.0 github.com/kelseyhightower/envconfig v1.4.0 diff --git a/go.sum b/go.sum index df0660a..66eb85a 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/blinklabs-io/bursa v0.8.0 h1:wWJOweXyZ+SlqSgWGStnYZdhf5IgoETsG+KK0Uek github.com/blinklabs-io/bursa v0.8.0/go.mod h1:ED+24unjrouN2wbr3cvAi01pOiZSVh7Bx3JXJl4Lkbc= github.com/blinklabs-io/cardano-models v0.3.5 h1:qekNu9CFkOoULYQJ4ymD6s5Iia2L5WRo/TUVPVpF3BY= github.com/blinklabs-io/cardano-models v0.3.5/go.mod h1:QVU0hGMQDlM+uPFgibGJdz2aQY98QvL2/HCoXGcWVyE= -github.com/blinklabs-io/gouroboros v0.89.1 h1:pcD9hc2EkiPkq915aMDBAbgQZTX4I73gUzZf2UUcggs= -github.com/blinklabs-io/gouroboros v0.89.1/go.mod h1:l6G9mwAa/p0CBGCZBjK1W67815gWrRlmcGl6fccbt4U= +github.com/blinklabs-io/gouroboros v0.90.0 h1:PReNJ9JY+6nU6w/gHxRhSg52O6VcEpoDaicbN9UoiQU= +github.com/blinklabs-io/gouroboros v0.90.0/go.mod h1:tIRw2LWdjjf4UUkKk4EiC7xlZ48r4c+AV8lLf4DMZ2Y= github.com/blinklabs-io/merkle-patricia-forestry v0.1.0 h1:tpnFc3uhxm1g14aOd2WsGUJc8wJS1WsVe6tCDZqjGsI= github.com/blinklabs-io/merkle-patricia-forestry v0.1.0/go.mod h1:0RVrI9p0itJdOGr35s3c8uGjO6iUkQ5dlZFsu8IoFYk= github.com/blinklabs-io/ouroboros-mock v0.3.1 h1:oQiMgH0VgsJIGy4lJGaySegObq5FsVgFTYXUO2PS2T8= diff --git a/internal/indexer/indexer.go b/internal/indexer/indexer.go index daf334e..a0a3f89 100644 --- a/internal/indexer/indexer.go +++ b/internal/indexer/indexer.go @@ -229,23 +229,23 @@ func (i *Indexer) handleEventTransaction(evt event.Event) error { } } } - for idx, txOutput := range eventTx.Transaction.Produced() { - if txOutput.Address().String() == cfg.Indexer.ScriptAddress || - txOutput.Address().String() == bursa.PaymentAddress { + for _, utxo := range eventTx.Transaction.Produced() { + if utxo.Output.Address().String() == cfg.Indexer.ScriptAddress || + utxo.Output.Address().String() == bursa.PaymentAddress { // Write UTXO to storage if err := store.AddUtxo( - txOutput.Address().String(), + utxo.Output.Address().String(), eventCtx.TransactionHash, - uint32(idx), - txOutput.Cbor(), + utxo.Id.Index(), + utxo.Output.Cbor(), eventCtx.SlotNumber, ); err != nil { return err } } // Handle datum for script address - if txOutput.Address().String() == cfg.Indexer.ScriptAddress { - datum := txOutput.Datum() + if utxo.Output.Address().String() == cfg.Indexer.ScriptAddress { + datum := utxo.Output.Datum() if datum != nil { if _, err := datum.Decode(); err != nil { logger.Warnf(