File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 16
16
GenesisParameters ,
17
17
ProtocolParameters ,
18
18
)
19
+ from pycardano .backend .blockfrost import _try_fix_script
19
20
from pycardano .exception import TransactionFailedException
20
21
from pycardano .hash import DatumHash , ScriptHash
21
22
from pycardano .network import Network
@@ -343,13 +344,11 @@ def _utxos_kupo(self, address: str) -> List[UTxO]:
343
344
kupo_script_url = self ._kupo_url + "/scripts/" + script_hash
344
345
script = requests .get (kupo_script_url ).json ()
345
346
if script ["language" ] == "plutus:v2" :
346
- script = PlutusV2Script (
347
- cbor2 .loads (bytes .fromhex (script ["script" ]))
348
- )
347
+ script = PlutusV2Script (bytes .fromhex (script ["script" ]))
348
+ script = _try_fix_script (script_hash , script )
349
349
elif script ["language" ] == "plutus:v1" :
350
- script = PlutusV1Script (
351
- cbor2 .loads (bytes .fromhex (script ["script" ]))
352
- )
350
+ script = PlutusV1Script (bytes .fromhex (script ["script" ]))
351
+ script = _try_fix_script (script_hash , script )
353
352
else :
354
353
raise ValueError ("Unknown plutus script type" )
355
354
You can’t perform that action at this time.
0 commit comments