From 903a8c97e8aee660cf32845181b1bded425d7a1e Mon Sep 17 00:00:00 2001 From: Benjamin Himes Date: Wed, 9 Jul 2025 23:06:09 +0200 Subject: [PATCH 1/2] Missed passing runtime in encoding --- async_substrate_interface/async_substrate.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/async_substrate_interface/async_substrate.py b/async_substrate_interface/async_substrate.py index fb86216..7b0072f 100644 --- a/async_substrate_interface/async_substrate.py +++ b/async_substrate_interface/async_substrate.py @@ -2944,7 +2944,7 @@ async def _do_runtime_call_old( param_type_string = f"{param['type']}" if isinstance(params, list): param_data += await self.encode_scale( - param_type_string, params[idx] + param_type_string, params[idx], runtime=runtime ) else: if param["name"] not in params: @@ -2953,7 +2953,7 @@ async def _do_runtime_call_old( ) param_data += await self.encode_scale( - param_type_string, params[param["name"]] + param_type_string, params[param["name"]], runtime=runtime ) # RPC request @@ -3038,13 +3038,15 @@ async def runtime_call( for idx, param in enumerate(runtime_call_def["inputs"]): param_type_string = f"scale_info::{param['ty']}" if isinstance(params, list): - param_data += await self.encode_scale(param_type_string, params[idx]) + param_data += await self.encode_scale( + param_type_string, params[idx], runtime=runtime + ) else: if param["name"] not in params: raise ValueError(f"Runtime Call param '{param['name']}' is missing") param_data += await self.encode_scale( - param_type_string, params[param["name"]] + param_type_string, params[param["name"]], runtime=runtime ) # RPC request From 6e8b70d4929fd7b56e3d07911615ca2f66e142e2 Mon Sep 17 00:00:00 2001 From: Benjamin Himes Date: Wed, 9 Jul 2025 23:18:53 +0200 Subject: [PATCH 2/2] Updates changelog + version --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22379d3..fe46bb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.4.1 /2025-07-09 +* Missed passing runtime in encoding by @thewhaleking in https://github.com/opentensor/async-substrate-interface/pull/149 + + +**Full Changelog**: https://github.com/opentensor/async-substrate-interface/compare/v1.4.0...v1.4.1 + ## 1.4.0 /2025-07-07 * Removes unused imports by @thewhaleking in https://github.com/opentensor/async-substrate-interface/pull/139 * Improve CachedFetcher by @thewhaleking in https://github.com/opentensor/async-substrate-interface/pull/140 diff --git a/pyproject.toml b/pyproject.toml index 80f78b1..86e446f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "async-substrate-interface" -version = "1.4.0" +version = "1.4.1" description = "Asyncio library for interacting with substrate. Mostly API-compatible with py-substrate-interface" readme = "README.md" license = { file = "LICENSE" }