From 3020d26ca36cace2b921494966f654773eff6b52 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 1 Oct 2025 09:11:05 +0200 Subject: [PATCH 1/2] fix register TCB Info --- .../base_cli/commands/register_tcb_info.rs | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/cli/src/base_cli/commands/register_tcb_info.rs b/cli/src/base_cli/commands/register_tcb_info.rs index 7ea26aca8..fb461659c 100644 --- a/cli/src/base_cli/commands/register_tcb_info.rs +++ b/cli/src/base_cli/commands/register_tcb_info.rs @@ -14,11 +14,11 @@ limitations under the License. */ - use crate::{ command_utils::{get_chain_api, *}, Cli, CliResult, CliResultOk, }; +use codec::Encode; use itp_node_api::api_client::TEEREX; use itp_types::{parentchain::Hash, OpaqueCall}; use itp_utils::ToHexPrefixed; @@ -104,19 +104,22 @@ impl RegisterTcbInfoCommand { let intel_signature = hex::decode(intel_signature_hex).unwrap(); - let call = OpaqueCall::from_tuple(&compose_call!( - chain_api.metadata(), - TEEREX, - "register_tcb_info", - tcb_info, - intel_signature, - certificate_chain - )); + let call = OpaqueCall::from_tuple( + &compose_call!( + chain_api.metadata(), + TEEREX, + "register_tcb_info", + tcb_info.to_string(), + intel_signature, + certificate_chain + ) + .unwrap(), + ); trace!( "encoded call to be sent as extrinsic with nonce {}: {}", nonce, - call.to_hex() + call.encode().to_hex() ); let xt = compose_extrinsic_offline!( From 485aa963f44d40b33c9a0adc5386d9467f186cc0 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 1 Oct 2025 09:16:46 +0200 Subject: [PATCH 2/2] fix second occurrence of same pattern --- cli/src/base_cli/commands/faucet.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/cli/src/base_cli/commands/faucet.rs b/cli/src/base_cli/commands/faucet.rs index 40a4a45c4..89fa9bc80 100644 --- a/cli/src/base_cli/commands/faucet.rs +++ b/cli/src/base_cli/commands/faucet.rs @@ -45,13 +45,16 @@ impl FaucetCommand { let mut nonce = api.get_nonce().unwrap(); for account in &self.accounts { let to = get_accountid_from_str(account); - let call = OpaqueCall::from_tuple(&compose_call!( - api.metadata(), - "Balances", - "transfer_keep_alive", - MultiAddress::::Id(to.clone()), - Compact(PREFUNDING_AMOUNT) - )); + let call = OpaqueCall::from_tuple( + &compose_call!( + api.metadata(), + "Balances", + "transfer_keep_alive", + MultiAddress::::Id(to.clone()), + Compact(PREFUNDING_AMOUNT) + ) + .unwrap(), + ); #[allow(clippy::redundant_clone)] let xt = compose_extrinsic_offline!(api.signer().unwrap(), call, api.extrinsic_params(nonce)); // send and watch extrinsic until finalized