diff --git a/pycardano/backend/blockfrost.py b/pycardano/backend/blockfrost.py index cbd81285..5008382b 100644 --- a/pycardano/backend/blockfrost.py +++ b/pycardano/backend/blockfrost.py @@ -174,9 +174,10 @@ def protocol_param(self) -> ProtocolParameters: def _get_script(self, script_hash: str) -> ScriptType: script_type = self.api.script(script_hash).type - if script_type.startsWith("plutusV"): + if script_type.startswith("plutusV"): ps = PlutusScript.from_version( - script_type[-1], bytes.fromhex(self.api.script_cbor(script_hash).cbor) + int(script_type[-1]), + bytes.fromhex(self.api.script_cbor(script_hash).cbor), ) return _try_fix_script(script_hash, ps) else: