diff --git a/control/preimage/src/main.rs b/control/preimage/src/main.rs index a1c0e7bce..6b3fb31a9 100644 --- a/control/preimage/src/main.rs +++ b/control/preimage/src/main.rs @@ -76,6 +76,10 @@ pub enum Command { /// Upgrade to FiatShamir on Polkadot #[command(alias = "upgrade-202603")] Upgrade202603, + /// Treasury proposal 2026 + TreasuryProposal2026(TreasuryProposal2026Args), + /// Bug bounty proposal 2026 + BugBountyProposal2026(BugBountyProposal2026Args), } #[derive(Debug, Args)] @@ -233,6 +237,20 @@ pub struct TreasuryProposal2024Args { beneficiary: FixedBytes<32>, } +#[derive(Debug, Args)] +pub struct TreasuryProposal2026Args { + /// Beneficiary address + #[arg(long, value_name = "ADDRESS", value_parser=parse_hex_bytes32)] + beneficiary: FixedBytes<32>, +} + +#[derive(Debug, Args)] +pub struct BugBountyProposal2026Args { + /// Beneficiary address + #[arg(long, value_name = "ADDRESS", value_parser=parse_hex_bytes32)] + beneficiary: FixedBytes<32>, +} + #[derive(Debug, Args)] pub struct GovUpdate202501Args { #[command(flatten)] @@ -462,7 +480,9 @@ async fn run() -> Result<(), Box> { let (register_ether_call, set_ether_metadata_call) = commands::register_ether(¶ms); send_xcm_asset_hub(&context, vec![register_ether_call, set_ether_metadata_call]).await? } - Command::TreasuryProposal2024(params) => treasury_commands::treasury_proposal(¶ms), + Command::TreasuryProposal2024(params) => treasury_commands::treasury_proposal_2024(¶ms), + Command::TreasuryProposal2026(params) => treasury_commands::treasury_proposal_2026(¶ms), + Command::BugBountyProposal2026(params) => treasury_commands::bug_bounty_proposal_2026(¶ms), Command::GovUpdate202501(GovUpdate202501Args { pricing_parameters, register_ether, diff --git a/control/preimage/src/treasury_commands.rs b/control/preimage/src/treasury_commands.rs index 5329fcc22..ff88308e4 100644 --- a/control/preimage/src/treasury_commands.rs +++ b/control/preimage/src/treasury_commands.rs @@ -1,4 +1,4 @@ -use crate::TreasuryProposal2024Args; +use crate::{BugBountyProposal2026Args, TreasuryProposal2024Args, TreasuryProposal2026Args}; use crate::asset_hub_runtime::runtime_types::{ pallet_treasury, @@ -174,7 +174,7 @@ const SPENDS: [Spend; 23] = [ pub const LAUNCH_BLOCK: u32 = 21292000; -pub fn treasury_proposal(params: &TreasuryProposal2024Args) -> AssetHubRuntimeCall { +pub fn treasury_proposal_2024(params: &TreasuryProposal2024Args) -> AssetHubRuntimeCall { let mut calls: Vec = vec![]; for spend in SPENDS.iter() { @@ -192,6 +192,56 @@ pub fn treasury_proposal(params: &TreasuryProposal2024Args) -> AssetHubRuntimeCa utility_force_batch(calls) } +const SPENDS_2026: [Spend; 2] = [ + Spend { + name: "Payment 1", + asset: TreasuryAsset::USDC(182100), + delay: None, + }, + Spend { + name: "Payment 2", + asset: TreasuryAsset::USDC(182100), + delay: Some(180 * DAYS), + }, +]; + +// Approximate Asset Hub block at proposal submission time (April 2026) +pub const PROPOSAL_2026_BASE_BLOCK: u32 = 14636636; + +pub fn treasury_proposal_2026(params: &TreasuryProposal2026Args) -> AssetHubRuntimeCall { + let mut calls: Vec = vec![]; + + for spend in SPENDS_2026.iter() { + let (asset_id, asset_location, asset_amount) = spend.asset.into(); + let call = make_treasury_spend( + params.beneficiary.into(), + asset_location, + asset_amount, + spend.delay.map(|delay| PROPOSAL_2026_BASE_BLOCK + delay), + ); + calls.push(call); + println!("Spend: {}, {}({})", spend.name, asset_id, asset_amount); + } + + utility_force_batch(calls) +} + +// Approximate Asset Hub block number for 1 Aug 2026 +pub const AUG_1_2026_BLOCK: u32 = 16177436; + +pub fn bug_bounty_proposal_2026(params: &BugBountyProposal2026Args) -> AssetHubRuntimeCall { + let (asset_id, asset_location, asset_amount) = TreasuryAsset::USDC(355000).into(); + let call = make_treasury_spend( + params.beneficiary.into(), + asset_location, + asset_amount, + Some(AUG_1_2026_BLOCK), + ); + println!("Spend: Bug Bounty, {}({})", asset_id, asset_amount); + + utility_force_batch(vec![call]) +} + fn make_treasury_spend( beneficiary: [u8; 32], asset: Location,