Skip to content

Commit

Permalink
Fix ogmios v6 backend / plutusv3
Browse files Browse the repository at this point in the history
  • Loading branch information
nielstron committed Oct 9, 2024
1 parent 3ca745a commit 6cf5352
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pycardano/backend/ogmios_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@ def _utxo_from_ogmios_result(self, utxo: OgmiosUtxo) -> UTxO:
script = utxo.script
if script:
# TODO: Need to test with native scripts
if script["language"] == "plutus:v3":
script = PlutusV3Script(bytes.fromhex(script["cbor"]))
if script["language"] == "plutus:v2":
script = PlutusV2Script(bytes.fromhex(script["cbor"]))
elif script["language"] == "plutus:v1":
script = PlutusV1Script(bytes.fromhex(script["cbor"]))
if script.language == "plutus:v3":
script = PlutusV3Script(bytes.fromhex(script.cbor))

Check warning on line 265 in pycardano/backend/ogmios_v6.py

View check run for this annotation

Codecov / codecov/patch

pycardano/backend/ogmios_v6.py#L265

Added line #L265 was not covered by tests
elif script.language == "plutus:v2":
script = PlutusV2Script(bytes.fromhex(script.cbor))

Check warning on line 267 in pycardano/backend/ogmios_v6.py

View check run for this annotation

Codecov / codecov/patch

pycardano/backend/ogmios_v6.py#L267

Added line #L267 was not covered by tests
elif script.language == "plutus:v1":
script = PlutusV1Script(bytes.fromhex(script.cbor))

Check warning on line 269 in pycardano/backend/ogmios_v6.py

View check run for this annotation

Codecov / codecov/patch

pycardano/backend/ogmios_v6.py#L269

Added line #L269 was not covered by tests
else:
raise ValueError("Unknown plutus script type")
datum_hash = (
Expand Down

0 comments on commit 6cf5352

Please sign in to comment.