Skip to content

Commit

Permalink
add governance update 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Jan 16, 2025
1 parent 9132e64 commit 2063588
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions control/preimage/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ pub enum Command {
ForceCheckpoint(ForceCheckpointArgs),
/// Set the checkpoint for the beacon light client
HaltBridge(HaltBridgeArgs),
/// Treasury proposal
TreasuryProposal2024(TreasuryProposal2024Args),
/// Register Ether
RegisterEther(RegisterEtherArgs),
/// Treasury proposal
TreasuryProposal2024(TreasuryProposal2024Args),
/// Governance update 202501
GovUpdate202501(GovUpdate202501Args),
}

#[derive(Debug, Args)]
Expand Down Expand Up @@ -220,6 +222,14 @@ pub struct TreasuryProposal2024Args {
beneficiary: FixedBytes<32>,
}

#[derive(Debug, Args)]
pub struct GovUpdate202501Args {
#[command(flatten)]
pricing_parameters: PricingParametersArgs,
#[command(flatten)]
register_ether: RegisterEtherArgs,
}

#[derive(Debug, Args)]
pub struct RegisterEtherArgs {
/// The minimum balance of the Ether asset that users are allowed to hold
Expand Down Expand Up @@ -436,11 +446,35 @@ async fn run() -> Result<(), Box<dyn std::error::Error>> {
utility_force_batch(vec![call1, call2])
}
}
Command::TreasuryProposal2024(params) => treasury_commands::treasury_proposal(&params),
Command::RegisterEther(params) => {
let (register_ether_call, set_ether_metadata_call) = commands::register_ether(&params);
send_xcm_asset_hub(&context, vec![register_ether_call, set_ether_metadata_call]).await?
}
Command::TreasuryProposal2024(params) => treasury_commands::treasury_proposal(&params),
Command::GovUpdate202501(GovUpdate202501Args {
pricing_parameters,
register_ether,
}) => {
let (set_pricing_parameters, set_ethereum_fee) =
commands::pricing_parameters(&context, pricing_parameters).await?;

let bh_set_pricing_call =
send_xcm_bridge_hub(&context, vec![set_pricing_parameters]).await?;

let ah_set_pricing_call = send_xcm_asset_hub(&context, vec![set_ethereum_fee]).await?;

let (register_ether_call, set_ether_metadata_call) =
commands::register_ether(&register_ether);
let ah_register_ether_call =
send_xcm_asset_hub(&context, vec![register_ether_call, set_ether_metadata_call])
.await?;

utility_force_batch(vec![
bh_set_pricing_call,
ah_set_pricing_call,
ah_register_ether_call,
])
}
};

#[cfg(any(feature = "westend", feature = "paseo"))]
Expand Down

0 comments on commit 2063588

Please sign in to comment.