From 0db9b6dc5ef51dac4ae6e6abe78dfd99c85b686a Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Wed, 10 Jun 2026 20:12:10 +0800 Subject: [PATCH] fix for runtime update --- src/cli/runtime.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/cli/runtime.rs b/src/cli/runtime.rs index 7c010c6..302dfd4 100644 --- a/src/cli/runtime.rs +++ b/src/cli/runtime.rs @@ -99,21 +99,14 @@ pub async fn update_runtime( let preimage_hash: sp_core::H256 = BlakeTwo256::hash(&encoded_call); log_print!("🔗 Preimage hash: {:?}", preimage_hash); - // Submit Preimage::note_preimage with bounded bytes - type PreimageBytes = quantus_subxt::api::preimage::calls::types::note_preimage::Bytes; - let bounded_bytes: PreimageBytes = encoded_call.clone(); - - log_print!("📝 Submitting preimage..."); - let note_preimage_tx = quantus_subxt::api::tx().preimage().note_preimage(bounded_bytes); - let preimage_tx_hash = crate::cli::common::submit_transaction( + // Submit preimage and wait for inclusion so the referendum tx gets a fresh nonce + crate::cli::common::submit_preimage( quantus_client, from_keypair, - note_preimage_tx, - None, + encoded_call.clone(), execution_mode, ) .await?; - log_success!("✅ Preimage transaction submitted: {:?}", preimage_tx_hash); // Build TechReferenda::submit call using Lookup preimage reference type ProposalBounded =