You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a panic! in the subxt library when attempting to construct a dynamic transaction call_data with invalid arguments.
The issue occurs in this specific line of codehttps://github.com/paritytech/subxt/blob/master/core/src/tx/payload.rs#L186
Error output:
The fields are valid types from the metadata, qed;: Error { context: Context { path: [Location { inner: Index(0) }] }, kind: WrongShape { actual: Number, expected_id: "13" } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Steps to Reproduce
let arg = scale_value::stringify::from_str_custom().add_custom_parser(custom_parsers::parse_hex).add_custom_parser(custom_parsers::parse_ss58).parse("123").0?;
subxt::dynamic::tx("System","remark", parsed_args);let call_data = tx.encode_call_data(&client.metadata());
I should ensure proper validation of the requested arguments before constructing the transaction. However, if the provided arguments are invalid, it would be ideal for the encode_call_data function to throw a meaningful error instead of causing a panic.
The text was updated successfully, but these errors were encountered:
I should ensure proper validation of the requested arguments before constructing the transaction. However, if the provided arguments are invalid, it would be ideal for the encode_call_data function to throw a meaningful error instead of causing a panic.
I encountered a panic! in the
subxt
library when attempting to construct a dynamic transactioncall_data
with invalid arguments.The issue occurs in this specific line of codehttps://github.com/paritytech/subxt/blob/master/core/src/tx/payload.rs#L186
Error output:
Steps to Reproduce
I should ensure proper validation of the requested arguments before constructing the transaction. However, if the provided arguments are invalid, it would be ideal for the
encode_call_data
function to throw a meaningful error instead of causing a panic.The text was updated successfully, but these errors were encountered: