Skip to content

Commit eddeaee

Browse files
committed
Fix calling responsible methods for ABI v2.7+
1 parent e5e8963 commit eddeaee

5 files changed

Lines changed: 366 additions & 18 deletions

File tree

Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nekoton-python"
3-
version = "0.1.24"
3+
version = "0.1.25"
44
edition = "2021"
55

66
[lib]

src/abi.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,13 @@ impl FunctionAbi {
663663
) -> PyResult<ExecutionOutput> {
664664
use nt::abi::FunctionExt;
665665

666+
// Insert answer id if none, just in case the responsible method is called.
667+
for answer_id in ["_answer_id", "answerId"] {
668+
if !input.contains(answer_id)? {
669+
input.set_item(answer_id, 0)?;
670+
}
671+
}
672+
666673
let input = parse_tokens(&self.0.inputs, input)?;
667674
let clock = match clock {
668675
Some(clock) => clock.as_ref(),

0 commit comments

Comments
 (0)