Skip to content

Commit 8211dee

Browse files
while0x1cffls
andauthored
blockfrost Backend _get_script patches (#428)
* Update blockfrost.py cast script_type to int for the method PlutusScript.from_version * Update blockfrost.py capitalisation mistake startswith in _gets_script * Fix format --------- Co-authored-by: Jerry <[email protected]>
1 parent af5ded0 commit 8211dee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pycardano/backend/blockfrost.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,10 @@ def protocol_param(self) -> ProtocolParameters:
174174

175175
def _get_script(self, script_hash: str) -> ScriptType:
176176
script_type = self.api.script(script_hash).type
177-
if script_type.startsWith("plutusV"):
177+
if script_type.startswith("plutusV"):
178178
ps = PlutusScript.from_version(
179-
script_type[-1], bytes.fromhex(self.api.script_cbor(script_hash).cbor)
179+
int(script_type[-1]),
180+
bytes.fromhex(self.api.script_cbor(script_hash).cbor),
180181
)
181182
return _try_fix_script(script_hash, ps)
182183
else:

0 commit comments

Comments
 (0)