@@ -114,8 +114,8 @@ func (s *queryServiceServer) ReadUtxos(
114114 for _ , txo := range keys {
115115 // txo.Hash, txo.Index
116116 tmpTxIn := ledger.ShelleyTransactionInput {
117- TxId : ledger .Blake2b256 (txo .Hash ),
118- OutputIndex : uint32 (txo .Index ),
117+ TxId : ledger .Blake2b256 (txo .GetHash () ),
118+ OutputIndex : uint32 (txo .GetIndex () ),
119119 }
120120 tmpTxIns = append (tmpTxIns , tmpTxIn )
121121 }
@@ -137,16 +137,16 @@ func (s *queryServiceServer) ReadUtxos(
137137 var aud query.AnyUtxoData
138138 var audc query.AnyUtxoData_Cardano
139139 aud .TxoRef = txo
140- txHash := hex .EncodeToString (txo .Hash )
140+ txHash := hex .EncodeToString (txo .GetHash () )
141141 if utxoId .Hash .String () == txHash &&
142142 // #nosec G115
143- uint32 (utxoId .Idx ) == txo .Index {
143+ uint32 (utxoId .Idx ) == txo .GetIndex () {
144144 aud .NativeBytes = utxo .Cbor ()
145145 audc .Cardano = utxo .Utxorpc ()
146- if audc .Cardano .Datum != nil {
146+ if audc .Cardano .GetDatum () != nil {
147147 // Check if Datum.Hash is all zeroes
148148 isAllZeroes := true
149- for _ , b := range audc .Cardano .Datum . Hash {
149+ for _ , b := range audc .Cardano .GetDatum (). GetHash () {
150150 if b != 0 {
151151 isAllZeroes = false
152152 break
@@ -159,7 +159,7 @@ func (s *queryServiceServer) ReadUtxos(
159159 "Datum Hash is all zeroes; setting Datum to nil" ,
160160 )
161161 } else {
162- log .Printf ("Datum Hash present: %x" , audc .Cardano .Datum . Hash )
162+ log .Printf ("Datum Hash present: %x" , audc .Cardano .GetDatum (). GetHash () )
163163 }
164164 }
165165 aud .ParsedState = & audc
@@ -173,8 +173,8 @@ func (s *queryServiceServer) ReadUtxos(
173173 }
174174 log .Printf (
175175 "Prepared response with LedgerTip: Slot=%v, Hash=%v" ,
176- resp .LedgerTip . Slot ,
177- resp .LedgerTip . Hash ,
176+ resp .GetLedgerTip (). GetSlot () ,
177+ resp .GetLedgerTip (). GetHash () ,
178178 )
179179 log .Printf ("Final response: %v" , resp )
180180 return connect .NewResponse (resp ), nil
@@ -282,10 +282,10 @@ func (s *queryServiceServer) SearchUtxos(
282282 // If AssetPattern is specified, filter based on it
283283 if assetPattern != nil {
284284 assetFound := false
285- for _ , multiasset := range audc .Cardano .Assets {
286- if bytes .Equal (multiasset .PolicyId , assetPattern .PolicyId ) {
287- for _ , asset := range multiasset .Assets {
288- if bytes .Equal (asset .Name , assetPattern .AssetName ) {
285+ for _ , multiasset := range audc .Cardano .GetAssets () {
286+ if bytes .Equal (multiasset .GetPolicyId () , assetPattern .GetPolicyId () ) {
287+ for _ , asset := range multiasset .GetAssets () {
288+ if bytes .Equal (asset .GetName () , assetPattern .GetAssetName () ) {
289289 assetFound = true
290290 break
291291 }
0 commit comments