From 6cd463bf329668de30a464a6ccebbc646c5c7ec0 Mon Sep 17 00:00:00 2001 From: Cezary Olborski Date: Tue, 17 Feb 2026 19:00:38 +0800 Subject: [PATCH] feat: Treasury refreshed --- README.md | 12 +- src/chain/quantus_subxt.rs | 1768 +++++------------------------------- src/cli/mod.rs | 2 +- src/cli/treasury.rs | 604 +----------- src/quantus_metadata.scale | Bin 169195 -> 160193 bytes 5 files changed, 285 insertions(+), 2101 deletions(-) diff --git a/README.md b/README.md index 8c86085..92f6dd7 100644 --- a/README.md +++ b/README.md @@ -390,15 +390,11 @@ quantus recovery claim --rescuer bob --lost alice ### Treasury -```bash -# Check treasury balance -quantus treasury balance - -# Submit a spend proposal -quantus treasury submit-spend --beneficiary
--amount 100.0 --track small --from alice +Treasury is the account that receives a configurable portion of mining rewards. No special spend/proposal flow — just view its state. -# Payout an approved spend -quantus treasury payout --index 0 --from alice +```bash +# Show treasury account and balance +quantus treasury info ``` --- diff --git a/src/chain/quantus_subxt.rs b/src/chain/quantus_subxt.rs index 0651a80..dd68717 100644 --- a/src/chain/quantus_subxt.rs +++ b/src/chain/quantus_subxt.rs @@ -6,7 +6,7 @@ pub mod api { mod root_mod { pub use super::*; } - pub static PALLETS: [&str; 22usize] = [ + pub static PALLETS: [&str; 21usize] = [ "System", "Timestamp", "Balances", @@ -23,7 +23,6 @@ pub mod api { "TechCollective", "TechReferenda", "TreasuryPallet", - "Origins", "Recovery", "Assets", "AssetsHolder", @@ -1470,9 +1469,10 @@ pub mod api { "query_call_info", types::QueryCallInfo { call, len }, [ - 204u8, 150u8, 141u8, 3u8, 172u8, 39u8, 127u8, 54u8, 249u8, 96u8, 163u8, - 158u8, 93u8, 236u8, 159u8, 71u8, 49u8, 22u8, 104u8, 202u8, 3u8, 96u8, - 247u8, 91u8, 244u8, 94u8, 201u8, 162u8, 142u8, 28u8, 197u8, 142u8, + 199u8, 188u8, 161u8, 1u8, 221u8, 186u8, 101u8, 194u8, 181u8, 107u8, + 212u8, 35u8, 2u8, 8u8, 198u8, 148u8, 37u8, 179u8, 92u8, 122u8, 253u8, + 235u8, 62u8, 173u8, 213u8, 18u8, 26u8, 170u8, 135u8, 120u8, 162u8, + 32u8, ], ) } @@ -1490,9 +1490,9 @@ pub mod api { "query_call_fee_details", types::QueryCallFeeDetails { call, len }, [ - 188u8, 8u8, 21u8, 155u8, 112u8, 74u8, 100u8, 5u8, 115u8, 144u8, 213u8, - 217u8, 106u8, 97u8, 48u8, 45u8, 93u8, 58u8, 101u8, 97u8, 226u8, 204u8, - 167u8, 167u8, 138u8, 151u8, 24u8, 106u8, 149u8, 11u8, 55u8, 170u8, + 156u8, 135u8, 85u8, 250u8, 145u8, 189u8, 63u8, 36u8, 186u8, 134u8, 9u8, + 17u8, 4u8, 79u8, 120u8, 98u8, 63u8, 219u8, 216u8, 44u8, 158u8, 88u8, + 126u8, 41u8, 0u8, 97u8, 93u8, 234u8, 249u8, 179u8, 170u8, 134u8, ], ) } @@ -1850,9 +1850,6 @@ pub mod api { pub fn tech_referenda(&self) -> tech_referenda::constants::ConstantsApi { tech_referenda::constants::ConstantsApi } - pub fn treasury_pallet(&self) -> treasury_pallet::constants::ConstantsApi { - treasury_pallet::constants::ConstantsApi - } pub fn recovery(&self) -> recovery::constants::ConstantsApi { recovery::constants::ConstantsApi } @@ -1994,9 +1991,9 @@ pub mod api { .hash(); runtime_metadata_hash == [ - 60u8, 255u8, 4u8, 208u8, 41u8, 252u8, 232u8, 254u8, 146u8, 6u8, 174u8, 75u8, 170u8, - 225u8, 3u8, 217u8, 68u8, 231u8, 231u8, 227u8, 166u8, 46u8, 206u8, 236u8, 155u8, - 201u8, 2u8, 240u8, 72u8, 62u8, 125u8, 106u8, + 6u8, 176u8, 107u8, 34u8, 235u8, 221u8, 156u8, 243u8, 98u8, 115u8, 170u8, 186u8, + 22u8, 200u8, 173u8, 142u8, 190u8, 154u8, 75u8, 86u8, 176u8, 207u8, 65u8, 103u8, + 203u8, 172u8, 16u8, 101u8, 182u8, 189u8, 166u8, 9u8, ] } pub mod system { @@ -3095,9 +3092,10 @@ pub mod api { "Events", (), [ - 137u8, 200u8, 171u8, 24u8, 189u8, 55u8, 241u8, 103u8, 215u8, 54u8, - 98u8, 177u8, 217u8, 184u8, 55u8, 205u8, 187u8, 36u8, 71u8, 136u8, 71u8, - 63u8, 1u8, 7u8, 221u8, 213u8, 113u8, 189u8, 226u8, 251u8, 216u8, 172u8, + 241u8, 44u8, 250u8, 237u8, 114u8, 188u8, 218u8, 139u8, 207u8, 203u8, + 98u8, 141u8, 52u8, 57u8, 67u8, 245u8, 118u8, 165u8, 129u8, 196u8, + 139u8, 67u8, 96u8, 116u8, 183u8, 195u8, 161u8, 74u8, 24u8, 241u8, 78u8, + 18u8, ], ) } @@ -5377,10 +5375,10 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 139u8, 70u8, 66u8, 133u8, 103u8, 122u8, 116u8, 79u8, 33u8, 114u8, - 121u8, 140u8, 45u8, 159u8, 190u8, 20u8, 82u8, 18u8, 149u8, 237u8, - 153u8, 207u8, 254u8, 49u8, 229u8, 147u8, 158u8, 47u8, 98u8, 221u8, - 64u8, 208u8, + 235u8, 252u8, 124u8, 242u8, 195u8, 130u8, 86u8, 167u8, 204u8, 55u8, + 207u8, 110u8, 60u8, 82u8, 15u8, 153u8, 58u8, 150u8, 49u8, 77u8, 183u8, + 179u8, 231u8, 126u8, 81u8, 68u8, 233u8, 247u8, 190u8, 21u8, 53u8, + 194u8, ], ) } @@ -5403,9 +5401,9 @@ pub mod api { weight, }, [ - 161u8, 255u8, 101u8, 97u8, 2u8, 224u8, 1u8, 98u8, 65u8, 47u8, 40u8, - 73u8, 58u8, 241u8, 87u8, 27u8, 49u8, 27u8, 58u8, 156u8, 63u8, 175u8, - 215u8, 152u8, 16u8, 46u8, 118u8, 155u8, 93u8, 41u8, 165u8, 173u8, + 214u8, 170u8, 23u8, 224u8, 160u8, 17u8, 199u8, 78u8, 163u8, 142u8, + 191u8, 81u8, 242u8, 253u8, 7u8, 41u8, 42u8, 123u8, 122u8, 6u8, 71u8, + 144u8, 194u8, 23u8, 2u8, 82u8, 99u8, 51u8, 26u8, 35u8, 125u8, 136u8, ], ) } @@ -5443,10 +5441,9 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 29u8, 143u8, 178u8, 190u8, 95u8, 145u8, 17u8, 240u8, 94u8, 218u8, 89u8, - 233u8, 194u8, 39u8, 196u8, 247u8, 210u8, 165u8, 71u8, 62u8, 164u8, - 175u8, 42u8, 179u8, 137u8, 187u8, 177u8, 10u8, 248u8, 157u8, 91u8, - 93u8, + 223u8, 26u8, 145u8, 224u8, 83u8, 235u8, 132u8, 251u8, 203u8, 56u8, + 35u8, 235u8, 15u8, 239u8, 96u8, 37u8, 70u8, 167u8, 19u8, 28u8, 179u8, + 196u8, 251u8, 19u8, 53u8, 98u8, 90u8, 187u8, 93u8, 139u8, 8u8, 46u8, ], ) } @@ -6006,22 +6003,6 @@ pub mod api { ], ) } - #[doc = " The portion of rewards that goes to treasury"] - pub fn treasury_portion( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::sp_arithmetic::per_things::Permill, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MiningRewards", - "TreasuryPortion", - [ - 65u8, 93u8, 120u8, 165u8, 204u8, 81u8, 159u8, 163u8, 93u8, 135u8, - 114u8, 121u8, 147u8, 35u8, 215u8, 213u8, 4u8, 223u8, 83u8, 37u8, 225u8, - 200u8, 189u8, 156u8, 140u8, 36u8, 58u8, 46u8, 42u8, 232u8, 155u8, 0u8, - ], - ) - } #[doc = " The base unit for token amounts (e.g., 1e12 for 12 decimals)"] pub fn unit( &self, @@ -6038,22 +6019,6 @@ pub mod api { ], ) } - #[doc = " The treasury pallet ID"] - pub fn treasury_pallet_id( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "MiningRewards", - "TreasuryPalletId", - [ - 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, - 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, - 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, - ], - ) - } #[doc = " Account ID used as the \"from\" account when creating transfer proofs for minted tokens"] pub fn minting_account( &self, @@ -6935,10 +6900,10 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 102u8, 103u8, 19u8, 115u8, 19u8, 43u8, 141u8, 147u8, 145u8, 130u8, - 118u8, 205u8, 116u8, 21u8, 169u8, 245u8, 91u8, 195u8, 69u8, 49u8, 11u8, - 189u8, 250u8, 142u8, 248u8, 124u8, 135u8, 217u8, 78u8, 252u8, 36u8, - 226u8, + 224u8, 6u8, 189u8, 143u8, 200u8, 31u8, 204u8, 102u8, 211u8, 15u8, + 164u8, 111u8, 111u8, 157u8, 53u8, 14u8, 41u8, 226u8, 8u8, 91u8, 222u8, + 46u8, 96u8, 23u8, 184u8, 224u8, 106u8, 73u8, 136u8, 212u8, 163u8, + 119u8, ], ) } @@ -6980,10 +6945,9 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 138u8, 207u8, 16u8, 247u8, 167u8, 103u8, 166u8, 249u8, 84u8, 160u8, - 115u8, 250u8, 241u8, 153u8, 56u8, 116u8, 81u8, 181u8, 152u8, 239u8, - 95u8, 135u8, 69u8, 165u8, 228u8, 216u8, 227u8, 71u8, 157u8, 114u8, - 117u8, 192u8, + 228u8, 52u8, 241u8, 237u8, 177u8, 69u8, 209u8, 126u8, 196u8, 0u8, 1u8, + 152u8, 0u8, 117u8, 117u8, 227u8, 72u8, 124u8, 81u8, 126u8, 11u8, 117u8, + 180u8, 18u8, 129u8, 149u8, 145u8, 206u8, 126u8, 13u8, 138u8, 140u8, ], ) } @@ -7022,9 +6986,10 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 229u8, 249u8, 88u8, 250u8, 31u8, 188u8, 238u8, 42u8, 94u8, 153u8, 29u8, - 70u8, 199u8, 95u8, 46u8, 113u8, 204u8, 236u8, 225u8, 200u8, 34u8, 55u8, - 82u8, 32u8, 14u8, 154u8, 73u8, 175u8, 205u8, 6u8, 165u8, 72u8, + 218u8, 34u8, 168u8, 237u8, 208u8, 192u8, 26u8, 15u8, 77u8, 152u8, + 243u8, 13u8, 66u8, 66u8, 168u8, 240u8, 182u8, 196u8, 247u8, 169u8, + 126u8, 238u8, 147u8, 25u8, 252u8, 154u8, 229u8, 118u8, 103u8, 62u8, + 252u8, 183u8, ], ) } @@ -7049,9 +7014,9 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 171u8, 36u8, 101u8, 188u8, 133u8, 123u8, 205u8, 135u8, 23u8, 2u8, 7u8, - 96u8, 10u8, 38u8, 102u8, 157u8, 170u8, 113u8, 223u8, 3u8, 144u8, 47u8, - 168u8, 57u8, 167u8, 12u8, 195u8, 66u8, 158u8, 250u8, 66u8, 157u8, + 157u8, 255u8, 142u8, 245u8, 199u8, 237u8, 39u8, 15u8, 52u8, 63u8, 11u8, + 103u8, 84u8, 123u8, 21u8, 63u8, 19u8, 191u8, 243u8, 74u8, 140u8, 253u8, + 23u8, 246u8, 33u8, 126u8, 198u8, 67u8, 171u8, 116u8, 6u8, 136u8, ], ) } @@ -7552,9 +7517,9 @@ pub mod api { "Agenda", (), [ - 188u8, 177u8, 84u8, 167u8, 206u8, 4u8, 136u8, 133u8, 67u8, 121u8, - 247u8, 186u8, 6u8, 46u8, 115u8, 104u8, 239u8, 41u8, 75u8, 143u8, 24u8, - 155u8, 212u8, 196u8, 166u8, 82u8, 63u8, 39u8, 104u8, 21u8, 19u8, 93u8, + 167u8, 175u8, 28u8, 224u8, 44u8, 149u8, 114u8, 12u8, 119u8, 107u8, + 50u8, 64u8, 173u8, 39u8, 48u8, 85u8, 151u8, 68u8, 15u8, 145u8, 182u8, + 105u8, 30u8, 18u8, 132u8, 11u8, 249u8, 54u8, 47u8, 73u8, 51u8, 49u8, ], ) } @@ -7576,9 +7541,9 @@ pub mod api { "Agenda", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 188u8, 177u8, 84u8, 167u8, 206u8, 4u8, 136u8, 133u8, 67u8, 121u8, - 247u8, 186u8, 6u8, 46u8, 115u8, 104u8, 239u8, 41u8, 75u8, 143u8, 24u8, - 155u8, 212u8, 196u8, 166u8, 82u8, 63u8, 39u8, 104u8, 21u8, 19u8, 93u8, + 167u8, 175u8, 28u8, 224u8, 44u8, 149u8, 114u8, 12u8, 119u8, 107u8, + 50u8, 64u8, 173u8, 39u8, 48u8, 85u8, 151u8, 68u8, 15u8, 145u8, 182u8, + 105u8, 30u8, 18u8, 132u8, 11u8, 249u8, 54u8, 47u8, 73u8, 51u8, 49u8, ], ) } @@ -8079,10 +8044,9 @@ pub mod api { "batch", types::Batch { calls }, [ - 111u8, 193u8, 119u8, 118u8, 37u8, 86u8, 134u8, 214u8, 148u8, 113u8, - 255u8, 207u8, 186u8, 6u8, 247u8, 84u8, 23u8, 246u8, 144u8, 242u8, - 114u8, 20u8, 105u8, 119u8, 137u8, 247u8, 189u8, 240u8, 237u8, 176u8, - 71u8, 249u8, + 155u8, 149u8, 6u8, 3u8, 240u8, 237u8, 103u8, 22u8, 219u8, 24u8, 245u8, + 110u8, 138u8, 189u8, 75u8, 126u8, 215u8, 181u8, 117u8, 72u8, 196u8, + 39u8, 186u8, 101u8, 187u8, 8u8, 96u8, 149u8, 28u8, 248u8, 222u8, 109u8, ], ) } @@ -8112,9 +8076,10 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 50u8, 167u8, 42u8, 97u8, 124u8, 144u8, 249u8, 155u8, 195u8, 246u8, - 155u8, 91u8, 32u8, 182u8, 54u8, 42u8, 176u8, 178u8, 66u8, 99u8, 46u8, - 182u8, 8u8, 242u8, 233u8, 63u8, 68u8, 60u8, 204u8, 60u8, 49u8, 112u8, + 173u8, 115u8, 46u8, 156u8, 121u8, 254u8, 127u8, 247u8, 13u8, 159u8, + 73u8, 166u8, 201u8, 33u8, 250u8, 239u8, 35u8, 251u8, 200u8, 191u8, + 248u8, 135u8, 58u8, 73u8, 213u8, 223u8, 252u8, 27u8, 226u8, 201u8, + 246u8, 77u8, ], ) } @@ -8140,9 +8105,9 @@ pub mod api { "batch_all", types::BatchAll { calls }, [ - 252u8, 233u8, 123u8, 196u8, 206u8, 108u8, 105u8, 36u8, 203u8, 174u8, - 73u8, 179u8, 76u8, 42u8, 56u8, 144u8, 167u8, 61u8, 204u8, 87u8, 132u8, - 57u8, 191u8, 199u8, 63u8, 71u8, 132u8, 174u8, 54u8, 230u8, 21u8, 199u8, + 128u8, 37u8, 142u8, 195u8, 193u8, 178u8, 226u8, 203u8, 7u8, 68u8, 45u8, + 6u8, 57u8, 118u8, 167u8, 205u8, 14u8, 254u8, 113u8, 148u8, 121u8, 49u8, + 73u8, 85u8, 171u8, 120u8, 214u8, 244u8, 189u8, 148u8, 26u8, 42u8, ], ) } @@ -8165,10 +8130,9 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 243u8, 223u8, 67u8, 77u8, 222u8, 227u8, 101u8, 159u8, 246u8, 109u8, - 238u8, 21u8, 135u8, 5u8, 26u8, 29u8, 49u8, 17u8, 29u8, 167u8, 76u8, - 84u8, 227u8, 151u8, 234u8, 214u8, 35u8, 234u8, 129u8, 163u8, 181u8, - 149u8, + 180u8, 19u8, 17u8, 244u8, 48u8, 143u8, 161u8, 235u8, 101u8, 243u8, + 230u8, 227u8, 114u8, 194u8, 81u8, 81u8, 123u8, 243u8, 218u8, 8u8, 36u8, + 39u8, 113u8, 231u8, 135u8, 169u8, 130u8, 71u8, 161u8, 21u8, 32u8, 63u8, ], ) } @@ -8194,9 +8158,9 @@ pub mod api { "force_batch", types::ForceBatch { calls }, [ - 13u8, 145u8, 1u8, 24u8, 146u8, 209u8, 200u8, 218u8, 24u8, 166u8, 190u8, - 203u8, 29u8, 162u8, 219u8, 181u8, 35u8, 237u8, 96u8, 196u8, 199u8, - 85u8, 173u8, 24u8, 184u8, 12u8, 148u8, 51u8, 14u8, 105u8, 131u8, 132u8, + 192u8, 220u8, 30u8, 205u8, 109u8, 252u8, 9u8, 10u8, 4u8, 11u8, 39u8, + 93u8, 83u8, 157u8, 223u8, 68u8, 132u8, 9u8, 203u8, 158u8, 114u8, 64u8, + 238u8, 241u8, 48u8, 254u8, 246u8, 152u8, 43u8, 99u8, 30u8, 67u8, ], ) } @@ -8219,10 +8183,9 @@ pub mod api { weight, }, [ - 111u8, 148u8, 45u8, 217u8, 132u8, 185u8, 150u8, 232u8, 91u8, 77u8, - 142u8, 98u8, 175u8, 13u8, 252u8, 220u8, 199u8, 177u8, 171u8, 155u8, - 84u8, 242u8, 40u8, 132u8, 77u8, 201u8, 7u8, 25u8, 102u8, 169u8, 235u8, - 6u8, + 251u8, 120u8, 183u8, 92u8, 139u8, 200u8, 63u8, 201u8, 130u8, 145u8, + 125u8, 95u8, 17u8, 214u8, 57u8, 49u8, 199u8, 175u8, 155u8, 214u8, 64u8, + 61u8, 40u8, 245u8, 169u8, 110u8, 218u8, 80u8, 82u8, 68u8, 10u8, 212u8, ], ) } @@ -8262,9 +8225,9 @@ pub mod api { fallback: ::subxt::ext::subxt_core::alloc::boxed::Box::new(fallback), }, [ - 130u8, 245u8, 121u8, 31u8, 205u8, 1u8, 6u8, 43u8, 62u8, 146u8, 200u8, - 61u8, 223u8, 162u8, 42u8, 243u8, 202u8, 252u8, 66u8, 155u8, 227u8, - 70u8, 211u8, 133u8, 15u8, 65u8, 72u8, 47u8, 175u8, 127u8, 80u8, 88u8, + 42u8, 41u8, 254u8, 182u8, 132u8, 227u8, 59u8, 189u8, 21u8, 114u8, 86u8, + 54u8, 222u8, 2u8, 30u8, 39u8, 126u8, 189u8, 182u8, 196u8, 43u8, 144u8, + 82u8, 142u8, 193u8, 130u8, 12u8, 176u8, 130u8, 8u8, 224u8, 66u8, ], ) } @@ -8287,9 +8250,9 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 169u8, 9u8, 148u8, 133u8, 139u8, 233u8, 123u8, 12u8, 26u8, 40u8, 84u8, - 195u8, 239u8, 201u8, 104u8, 122u8, 9u8, 46u8, 249u8, 206u8, 220u8, - 186u8, 225u8, 142u8, 158u8, 10u8, 204u8, 24u8, 30u8, 246u8, 88u8, 15u8, + 75u8, 215u8, 72u8, 28u8, 158u8, 75u8, 120u8, 123u8, 163u8, 231u8, + 230u8, 11u8, 125u8, 11u8, 40u8, 218u8, 78u8, 60u8, 240u8, 31u8, 159u8, + 16u8, 135u8, 56u8, 244u8, 178u8, 72u8, 63u8, 14u8, 23u8, 193u8, 52u8, ], ) } @@ -8771,9 +8734,9 @@ pub mod api { enactment_moment, }, [ - 30u8, 232u8, 132u8, 0u8, 199u8, 166u8, 49u8, 94u8, 238u8, 61u8, 236u8, - 207u8, 2u8, 136u8, 37u8, 81u8, 67u8, 133u8, 2u8, 147u8, 177u8, 176u8, - 178u8, 113u8, 155u8, 180u8, 104u8, 176u8, 215u8, 255u8, 240u8, 100u8, + 0u8, 18u8, 14u8, 253u8, 33u8, 212u8, 33u8, 173u8, 241u8, 29u8, 88u8, + 160u8, 111u8, 21u8, 6u8, 234u8, 249u8, 230u8, 222u8, 119u8, 161u8, + 114u8, 43u8, 126u8, 164u8, 140u8, 199u8, 39u8, 2u8, 64u8, 132u8, 34u8, ], ) } @@ -9416,9 +9379,10 @@ pub mod api { "ReferendumInfoFor", (), [ - 141u8, 184u8, 126u8, 61u8, 215u8, 190u8, 148u8, 93u8, 186u8, 72u8, - 110u8, 37u8, 82u8, 237u8, 65u8, 197u8, 69u8, 83u8, 173u8, 114u8, 117u8, - 72u8, 146u8, 28u8, 235u8, 60u8, 188u8, 247u8, 80u8, 240u8, 16u8, 194u8, + 6u8, 83u8, 1u8, 153u8, 41u8, 128u8, 169u8, 32u8, 101u8, 55u8, 230u8, + 219u8, 157u8, 37u8, 148u8, 156u8, 183u8, 164u8, 133u8, 238u8, 54u8, + 243u8, 158u8, 246u8, 58u8, 235u8, 6u8, 127u8, 29u8, 163u8, 255u8, + 157u8, ], ) } @@ -9440,9 +9404,10 @@ pub mod api { "ReferendumInfoFor", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 141u8, 184u8, 126u8, 61u8, 215u8, 190u8, 148u8, 93u8, 186u8, 72u8, - 110u8, 37u8, 82u8, 237u8, 65u8, 197u8, 69u8, 83u8, 173u8, 114u8, 117u8, - 72u8, 146u8, 28u8, 235u8, 60u8, 188u8, 247u8, 80u8, 240u8, 16u8, 194u8, + 6u8, 83u8, 1u8, 153u8, 41u8, 128u8, 169u8, 32u8, 101u8, 55u8, 230u8, + 219u8, 157u8, 37u8, 148u8, 156u8, 183u8, 164u8, 133u8, 238u8, 54u8, + 243u8, 158u8, 246u8, 58u8, 235u8, 6u8, 127u8, 29u8, 163u8, 255u8, + 157u8, ], ) } @@ -12838,9 +12803,9 @@ pub mod api { enactment_moment, }, [ - 30u8, 232u8, 132u8, 0u8, 199u8, 166u8, 49u8, 94u8, 238u8, 61u8, 236u8, - 207u8, 2u8, 136u8, 37u8, 81u8, 67u8, 133u8, 2u8, 147u8, 177u8, 176u8, - 178u8, 113u8, 155u8, 180u8, 104u8, 176u8, 215u8, 255u8, 240u8, 100u8, + 0u8, 18u8, 14u8, 253u8, 33u8, 212u8, 33u8, 173u8, 241u8, 29u8, 88u8, + 160u8, 111u8, 21u8, 6u8, 234u8, 249u8, 230u8, 222u8, 119u8, 161u8, + 114u8, 43u8, 126u8, 164u8, 140u8, 199u8, 39u8, 2u8, 64u8, 132u8, 34u8, ], ) } @@ -13475,9 +13440,9 @@ pub mod api { "ReferendumInfoFor", (), [ - 12u8, 160u8, 226u8, 48u8, 96u8, 127u8, 60u8, 27u8, 37u8, 158u8, 31u8, - 162u8, 106u8, 183u8, 90u8, 169u8, 244u8, 35u8, 25u8, 121u8, 84u8, - 120u8, 20u8, 206u8, 137u8, 42u8, 139u8, 47u8, 62u8, 73u8, 157u8, 182u8, + 242u8, 125u8, 226u8, 99u8, 67u8, 226u8, 43u8, 159u8, 222u8, 238u8, + 72u8, 38u8, 45u8, 26u8, 95u8, 64u8, 141u8, 140u8, 37u8, 44u8, 101u8, + 67u8, 46u8, 66u8, 45u8, 93u8, 41u8, 156u8, 63u8, 59u8, 9u8, 29u8, ], ) } @@ -13499,9 +13464,9 @@ pub mod api { "ReferendumInfoFor", ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), [ - 12u8, 160u8, 226u8, 48u8, 96u8, 127u8, 60u8, 27u8, 37u8, 158u8, 31u8, - 162u8, 106u8, 183u8, 90u8, 169u8, 244u8, 35u8, 25u8, 121u8, 84u8, - 120u8, 20u8, 206u8, 137u8, 42u8, 139u8, 47u8, 62u8, 73u8, 157u8, 182u8, + 242u8, 125u8, 226u8, 99u8, 67u8, 226u8, 43u8, 159u8, 222u8, 238u8, + 72u8, 38u8, 45u8, 26u8, 95u8, 64u8, 141u8, 140u8, 37u8, 44u8, 101u8, + 67u8, 46u8, 66u8, 45u8, 93u8, 41u8, 156u8, 63u8, 59u8, 9u8, 29u8, ], ) } @@ -13769,7 +13734,7 @@ pub mod api { } pub mod treasury_pallet { use super::{root_mod, runtime_types}; - #[doc = "Error for the treasury pallet."] + #[doc = "The `Error` enum of this pallet."] pub type Error = runtime_types::pallet_treasury::pallet::Error; #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] pub type Call = runtime_types::pallet_treasury::pallet::Call; @@ -13789,224 +13754,17 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] - #[doc = ""] - #[doc = "### Details"] - #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] - #[doc = "beneficiary."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The destination account for the transfer."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::SpendApproved`] if successful."] - pub struct SpendLocal { - #[codec(compact)] - pub amount: spend_local::Amount, - pub beneficiary: spend_local::Beneficiary, - } - pub mod spend_local { - use super::runtime_types; - pub type Amount = ::core::primitive::u128; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SpendLocal { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "spend_local"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Force a previously approved proposal to be removed from the approval queue."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "The original deposit will no longer be returned."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `proposal_id`: The index of a proposal"] - #[doc = ""] - #[doc = "### Complexity"] - #[doc = "- O(A) where `A` is the number of approvals"] - #[doc = ""] - #[doc = "### Errors"] - #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] - #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] - #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] - #[doc = " in the first place."] - pub struct RemoveApproval { - #[codec(compact)] - pub proposal_id: remove_approval::ProposalId, - } - pub mod remove_approval { - use super::runtime_types; - pub type ProposalId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for RemoveApproval { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "remove_approval"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] - #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] - #[doc = "for assertion using the [`Config::BalanceConverter`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] - #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] - #[doc = "the [`Config::PayoutPeriod`]."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The beneficiary of the spend."] - #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] - #[doc = " the past if the resulting spend has not yet expired according to the"] - #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] - #[doc = " approval."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] - pub struct Spend { - pub asset_kind: ::subxt::ext::subxt_core::alloc::boxed::Box, - #[codec(compact)] - pub amount: spend::Amount, - pub beneficiary: - ::subxt::ext::subxt_core::alloc::boxed::Box, - pub valid_from: spend::ValidFrom, - } - pub mod spend { - use super::runtime_types; - pub type AssetKind = (); - pub type Amount = ::core::primitive::u128; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >; - pub type ValidFrom = ::core::option::Option<::core::primitive::u32>; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Spend { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "spend"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Claim a spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed"] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] - #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] - #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] - #[doc = "dispatchable before retrying with the current function."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::Paid`] if successful."] - pub struct Payout { - pub index: payout::Index, - } - pub mod payout { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for Payout { - const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "payout"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - #[doc = "Check the status of the spend and remove it from the storage if processed."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "The status check is a prerequisite for retrying a failed payout."] - #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] - #[doc = "function. In such instances, transaction fees are refunded."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] - #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] - pub struct CheckStatus { - pub index: check_status::Index, + #[doc = "Set the treasury account. Root only."] + pub struct SetTreasuryAccount { + pub account: set_treasury_account::Account, } - pub mod check_status { + pub mod set_treasury_account { use super::runtime_types; - pub type Index = ::core::primitive::u32; + pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for CheckStatus { + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetTreasuryAccount { const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "check_status"; + const CALL: &'static str = "set_treasury_account"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14019,256 +13777,54 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Void previously approved spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "A spend void is only possible if the payout has not been attempted yet."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] - pub struct VoidSpend { - pub index: void_spend::Index, + #[doc = "Set the treasury portion (0-100). Root only."] + pub struct SetTreasuryPortion { + pub portion: set_treasury_portion::Portion, } - pub mod void_spend { + pub mod set_treasury_portion { use super::runtime_types; - pub type Index = ::core::primitive::u32; + pub type Portion = ::core::primitive::u8; } - impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for VoidSpend { + impl ::subxt::ext::subxt_core::blocks::StaticExtrinsic for SetTreasuryPortion { const PALLET: &'static str = "TreasuryPallet"; - const CALL: &'static str = "void_spend"; + const CALL: &'static str = "set_treasury_portion"; } } pub struct TransactionApi; impl TransactionApi { - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] - #[doc = ""] - #[doc = "### Details"] - #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] - #[doc = "beneficiary."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The destination account for the transfer."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::SpendApproved`] if successful."] - pub fn spend_local( - &self, - amount: types::spend_local::Amount, - beneficiary: types::spend_local::Beneficiary, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "spend_local", - types::SpendLocal { amount, beneficiary }, - [ - 137u8, 171u8, 83u8, 247u8, 245u8, 212u8, 152u8, 127u8, 210u8, 71u8, - 254u8, 134u8, 189u8, 26u8, 249u8, 41u8, 214u8, 175u8, 24u8, 64u8, 33u8, - 90u8, 23u8, 134u8, 44u8, 110u8, 63u8, 46u8, 46u8, 146u8, 222u8, 79u8, - ], - ) - } - #[doc = "Force a previously approved proposal to be removed from the approval queue."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "The original deposit will no longer be returned."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `proposal_id`: The index of a proposal"] - #[doc = ""] - #[doc = "### Complexity"] - #[doc = "- O(A) where `A` is the number of approvals"] - #[doc = ""] - #[doc = "### Errors"] - #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] - #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] - #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] - #[doc = " in the first place."] - pub fn remove_approval( + #[doc = "Set the treasury account. Root only."] + pub fn set_treasury_account( &self, - proposal_id: types::remove_approval::ProposalId, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + account: types::set_treasury_account::Account, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( "TreasuryPallet", - "remove_approval", - types::RemoveApproval { proposal_id }, - [ - 180u8, 20u8, 39u8, 227u8, 29u8, 228u8, 234u8, 36u8, 155u8, 114u8, - 197u8, 135u8, 185u8, 31u8, 56u8, 247u8, 224u8, 168u8, 254u8, 233u8, - 250u8, 134u8, 186u8, 155u8, 108u8, 84u8, 94u8, 226u8, 207u8, 130u8, - 196u8, 100u8, - ], - ) - } - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] - #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] - #[doc = "for assertion using the [`Config::BalanceConverter`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] - #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] - #[doc = "the [`Config::PayoutPeriod`]."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The beneficiary of the spend."] - #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] - #[doc = " the past if the resulting spend has not yet expired according to the"] - #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] - #[doc = " approval."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] - pub fn spend( - &self, - asset_kind: types::spend::AssetKind, - amount: types::spend::Amount, - beneficiary: types::spend::Beneficiary, - valid_from: types::spend::ValidFrom, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "spend", - types::Spend { - asset_kind: ::subxt::ext::subxt_core::alloc::boxed::Box::new( - asset_kind, - ), - amount, - beneficiary: ::subxt::ext::subxt_core::alloc::boxed::Box::new( - beneficiary, - ), - valid_from, - }, - [ - 64u8, 121u8, 249u8, 219u8, 22u8, 188u8, 167u8, 85u8, 45u8, 27u8, 200u8, - 219u8, 138u8, 17u8, 230u8, 106u8, 145u8, 39u8, 43u8, 161u8, 69u8, 10u8, - 202u8, 251u8, 127u8, 131u8, 0u8, 194u8, 25u8, 153u8, 169u8, 206u8, - ], - ) - } - #[doc = "Claim a spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed"] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] - #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] - #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] - #[doc = "dispatchable before retrying with the current function."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::Paid`] if successful."] - pub fn payout( - &self, - index: types::payout::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "payout", - types::Payout { index }, - [ - 179u8, 254u8, 82u8, 94u8, 248u8, 26u8, 6u8, 34u8, 93u8, 244u8, 186u8, - 199u8, 163u8, 32u8, 110u8, 220u8, 78u8, 11u8, 168u8, 182u8, 169u8, - 56u8, 53u8, 194u8, 168u8, 218u8, 131u8, 38u8, 46u8, 156u8, 93u8, 234u8, - ], - ) - } - #[doc = "Check the status of the spend and remove it from the storage if processed."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "The status check is a prerequisite for retrying a failed payout."] - #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] - #[doc = "function. In such instances, transaction fees are refunded."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] - #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] - pub fn check_status( - &self, - index: types::check_status::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { - ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( - "TreasuryPallet", - "check_status", - types::CheckStatus { index }, + "set_treasury_account", + types::SetTreasuryAccount { account }, [ - 164u8, 111u8, 10u8, 11u8, 104u8, 237u8, 112u8, 240u8, 104u8, 130u8, - 179u8, 221u8, 54u8, 18u8, 8u8, 172u8, 148u8, 245u8, 110u8, 174u8, 75u8, - 38u8, 46u8, 143u8, 101u8, 232u8, 65u8, 252u8, 36u8, 152u8, 29u8, 209u8, + 221u8, 22u8, 186u8, 39u8, 76u8, 65u8, 143u8, 149u8, 126u8, 244u8, + 227u8, 129u8, 16u8, 183u8, 56u8, 248u8, 82u8, 131u8, 255u8, 246u8, + 243u8, 145u8, 255u8, 5u8, 125u8, 142u8, 201u8, 38u8, 185u8, 124u8, + 76u8, 167u8, ], ) } - #[doc = "Void previously approved spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "A spend void is only possible if the payout has not been attempted yet."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] - pub fn void_spend( + #[doc = "Set the treasury portion (0-100). Root only."] + pub fn set_treasury_portion( &self, - index: types::void_spend::Index, - ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload { + portion: types::set_treasury_portion::Portion, + ) -> ::subxt::ext::subxt_core::tx::payload::StaticPayload + { ::subxt::ext::subxt_core::tx::payload::StaticPayload::new_static( "TreasuryPallet", - "void_spend", - types::VoidSpend { index }, + "set_treasury_portion", + types::SetTreasuryPortion { portion }, [ - 9u8, 212u8, 174u8, 92u8, 43u8, 102u8, 224u8, 124u8, 247u8, 239u8, - 196u8, 68u8, 132u8, 171u8, 116u8, 206u8, 52u8, 23u8, 92u8, 31u8, 156u8, - 160u8, 25u8, 16u8, 125u8, 60u8, 9u8, 109u8, 145u8, 139u8, 102u8, 224u8, + 233u8, 84u8, 25u8, 145u8, 26u8, 255u8, 146u8, 109u8, 128u8, 122u8, + 219u8, 78u8, 209u8, 193u8, 255u8, 120u8, 59u8, 121u8, 225u8, 15u8, + 12u8, 203u8, 250u8, 6u8, 174u8, 6u8, 221u8, 153u8, 35u8, 240u8, 88u8, + 204u8, ], ) } @@ -14285,17 +13841,16 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "We have ended a spend period and will now allocate funds."] - pub struct Spending { - pub budget_remaining: spending::BudgetRemaining, + pub struct TreasuryAccountUpdated { + pub new_account: treasury_account_updated::NewAccount, } - pub mod spending { + pub mod treasury_account_updated { use super::runtime_types; - pub type BudgetRemaining = ::core::primitive::u128; + pub type NewAccount = ::subxt::ext::subxt_core::utils::AccountId32; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Spending { + impl ::subxt::ext::subxt_core::events::StaticEvent for TreasuryAccountUpdated { const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Spending"; + const EVENT: &'static str = "TreasuryAccountUpdated"; } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -14304,614 +13859,79 @@ pub mod api { )] #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some funds have been allocated."] - pub struct Awarded { - pub proposal_index: awarded::ProposalIndex, - pub award: awarded::Award, - pub account: awarded::Account, + pub struct TreasuryPortionUpdated { + pub new_portion: treasury_portion_updated::NewPortion, } - pub mod awarded { + pub mod treasury_portion_updated { use super::runtime_types; - pub type ProposalIndex = ::core::primitive::u32; - pub type Award = ::core::primitive::u128; - pub type Account = ::subxt::ext::subxt_core::utils::AccountId32; + pub type NewPortion = ::core::primitive::u8; } - impl ::subxt::ext::subxt_core::events::StaticEvent for Awarded { + impl ::subxt::ext::subxt_core::events::StaticEvent for TreasuryPortionUpdated { const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Awarded"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some of our funds have been burnt."] - pub struct Burnt { - pub burnt_funds: burnt::BurntFunds, + const EVENT: &'static str = "TreasuryPortionUpdated"; } - pub mod burnt { + } + pub mod storage { + use super::runtime_types; + pub mod types { use super::runtime_types; - pub type BurntFunds = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Burnt { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Burnt"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Spending has finished; this is the amount that rolls over until next spend."] - pub struct Rollover { - pub rollover_balance: rollover::RolloverBalance, - } - pub mod rollover { - use super::runtime_types; - pub type RolloverBalance = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Rollover { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Rollover"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "Some funds have been deposited."] - pub struct Deposit { - pub value: deposit::Value, - } - pub mod deposit { - use super::runtime_types; - pub type Value = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Deposit { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Deposit"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A new spend proposal has been approved."] - pub struct SpendApproved { - pub proposal_index: spend_approved::ProposalIndex, - pub amount: spend_approved::Amount, - pub beneficiary: spend_approved::Beneficiary, - } - pub mod spend_approved { - use super::runtime_types; - pub type ProposalIndex = ::core::primitive::u32; - pub type Amount = ::core::primitive::u128; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::AccountId32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for SpendApproved { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "SpendApproved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "The inactive funds of the pallet have been updated."] - pub struct UpdatedInactive { - pub reactivated: updated_inactive::Reactivated, - pub deactivated: updated_inactive::Deactivated, - } - pub mod updated_inactive { - use super::runtime_types; - pub type Reactivated = ::core::primitive::u128; - pub type Deactivated = ::core::primitive::u128; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for UpdatedInactive { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "UpdatedInactive"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A new asset spend proposal has been approved."] - pub struct AssetSpendApproved { - pub index: asset_spend_approved::Index, - pub asset_kind: asset_spend_approved::AssetKind, - pub amount: asset_spend_approved::Amount, - pub beneficiary: asset_spend_approved::Beneficiary, - pub valid_from: asset_spend_approved::ValidFrom, - pub expire_at: asset_spend_approved::ExpireAt, - } - pub mod asset_spend_approved { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type AssetKind = (); - pub type Amount = ::core::primitive::u128; - pub type Beneficiary = ::subxt::ext::subxt_core::utils::AccountId32; - pub type ValidFrom = ::core::primitive::u32; - pub type ExpireAt = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for AssetSpendApproved { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "AssetSpendApproved"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "An approved spend was voided."] - pub struct AssetSpendVoided { - pub index: asset_spend_voided::Index, - } - pub mod asset_spend_voided { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for AssetSpendVoided { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "AssetSpendVoided"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A payment happened."] - pub struct Paid { - pub index: paid::Index, - pub payment_id: paid::PaymentId, - } - pub mod paid { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type PaymentId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for Paid { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "Paid"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A payment failed and can be retried."] - pub struct PaymentFailed { - pub index: payment_failed::Index, - pub payment_id: payment_failed::PaymentId, - } - pub mod payment_failed { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - pub type PaymentId = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for PaymentFailed { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "PaymentFailed"; - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - #[doc = "A spend was processed and removed from the storage. It might have been successfully"] - #[doc = "paid or it may have expired."] - pub struct SpendProcessed { - pub index: spend_processed::Index, - } - pub mod spend_processed { - use super::runtime_types; - pub type Index = ::core::primitive::u32; - } - impl ::subxt::ext::subxt_core::events::StaticEvent for SpendProcessed { - const PALLET: &'static str = "TreasuryPallet"; - const EVENT: &'static str = "SpendProcessed"; - } - } - pub mod storage { - use super::runtime_types; - pub mod types { - use super::runtime_types; - pub mod proposal_count { - use super::runtime_types; - pub type ProposalCount = ::core::primitive::u32; - } - pub mod proposals { - use super::runtime_types; - pub type Proposals = runtime_types::pallet_treasury::Proposal< - ::subxt::ext::subxt_core::utils::AccountId32, - ::core::primitive::u128, - >; - pub type Param0 = ::core::primitive::u32; - } - pub mod deactivated { - use super::runtime_types; - pub type Deactivated = ::core::primitive::u128; - } - pub mod approvals { - use super::runtime_types; - pub type Approvals = - runtime_types::bounded_collections::bounded_vec::BoundedVec< - ::core::primitive::u32, - >; - } - pub mod spend_count { - use super::runtime_types; - pub type SpendCount = ::core::primitive::u32; - } - pub mod spends { - use super::runtime_types; - pub type Spends = runtime_types::pallet_treasury::SpendStatus< - (), - ::core::primitive::u128, - ::subxt::ext::subxt_core::utils::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - >; - pub type Param0 = ::core::primitive::u32; - } - pub mod last_spend_period { - use super::runtime_types; - pub type LastSpendPeriod = ::core::primitive::u32; - } + pub mod treasury_account { + use super::runtime_types; + pub type TreasuryAccount = ::subxt::ext::subxt_core::utils::AccountId32; + } + pub mod treasury_portion { + use super::runtime_types; + pub type TreasuryPortion = ::core::primitive::u8; + } } pub struct StorageApi; impl StorageApi { - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " Number of proposals that have been made."] - pub fn proposal_count( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::proposal_count::ProposalCount, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "ProposalCount", - (), - [ - 91u8, 238u8, 246u8, 106u8, 95u8, 66u8, 83u8, 134u8, 1u8, 225u8, 164u8, - 216u8, 113u8, 101u8, 203u8, 200u8, 113u8, 97u8, 246u8, 228u8, 140u8, - 29u8, 29u8, 48u8, 176u8, 137u8, 93u8, 230u8, 56u8, 75u8, 51u8, 149u8, - ], - ) - } - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " Proposals that have been made."] - pub fn proposals_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::proposals::Proposals, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Proposals", - (), - [ - 207u8, 135u8, 145u8, 146u8, 48u8, 10u8, 252u8, 40u8, 20u8, 115u8, - 205u8, 41u8, 173u8, 83u8, 115u8, 46u8, 106u8, 40u8, 130u8, 157u8, - 213u8, 87u8, 45u8, 23u8, 14u8, 167u8, 99u8, 208u8, 153u8, 163u8, 141u8, - 55u8, - ], - ) - } - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " Proposals that have been made."] - pub fn proposals( - &self, - _0: types::proposals::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::proposals::Param0, - >, - types::proposals::Proposals, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Proposals", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 207u8, 135u8, 145u8, 146u8, 48u8, 10u8, 252u8, 40u8, 20u8, 115u8, - 205u8, 41u8, 173u8, 83u8, 115u8, 46u8, 106u8, 40u8, 130u8, 157u8, - 213u8, 87u8, 45u8, 23u8, 14u8, 167u8, 99u8, 208u8, 153u8, 163u8, 141u8, - 55u8, - ], - ) - } - #[doc = " The amount which has been reported as inactive to Currency."] - pub fn deactivated( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::deactivated::Deactivated, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Deactivated", - (), - [ - 120u8, 221u8, 159u8, 56u8, 161u8, 44u8, 54u8, 233u8, 47u8, 114u8, - 170u8, 150u8, 52u8, 24u8, 137u8, 212u8, 122u8, 247u8, 40u8, 17u8, - 208u8, 130u8, 42u8, 154u8, 33u8, 222u8, 59u8, 116u8, 0u8, 15u8, 79u8, - 123u8, - ], - ) - } - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " Proposal indices that have been approved but not yet awarded."] - pub fn approvals( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::approvals::Approvals, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Approvals", - (), - [ - 78u8, 147u8, 186u8, 235u8, 17u8, 40u8, 247u8, 235u8, 67u8, 222u8, 3u8, - 14u8, 248u8, 17u8, 67u8, 180u8, 93u8, 161u8, 64u8, 35u8, 119u8, 194u8, - 187u8, 226u8, 135u8, 162u8, 147u8, 174u8, 139u8, 72u8, 99u8, 212u8, - ], - ) - } - #[doc = " The count of spends that have been made."] - pub fn spend_count( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::spend_count::SpendCount, - ::subxt::ext::subxt_core::utils::Yes, - ::subxt::ext::subxt_core::utils::Yes, - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "SpendCount", - (), - [ - 220u8, 74u8, 248u8, 52u8, 243u8, 209u8, 42u8, 236u8, 27u8, 98u8, 76u8, - 153u8, 129u8, 176u8, 34u8, 177u8, 33u8, 132u8, 21u8, 71u8, 206u8, - 146u8, 222u8, 44u8, 232u8, 246u8, 205u8, 92u8, 240u8, 136u8, 182u8, - 30u8, - ], - ) - } - #[doc = " Spends that have been approved and being processed."] - pub fn spends_iter( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::spends::Spends, - (), - (), - ::subxt::ext::subxt_core::utils::Yes, - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Spends", - (), - [ - 140u8, 4u8, 241u8, 80u8, 4u8, 219u8, 107u8, 152u8, 206u8, 175u8, 107u8, - 172u8, 208u8, 71u8, 174u8, 99u8, 198u8, 52u8, 142u8, 126u8, 145u8, - 171u8, 254u8, 9u8, 235u8, 158u8, 186u8, 101u8, 140u8, 200u8, 96u8, - 168u8, - ], - ) - } - #[doc = " Spends that have been approved and being processed."] - pub fn spends( - &self, - _0: types::spends::Param0, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - ::subxt::ext::subxt_core::storage::address::StaticStorageKey< - types::spends::Param0, - >, - types::spends::Spends, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "Spends", - ::subxt::ext::subxt_core::storage::address::StaticStorageKey::new(_0), - [ - 140u8, 4u8, 241u8, 80u8, 4u8, 219u8, 107u8, 152u8, 206u8, 175u8, 107u8, - 172u8, 208u8, 71u8, 174u8, 99u8, 198u8, 52u8, 142u8, 126u8, 145u8, - 171u8, 254u8, 9u8, 235u8, 158u8, 186u8, 101u8, 140u8, 200u8, 96u8, - 168u8, - ], - ) - } - #[doc = " The blocknumber for the last triggered spend period."] - pub fn last_spend_period( - &self, - ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< - (), - types::last_spend_period::LastSpendPeriod, - ::subxt::ext::subxt_core::utils::Yes, - (), - (), - > { - ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( - "TreasuryPallet", - "LastSpendPeriod", - (), - [ - 6u8, 200u8, 107u8, 132u8, 60u8, 31u8, 24u8, 196u8, 108u8, 227u8, 5u8, - 63u8, 249u8, 139u8, 82u8, 140u8, 169u8, 242u8, 118u8, 93u8, 83u8, - 155u8, 120u8, 175u8, 224u8, 227u8, 39u8, 39u8, 255u8, 247u8, 79u8, - 30u8, - ], - ) - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - #[doc = " Period between successive spends."] - pub fn spend_period( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "SpendPeriod", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] - pub fn burn( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::sp_arithmetic::per_things::Permill, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "Burn", - [ - 65u8, 93u8, 120u8, 165u8, 204u8, 81u8, 159u8, 163u8, 93u8, 135u8, - 114u8, 121u8, 147u8, 35u8, 215u8, 213u8, 4u8, 223u8, 83u8, 37u8, 225u8, - 200u8, 189u8, 156u8, 140u8, 36u8, 58u8, 46u8, 42u8, 232u8, 155u8, 0u8, - ], - ) - } - #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] - pub fn pallet_id( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - runtime_types::frame_support::PalletId, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "PalletId", - [ - 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, - 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, - 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, - ], - ) - } - #[doc = " DEPRECATED: associated with `spend_local` call and will be removed in May 2025."] - #[doc = " Refer to for migration to `spend`."] - #[doc = ""] - #[doc = " The maximum number of approvals that can wait in the spending queue."] - #[doc = ""] - #[doc = " NOTE: This parameter is also used within the Bounties Pallet extension if enabled."] - pub fn max_approvals( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, - > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( - "TreasuryPallet", - "MaxApprovals", - [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, - ], - ) - } - #[doc = " The period during which an approved treasury spend has to be claimed."] - pub fn payout_period( - &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::core::primitive::u32, + #[doc = " The treasury account that receives mining rewards."] + pub fn treasury_account( + &self, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::treasury_account::TreasuryAccount, + ::subxt::ext::subxt_core::utils::Yes, + (), + (), > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( "TreasuryPallet", - "PayoutPeriod", + "TreasuryAccount", + (), [ - 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, - 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, - 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, - 145u8, + 25u8, 40u8, 39u8, 114u8, 80u8, 247u8, 49u8, 5u8, 9u8, 118u8, 249u8, + 36u8, 77u8, 73u8, 229u8, 167u8, 107u8, 254u8, 175u8, 199u8, 203u8, + 238u8, 166u8, 158u8, 155u8, 209u8, 155u8, 219u8, 191u8, 204u8, 237u8, + 227u8, ], ) } - #[doc = " Gets this pallet's derived pot account."] - pub fn pot_account( + #[doc = " The portion of mining rewards that goes to treasury (0-100)."] + pub fn treasury_portion( &self, - ) -> ::subxt::ext::subxt_core::constants::address::StaticAddress< - ::subxt::ext::subxt_core::utils::AccountId32, + ) -> ::subxt::ext::subxt_core::storage::address::StaticAddress< + (), + types::treasury_portion::TreasuryPortion, + ::subxt::ext::subxt_core::utils::Yes, + ::subxt::ext::subxt_core::utils::Yes, + (), > { - ::subxt::ext::subxt_core::constants::address::StaticAddress::new_static( + ::subxt::ext::subxt_core::storage::address::StaticAddress::new_static( "TreasuryPallet", - "pot_account", + "TreasuryPortion", + (), [ - 115u8, 233u8, 13u8, 223u8, 88u8, 20u8, 202u8, 139u8, 153u8, 28u8, - 155u8, 157u8, 224u8, 66u8, 3u8, 250u8, 23u8, 53u8, 88u8, 168u8, 211u8, - 204u8, 122u8, 166u8, 248u8, 23u8, 174u8, 225u8, 99u8, 108u8, 89u8, - 135u8, + 102u8, 185u8, 214u8, 4u8, 191u8, 165u8, 131u8, 24u8, 160u8, 179u8, + 59u8, 196u8, 73u8, 169u8, 17u8, 104u8, 66u8, 3u8, 202u8, 255u8, 195u8, + 96u8, 65u8, 22u8, 145u8, 163u8, 6u8, 44u8, 47u8, 11u8, 42u8, 0u8, ], ) } } } } - pub mod origins { - use super::{root_mod, runtime_types}; - } pub mod recovery { use super::{root_mod, runtime_types}; #[doc = "The `Error` enum of this pallet."] @@ -15321,10 +14341,9 @@ pub mod api { call: ::subxt::ext::subxt_core::alloc::boxed::Box::new(call), }, [ - 125u8, 10u8, 181u8, 50u8, 177u8, 114u8, 92u8, 100u8, 221u8, 17u8, 19u8, - 106u8, 84u8, 156u8, 189u8, 217u8, 223u8, 233u8, 245u8, 200u8, 8u8, - 24u8, 21u8, 189u8, 205u8, 170u8, 119u8, 109u8, 156u8, 192u8, 139u8, - 202u8, + 236u8, 116u8, 42u8, 49u8, 236u8, 100u8, 253u8, 181u8, 98u8, 152u8, + 51u8, 82u8, 0u8, 40u8, 214u8, 186u8, 90u8, 117u8, 84u8, 251u8, 163u8, + 107u8, 39u8, 248u8, 22u8, 20u8, 231u8, 105u8, 247u8, 185u8, 37u8, 95u8, ], ) } @@ -27003,157 +26022,12 @@ pub mod api { )] #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] pub enum Call { - #[codec(index = 3)] - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] - #[doc = ""] - #[doc = "### Details"] - #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] - #[doc = "beneficiary."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The destination account for the transfer."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::SpendApproved`] if successful."] - spend_local { - #[codec(compact)] - amount: ::core::primitive::u128, - beneficiary: ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - }, - #[codec(index = 4)] - #[doc = "Force a previously approved proposal to be removed from the approval queue."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "The original deposit will no longer be returned."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `proposal_id`: The index of a proposal"] - #[doc = ""] - #[doc = "### Complexity"] - #[doc = "- O(A) where `A` is the number of approvals"] - #[doc = ""] - #[doc = "### Errors"] - #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] - #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] - #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] - #[doc = " in the first place."] - remove_approval { - #[codec(compact)] - proposal_id: ::core::primitive::u32, - }, - #[codec(index = 5)] - #[doc = "Propose and approve a spend of treasury funds."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] - #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] - #[doc = "for assertion using the [`Config::BalanceConverter`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] - #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] - #[doc = "the [`Config::PayoutPeriod`]."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] - #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] - #[doc = "- `beneficiary`: The beneficiary of the spend."] - #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] - #[doc = " the past if the resulting spend has not yet expired according to the"] - #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] - #[doc = " approval."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] - spend { - asset_kind: ::subxt::ext::subxt_core::alloc::boxed::Box<()>, - #[codec(compact)] - amount: ::core::primitive::u128, - beneficiary: ::subxt::ext::subxt_core::alloc::boxed::Box< - ::subxt::ext::subxt_core::utils::MultiAddress< - ::subxt::ext::subxt_core::utils::AccountId32, - (), - >, - >, - valid_from: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 6)] - #[doc = "Claim a spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed"] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] - #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] - #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] - #[doc = "dispatchable before retrying with the current function."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::Paid`] if successful."] - payout { index: ::core::primitive::u32 }, - #[codec(index = 7)] - #[doc = "Check the status of the spend and remove it from the storage if processed."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be signed."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "The status check is a prerequisite for retrying a failed payout."] - #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] - #[doc = "function. In such instances, transaction fees are refunded."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] - #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] - check_status { index: ::core::primitive::u32 }, - #[codec(index = 8)] - #[doc = "Void previously approved spend."] - #[doc = ""] - #[doc = "## Dispatch Origin"] - #[doc = ""] - #[doc = "Must be [`Config::RejectOrigin`]."] - #[doc = ""] - #[doc = "## Details"] - #[doc = ""] - #[doc = "A spend void is only possible if the payout has not been attempted yet."] - #[doc = ""] - #[doc = "### Parameters"] - #[doc = "- `index`: The spend index."] - #[doc = ""] - #[doc = "## Events"] - #[doc = ""] - #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] - void_spend { index: ::core::primitive::u32 }, + #[codec(index = 0)] + #[doc = "Set the treasury account. Root only."] + set_treasury_account { account: ::subxt::ext::subxt_core::utils::AccountId32 }, + #[codec(index = 1)] + #[doc = "Set the treasury portion (0-100). Root only."] + set_treasury_portion { portion: ::core::primitive::u8 }, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -27166,42 +26040,10 @@ pub mod api { #[encode_as_type( crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" )] - #[doc = "Error for the treasury pallet."] + #[doc = "The `Error` enum of this pallet."] pub enum Error { #[codec(index = 0)] - #[doc = "No proposal, bounty or spend at that index."] - InvalidIndex, - #[codec(index = 1)] - #[doc = "Too many approvals in the queue."] - TooManyApprovals, - #[codec(index = 2)] - #[doc = "The spend origin is valid but the amount it is allowed to spend is lower than the"] - #[doc = "amount to be spent."] - InsufficientPermission, - #[codec(index = 3)] - #[doc = "Proposal has not been approved."] - ProposalNotApproved, - #[codec(index = 4)] - #[doc = "The balance of the asset kind is not convertible to the balance of the native asset."] - FailedToConvertBalance, - #[codec(index = 5)] - #[doc = "The spend has expired and cannot be claimed."] - SpendExpired, - #[codec(index = 6)] - #[doc = "The spend is not yet eligible for payout."] - EarlyPayout, - #[codec(index = 7)] - #[doc = "The payment has already been attempted."] - AlreadyAttempted, - #[codec(index = 8)] - #[doc = "There was some issue with the mechanism of payment."] - PayoutError, - #[codec(index = 9)] - #[doc = "The payout was not yet attempted/claimed."] - NotAttempted, - #[codec(index = 10)] - #[doc = "The payment has neither failed nor succeeded yet."] - Inconclusive, + InvalidPortion, } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, @@ -27217,110 +26059,13 @@ pub mod api { #[doc = "The `Event` enum of this pallet"] pub enum Event { #[codec(index = 0)] - #[doc = "We have ended a spend period and will now allocate funds."] - Spending { budget_remaining: ::core::primitive::u128 }, - #[codec(index = 1)] - #[doc = "Some funds have been allocated."] - Awarded { - proposal_index: ::core::primitive::u32, - award: ::core::primitive::u128, - account: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 2)] - #[doc = "Some of our funds have been burnt."] - Burnt { burnt_funds: ::core::primitive::u128 }, - #[codec(index = 3)] - #[doc = "Spending has finished; this is the amount that rolls over until next spend."] - Rollover { rollover_balance: ::core::primitive::u128 }, - #[codec(index = 4)] - #[doc = "Some funds have been deposited."] - Deposit { value: ::core::primitive::u128 }, - #[codec(index = 5)] - #[doc = "A new spend proposal has been approved."] - SpendApproved { - proposal_index: ::core::primitive::u32, - amount: ::core::primitive::u128, - beneficiary: ::subxt::ext::subxt_core::utils::AccountId32, - }, - #[codec(index = 6)] - #[doc = "The inactive funds of the pallet have been updated."] - UpdatedInactive { - reactivated: ::core::primitive::u128, - deactivated: ::core::primitive::u128, - }, - #[codec(index = 7)] - #[doc = "A new asset spend proposal has been approved."] - AssetSpendApproved { - index: ::core::primitive::u32, - asset_kind: (), - amount: ::core::primitive::u128, - beneficiary: ::subxt::ext::subxt_core::utils::AccountId32, - valid_from: ::core::primitive::u32, - expire_at: ::core::primitive::u32, - }, - #[codec(index = 8)] - #[doc = "An approved spend was voided."] - AssetSpendVoided { index: ::core::primitive::u32 }, - #[codec(index = 9)] - #[doc = "A payment happened."] - Paid { index: ::core::primitive::u32, payment_id: ::core::primitive::u32 }, - #[codec(index = 10)] - #[doc = "A payment failed and can be retried."] - PaymentFailed { - index: ::core::primitive::u32, - payment_id: ::core::primitive::u32, + TreasuryAccountUpdated { + new_account: ::subxt::ext::subxt_core::utils::AccountId32, }, - #[codec(index = 11)] - #[doc = "A spend was processed and removed from the storage. It might have been successfully"] - #[doc = "paid or it may have expired."] - SpendProcessed { index: ::core::primitive::u32 }, + #[codec(index = 1)] + TreasuryPortionUpdated { new_portion: ::core::primitive::u8 }, } } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub enum PaymentState<_0> { - #[codec(index = 0)] - Pending, - #[codec(index = 1)] - Attempted { id: _0 }, - #[codec(index = 2)] - Failed, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct Proposal<_0, _1> { - pub proposer: _0, - pub value: _1, - pub beneficiary: _0, - pub bond: _1, - } - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] - #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] - pub struct SpendStatus<_0, _1, _2, _3, _4> { - pub asset_kind: _0, - pub amount: _1, - pub beneficiary: _2, - pub valid_from: _3, - pub expire_at: _3, - pub status: runtime_types::pallet_treasury::PaymentState<_3>, - #[codec(skip)] - pub __ignore: ::core::marker::PhantomData<_4>, - } } pub mod pallet_utility { use super::runtime_types; @@ -27791,33 +26536,6 @@ pub mod api { pub amount: ::core::primitive::u128, } } - pub mod origins { - use super::runtime_types; - pub mod pallet_custom_origins { - use super::runtime_types; - #[derive( - :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, - :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, - Debug, - )] - #[decode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode" - )] - #[encode_as_type( - crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode" - )] - pub enum Origin { - #[codec(index = 0)] - Treasurer, - #[codec(index = 1)] - SmallSpender, - #[codec(index = 2)] - MediumSpender, - #[codec(index = 3)] - BigSpender, - } - } - } } pub mod transaction_extensions { use super::runtime_types; @@ -27854,7 +26572,13 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum OriginCaller { - # [codec (index = 0)] system (runtime_types :: frame_support :: dispatch :: RawOrigin < :: subxt :: ext :: subxt_core :: utils :: AccountId32 > ,) , # [codec (index = 19)] Origins (runtime_types :: quantus_runtime :: governance :: origins :: pallet_custom_origins :: Origin ,) , } + #[codec(index = 0)] + system( + runtime_types::frame_support::dispatch::RawOrigin< + ::subxt::ext::subxt_core::utils::AccountId32, + >, + ), + } #[derive( :: subxt :: ext :: subxt_core :: ext :: scale_decode :: DecodeAsType, :: subxt :: ext :: subxt_core :: ext :: scale_encode :: EncodeAsType, @@ -27879,31 +26603,31 @@ pub mod api { Balances(runtime_types::pallet_balances::pallet::Call), #[codec(index = 4)] Sudo(runtime_types::pallet_sudo::pallet::Call), - #[codec(index = 9)] + #[codec(index = 7)] Preimage(runtime_types::pallet_preimage::pallet::Call), - #[codec(index = 10)] + #[codec(index = 8)] Scheduler(runtime_types::pallet_scheduler::pallet::Call), - #[codec(index = 11)] + #[codec(index = 9)] Utility(runtime_types::pallet_utility::pallet::Call), - #[codec(index = 12)] + #[codec(index = 10)] Referenda(runtime_types::pallet_referenda::pallet::Call), - #[codec(index = 13)] + #[codec(index = 11)] ReversibleTransfers(runtime_types::pallet_reversible_transfers::pallet::Call), - #[codec(index = 14)] + #[codec(index = 12)] ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Call), - #[codec(index = 15)] + #[codec(index = 13)] TechCollective(runtime_types::pallet_ranked_collective::pallet::Call), - #[codec(index = 16)] + #[codec(index = 14)] TechReferenda(runtime_types::pallet_referenda::pallet::Call), - #[codec(index = 18)] + #[codec(index = 15)] TreasuryPallet(runtime_types::pallet_treasury::pallet::Call), - #[codec(index = 20)] + #[codec(index = 16)] Recovery(runtime_types::pallet_recovery::pallet::Call), - #[codec(index = 21)] + #[codec(index = 17)] Assets(runtime_types::pallet_assets::pallet::Call), - #[codec(index = 23)] + #[codec(index = 19)] Multisig(runtime_types::pallet_multisig::pallet::Call), - #[codec(index = 24)] + #[codec(index = 20)] Wormhole(runtime_types::pallet_wormhole::pallet::Call), } #[derive( @@ -27920,33 +26644,33 @@ pub mod api { Balances(runtime_types::pallet_balances::pallet::Error), #[codec(index = 4)] Sudo(runtime_types::pallet_sudo::pallet::Error), - #[codec(index = 9)] + #[codec(index = 7)] Preimage(runtime_types::pallet_preimage::pallet::Error), - #[codec(index = 10)] + #[codec(index = 8)] Scheduler(runtime_types::pallet_scheduler::pallet::Error), - #[codec(index = 11)] + #[codec(index = 9)] Utility(runtime_types::pallet_utility::pallet::Error), - #[codec(index = 12)] + #[codec(index = 10)] Referenda(runtime_types::pallet_referenda::pallet::Error), - #[codec(index = 13)] + #[codec(index = 11)] ReversibleTransfers(runtime_types::pallet_reversible_transfers::pallet::Error), - #[codec(index = 14)] + #[codec(index = 12)] ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Error), - #[codec(index = 15)] + #[codec(index = 13)] TechCollective(runtime_types::pallet_ranked_collective::pallet::Error), - #[codec(index = 16)] + #[codec(index = 14)] TechReferenda(runtime_types::pallet_referenda::pallet::Error), - #[codec(index = 18)] + #[codec(index = 15)] TreasuryPallet(runtime_types::pallet_treasury::pallet::Error), - #[codec(index = 20)] + #[codec(index = 16)] Recovery(runtime_types::pallet_recovery::pallet::Error), - #[codec(index = 21)] + #[codec(index = 17)] Assets(runtime_types::pallet_assets::pallet::Error), - #[codec(index = 22)] + #[codec(index = 18)] AssetsHolder(runtime_types::pallet_assets_holder::pallet::Error), - #[codec(index = 23)] + #[codec(index = 19)] Multisig(runtime_types::pallet_multisig::pallet::Error), - #[codec(index = 24)] + #[codec(index = 20)] Wormhole(runtime_types::pallet_wormhole::pallet::Error), } #[derive( @@ -27967,35 +26691,35 @@ pub mod api { Sudo(runtime_types::pallet_sudo::pallet::Event), #[codec(index = 5)] QPoW(runtime_types::pallet_qpow::pallet::Event), - #[codec(index = 7)] + #[codec(index = 6)] MiningRewards(runtime_types::pallet_mining_rewards::pallet::Event), - #[codec(index = 9)] + #[codec(index = 7)] Preimage(runtime_types::pallet_preimage::pallet::Event), - #[codec(index = 10)] + #[codec(index = 8)] Scheduler(runtime_types::pallet_scheduler::pallet::Event), - #[codec(index = 11)] + #[codec(index = 9)] Utility(runtime_types::pallet_utility::pallet::Event), - #[codec(index = 12)] + #[codec(index = 10)] Referenda(runtime_types::pallet_referenda::pallet::Event1), - #[codec(index = 13)] + #[codec(index = 11)] ReversibleTransfers(runtime_types::pallet_reversible_transfers::pallet::Event), - #[codec(index = 14)] + #[codec(index = 12)] ConvictionVoting(runtime_types::pallet_conviction_voting::pallet::Event), - #[codec(index = 15)] + #[codec(index = 13)] TechCollective(runtime_types::pallet_ranked_collective::pallet::Event), - #[codec(index = 16)] + #[codec(index = 14)] TechReferenda(runtime_types::pallet_referenda::pallet::Event2), - #[codec(index = 18)] + #[codec(index = 15)] TreasuryPallet(runtime_types::pallet_treasury::pallet::Event), - #[codec(index = 20)] + #[codec(index = 16)] Recovery(runtime_types::pallet_recovery::pallet::Event), - #[codec(index = 21)] + #[codec(index = 17)] Assets(runtime_types::pallet_assets::pallet::Event), - #[codec(index = 22)] + #[codec(index = 18)] AssetsHolder(runtime_types::pallet_assets_holder::pallet::Event), - #[codec(index = 23)] + #[codec(index = 19)] Multisig(runtime_types::pallet_multisig::pallet::Event), - #[codec(index = 24)] + #[codec(index = 20)] Wormhole(runtime_types::pallet_wormhole::pallet::Event), } #[derive( @@ -28014,9 +26738,9 @@ pub mod api { #[decode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_decode")] #[encode_as_type(crate_path = ":: subxt :: ext :: subxt_core :: ext :: scale_encode")] pub enum RuntimeHoldReason { - #[codec(index = 9)] + #[codec(index = 7)] Preimage(runtime_types::pallet_preimage::pallet::HoldReason), - #[codec(index = 13)] + #[codec(index = 11)] ReversibleTransfers(runtime_types::pallet_reversible_transfers::pallet::HoldReason), } } diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 5133ac4..34ce8a7 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -95,7 +95,7 @@ pub enum Commands { #[command(subcommand)] Preimage(preimage::PreimageCommands), - /// Treasury management commands + /// Treasury account info #[command(subcommand)] Treasury(treasury::TreasuryCommands), diff --git a/src/cli/treasury.rs b/src/cli/treasury.rs index e910bea..99b66b6 100644 --- a/src/cli/treasury.rs +++ b/src/cli/treasury.rs @@ -1,605 +1,69 @@ -//! `quantus treasury` subcommand - manage Treasury -use crate::{chain::quantus_subxt, cli::common::submit_transaction, log_print, log_success}; +//! `quantus treasury` subcommand – Treasury account info +//! +//! The chain Treasury is a single account that receives a configurable portion of mining rewards. +//! This command shows the treasury account and its balance. +use crate::{chain::quantus_subxt, cli::address_format::QuantusSS58, log_print}; use clap::Subcommand; use colored::Colorize; -use frame_support::sp_runtime::traits::AccountIdConversion; -/// Treasury management commands +/// Treasury commands #[derive(Subcommand, Debug)] pub enum TreasuryCommands { - /// Check current Treasury balance - Balance, - - /// Get Treasury configuration - Config, - - /// Show Treasury information and how to spend from it + /// Show Treasury account and balance Info, - - /// Submit a Treasury spend proposal via referendum (requires specific track) - /// This creates a referendum that, if approved, will approve a treasury spend - SubmitSpend { - /// Beneficiary address (will receive the funds) - #[arg(long)] - beneficiary: String, - - /// Amount to spend (e.g., "100.0" for 100 QUAN) - #[arg(long)] - amount: String, - - /// Track to use: "small", "medium", "big", or "treasurer" - /// - small: < 100 QUAN (Track 2) - /// - medium: < 1000 QUAN (Track 3) - /// - big: < 10000 QUAN (Track 4) - /// - treasurer: any amount (Track 5) - #[arg(long)] - track: String, - - /// Wallet name to sign the transaction - #[arg(long)] - from: String, - - /// Password for the wallet - #[arg(long)] - password: Option, - - /// Read password from file - #[arg(long)] - password_file: Option, - }, - - /// Payout an approved Treasury spend (anyone can call this) - Payout { - /// Spend index to payout - #[arg(long)] - index: u32, - - /// Wallet name to sign the transaction - #[arg(long)] - from: String, - - /// Password for the wallet - #[arg(long)] - password: Option, - - /// Read password from file - #[arg(long)] - password_file: Option, - }, - - /// Check and cleanup a Treasury spend status - CheckStatus { - /// Spend index to check - #[arg(long)] - index: u32, - - /// Wallet name to sign the transaction - #[arg(long)] - from: String, - - /// Password for the wallet - #[arg(long)] - password: Option, - - /// Read password from file - #[arg(long)] - password_file: Option, - }, - - /// List active Treasury spends - ListSpends, - - /// Directly create a Treasury spend via sudo (root only, for testing) - SpendSudo { - /// Beneficiary address (will receive the funds) - #[arg(long)] - beneficiary: String, - - /// Amount to spend (e.g., "50.0" for 50 QUAN) - #[arg(long)] - amount: String, - - /// Wallet name to sign with (must have sudo) - #[arg(long)] - from: String, - - /// Password for the wallet - #[arg(long)] - password: Option, - - /// Read password from file - #[arg(long)] - password_file: Option, - }, } /// Handle treasury commands pub async fn handle_treasury_command( command: TreasuryCommands, node_url: &str, - execution_mode: crate::cli::common::ExecutionMode, + _execution_mode: crate::cli::common::ExecutionMode, ) -> crate::error::Result<()> { let quantus_client = crate::chain::client::QuantusClient::new(node_url).await?; match command { - TreasuryCommands::Balance => get_treasury_balance(&quantus_client).await, - TreasuryCommands::Config => get_config(&quantus_client).await, - TreasuryCommands::Info => show_treasury_info().await, - TreasuryCommands::SubmitSpend { - beneficiary, - amount, - track, - from, - password, - password_file, - } => - submit_spend_referendum( - &quantus_client, - &beneficiary, - &amount, - &track, - &from, - password, - password_file, - execution_mode, - ) - .await, - TreasuryCommands::Payout { index, from, password, password_file } => - payout_spend(&quantus_client, index, &from, password, password_file, execution_mode) - .await, - TreasuryCommands::CheckStatus { index, from, password, password_file } => - check_spend_status( - &quantus_client, - index, - &from, - password, - password_file, - execution_mode, - ) - .await, - TreasuryCommands::ListSpends => list_spends(&quantus_client).await, - TreasuryCommands::SpendSudo { beneficiary, amount, from, password, password_file } => - spend_sudo( - &quantus_client, - &beneficiary, - &amount, - &from, - password, - password_file, - execution_mode, - ) - .await, + TreasuryCommands::Info => show_treasury_info(&quantus_client).await, } } -/// Get current Treasury balance -async fn get_treasury_balance( +/// Show Treasury account, portion and balance +async fn show_treasury_info( quantus_client: &crate::chain::client::QuantusClient, ) -> crate::error::Result<()> { - log_print!("💰 Treasury Balance"); + log_print!("💰 Treasury"); log_print!(""); - // Get Treasury account ID using the same method as runtime - let treasury_pallet_id = frame_support::PalletId(*b"py/trsry"); - let treasury_account_raw: sp_runtime::AccountId32 = - treasury_pallet_id.into_account_truncating(); - - // Convert to subxt's AccountId32 - let treasury_account = subxt::utils::AccountId32(*treasury_account_raw.as_ref()); - - // Query balance - let addr = quantus_subxt::api::storage().system().account(treasury_account.clone()); - let latest_block_hash = quantus_client.get_latest_block().await?; let storage_at = quantus_client.client().storage().at(latest_block_hash); - let account_info = storage_at.fetch(&addr).await?.ok_or_else(|| { - crate::error::QuantusError::Generic("Treasury account not found".to_string()) + // Treasury account from pallet storage (receives mining rewards) + let treasury_account_addr = quantus_subxt::api::storage().treasury_pallet().treasury_account(); + let treasury_account = storage_at.fetch(&treasury_account_addr).await?.ok_or_else(|| { + crate::error::QuantusError::Generic("Treasury account not set in storage".to_string()) })?; - let free_balance = account_info.data.free; - let reserved_balance = account_info.data.reserved; - - let formatted_free_balance = - crate::cli::send::format_balance_with_symbol(quantus_client, free_balance).await?; - let formatted_reserved_balance = - crate::cli::send::format_balance_with_symbol(quantus_client, reserved_balance).await?; - - log_print!("💰 Free Balance: {}", formatted_free_balance); - log_print!("💰 Reserved: {}", formatted_reserved_balance); - - // Display address in Quantus format (uses default SS58 version 189 set in main.rs) - use crate::cli::address_format::QuantusSS58; - let treasury_address = treasury_account_raw.to_quantus_ss58(); - log_print!("📍 Treasury Account: {}", treasury_address.bright_yellow()); - - Ok(()) -} - -/// Get Treasury configuration -async fn get_config( - quantus_client: &crate::chain::client::QuantusClient, -) -> crate::error::Result<()> { - log_print!("⚙️ Treasury Configuration"); - log_print!(""); - - let constants = quantus_client.client().constants(); - - // Get SpendPeriod - if let Ok(spend_period) = - constants.at(&quantus_subxt::api::constants().treasury_pallet().spend_period()) - { - log_print!("⏰ Spend Period: {} blocks", spend_period.to_string().bright_cyan()); - let hours = spend_period as f64 * 3.0 / 3600.0; // Assuming 3 sec blocks - log_print!(" (~{:.1} hours)", hours); - } - - // Get Burn percentage - if let Ok(burn) = constants.at(&quantus_subxt::api::constants().treasury_pallet().burn()) { - log_print!("🔥 Burn: {:?}", burn); - } - - // Get MaxApprovals - if let Ok(max_approvals) = - constants.at(&quantus_subxt::api::constants().treasury_pallet().max_approvals()) - { - log_print!("📊 Max Approvals: {}", max_approvals.to_string().bright_yellow()); - } - - // Get PayoutPeriod - if let Ok(payout_period) = - constants.at(&quantus_subxt::api::constants().treasury_pallet().payout_period()) - { - log_print!("💸 Payout Period: {} blocks", payout_period.to_string().bright_green()); - let days = payout_period as f64 * 3.0 / 86400.0; // Assuming 3 sec blocks - log_print!(" (~{:.1} days)", days); - } - - Ok(()) -} - -/// Show Treasury information -async fn show_treasury_info() -> crate::error::Result<()> { - log_print!("💰 Treasury Information"); - log_print!(""); - log_print!("The Treasury is a pot of funds collected through:"); - log_print!(" • Transaction fees"); - log_print!(" • Slashing"); - log_print!(" • Other network mechanisms"); - log_print!(""); - log_print!("📋 {} To spend from Treasury:", "HOW TO USE".bright_cyan().bold()); - log_print!(""); - log_print!( - "1. {} Create a spending proposal using Referenda:", - "Treasury Tracks".bright_yellow().bold() - ); - log_print!(" • Track 2: Treasury Small Spender (< certain amount)"); - log_print!(" • Track 3: Treasury Medium Spender"); - log_print!(" • Track 4: Treasury Big Spender"); - log_print!(" • Track 5: Treasury Treasurer (highest amounts)"); - log_print!(""); - log_print!( - "2. {} Submit referendum with Treasury spend call:", - "Example".bright_green().bold() - ); - log_print!( - " quantus referenda submit-remark --message \"Treasury spend: 1000 QUAN to Alice\"" - ); - log_print!(" --from --password "); - log_print!(""); - log_print!(" Note: Use appropriate origin for treasury tracks"); - log_print!(""); - log_print!("3. {} Community votes on the proposal", "Voting".bright_magenta().bold()); - log_print!(""); - log_print!("4. {} If approved, funds are paid automatically", "Execution".bright_blue().bold()); - log_print!(""); - log_print!("💡 {}", "Useful Commands:".bright_cyan().bold()); - log_print!(" quantus treasury balance - Check Treasury balance"); - log_print!(" quantus treasury config - View Treasury configuration"); - log_print!(" quantus referenda config - View available tracks"); - log_print!(""); - - Ok(()) -} - -/// Submit a Treasury spend proposal via referendum -async fn submit_spend_referendum( - quantus_client: &crate::chain::client::QuantusClient, - beneficiary: &str, - amount: &str, - track: &str, - from: &str, - password: Option, - password_file: Option, - execution_mode: crate::cli::common::ExecutionMode, -) -> crate::error::Result<()> { - use qp_poseidon::PoseidonHasher; - use sp_core::crypto::{AccountId32 as SpAccountId32, Ss58Codec}; - use subxt::tx::Payload; - - log_print!("💰 Submitting Treasury Spend Referendum"); - log_print!(" 📍 Beneficiary: {}", beneficiary.bright_yellow()); - log_print!(" 💵 Amount: {}", amount.bright_green()); - log_print!(" 🛤️ Track: {}", track.bright_cyan()); - - // Parse amount - let amount_value = crate::cli::send::parse_amount(quantus_client, amount).await?; - - // Parse beneficiary address - let beneficiary_resolved = crate::cli::common::resolve_address(beneficiary)?; - let (beneficiary_sp, _) = SpAccountId32::from_ss58check_with_version(&beneficiary_resolved) - .map_err(|e| { - crate::error::QuantusError::Generic(format!( - "Invalid beneficiary address '{beneficiary}': {e:?}" - )) - })?; - let bytes: [u8; 32] = *beneficiary_sp.as_ref(); - let beneficiary_account = subxt::utils::AccountId32::from(bytes); - - // Create the treasury spend call using the transaction API - let beneficiary_multi = subxt::utils::MultiAddress::Id(beneficiary_account.clone()); - - let treasury_spend_call = - quantus_subxt::api::tx() - .treasury_pallet() - .spend((), amount_value, beneficiary_multi, None); - - // Encode call_data - let encoded_call = treasury_spend_call - .encode_call_data(&quantus_client.client().metadata()) - .map_err(|e| { - crate::error::QuantusError::Generic(format!("Failed to encode call: {:?}", e)) - })?; - - log_print!("📝 Creating preimage..."); - - // Load wallet keypair - let keypair = - crate::wallet::load_keypair_from_wallet(from, password.clone(), password_file.clone())?; - - // Calculate preimage hash using Poseidon (runtime uses PoseidonHasher) - let preimage_hash: sp_core::H256 = - ::hash(&encoded_call); - - log_print!("🔗 Preimage hash: {:?}", preimage_hash); - - // Submit preimage - let preimage_call = quantus_subxt::api::tx().preimage().note_preimage(encoded_call.clone()); - let preimage_tx_hash = - submit_transaction(quantus_client, &keypair, preimage_call, None, execution_mode).await?; - - log_print!("✅ Preimage created {:?}", preimage_tx_hash); - - // Determine the origin based on track - let origin_caller = match track.to_lowercase().as_str() { - "small" => quantus_subxt::api::runtime_types::quantus_runtime::OriginCaller::Origins( - quantus_subxt::api::runtime_types::quantus_runtime::governance::origins::pallet_custom_origins::Origin::SmallSpender, - ), - "medium" => quantus_subxt::api::runtime_types::quantus_runtime::OriginCaller::Origins( - quantus_subxt::api::runtime_types::quantus_runtime::governance::origins::pallet_custom_origins::Origin::MediumSpender, - ), - "big" => quantus_subxt::api::runtime_types::quantus_runtime::OriginCaller::Origins( - quantus_subxt::api::runtime_types::quantus_runtime::governance::origins::pallet_custom_origins::Origin::BigSpender, - ), - "treasurer" => quantus_subxt::api::runtime_types::quantus_runtime::OriginCaller::Origins( - quantus_subxt::api::runtime_types::quantus_runtime::governance::origins::pallet_custom_origins::Origin::Treasurer, - ), - _ => { - return Err(crate::error::QuantusError::Generic(format!( - "Invalid track: {}. Must be 'small', 'medium', 'big', or 'treasurer'", - track - ))) - }, - }; - - // Create the bounded proposal - let proposal = - quantus_subxt::api::runtime_types::frame_support::traits::preimages::Bounded::Lookup { - hash: preimage_hash, - len: encoded_call.len() as u32, - }; - - log_print!("📜 Submitting referendum..."); - - // Submit referendum with DispatchTime::After - let enactment = - quantus_subxt::api::runtime_types::frame_support::traits::schedule::DispatchTime::After( - 1u32, - ); - let submit_call = - quantus_subxt::api::tx().referenda().submit(origin_caller, proposal, enactment); - let submit_tx_hash = - submit_transaction(quantus_client, &keypair, submit_call, None, execution_mode).await?; + // Portion of mining rewards that goes to treasury (0–100) + let portion_addr = quantus_subxt::api::storage().treasury_pallet().treasury_portion(); + let portion = storage_at.fetch(&portion_addr).await?.unwrap_or(0); - log_print!( - "✅ {} Treasury spend referendum submitted! {:?}", - "SUCCESS".bright_green().bold(), - submit_tx_hash - ); - log_print!("💡 Next steps:"); - log_print!(" 1. Place decision deposit: quantus referenda place-decision-deposit --index --from {}", from); - log_print!( - " 2. Vote on the referendum: quantus referenda vote --index --aye --from " - ); - log_print!( - " 3. After approval, payout: quantus treasury payout --index --from {}", - from - ); - - Ok(()) -} - -/// Payout an approved Treasury spend -async fn payout_spend( - quantus_client: &crate::chain::client::QuantusClient, - index: u32, - from: &str, - password: Option, - password_file: Option, - execution_mode: crate::cli::common::ExecutionMode, -) -> crate::error::Result<()> { - log_print!("💸 Paying out Treasury Spend #{}", index); - - // Load wallet keypair - let keypair = crate::wallet::load_keypair_from_wallet(from, password, password_file)?; - - // Create payout call - let payout_call = quantus_subxt::api::tx().treasury_pallet().payout(index); - - let tx_hash = - submit_transaction(quantus_client, &keypair, payout_call, None, execution_mode).await?; - log_print!( - "✅ {} Payout transaction submitted! Hash: {:?}", - "SUCCESS".bright_green().bold(), - tx_hash - ); - - log_success!("🎉 {} Treasury spend paid out!", "FINISHED".bright_green().bold()); - log_print!("💡 Use 'quantus treasury check-status --index {}' to cleanup", index); - - Ok(()) -} - -/// Check and cleanup a Treasury spend status -async fn check_spend_status( - quantus_client: &crate::chain::client::QuantusClient, - index: u32, - from: &str, - password: Option, - password_file: Option, - execution_mode: crate::cli::common::ExecutionMode, -) -> crate::error::Result<()> { - log_print!("🔍 Checking Treasury Spend #{} status", index); - - // Load wallet keypair - let keypair = crate::wallet::load_keypair_from_wallet(from, password, password_file)?; - - // Create check_status call - let check_call = quantus_subxt::api::tx().treasury_pallet().check_status(index); - - let tx_hash = - submit_transaction(quantus_client, &keypair, check_call, None, execution_mode).await?; - log_print!( - "✅ {} Check status transaction submitted! Hash: {:?}", - "SUCCESS".bright_green().bold(), - tx_hash - ); - - log_success!("🎉 {} Spend status checked and cleaned up!", "FINISHED".bright_green().bold()); - - Ok(()) -} - -/// List active Treasury spends -async fn list_spends( - quantus_client: &crate::chain::client::QuantusClient, -) -> crate::error::Result<()> { - log_print!("📋 Active Treasury Spends"); - log_print!(""); - - let latest_block_hash = quantus_client.get_latest_block().await?; - let storage_at = quantus_client.client().storage().at(latest_block_hash); - - // Iterate through spend storage indices (0 to 100 for example) - let mut count = 0; - for spend_index in 0..100 { - let spend_addr = quantus_subxt::api::storage().treasury_pallet().spends(spend_index); - if let Some(spend_status) = storage_at.fetch(&spend_addr).await? { - log_print!("💰 Spend #{}", spend_index.to_string().bright_yellow().bold()); - log_print!(" Amount: {} (raw)", spend_status.amount.to_string().bright_green()); - - // Format beneficiary address in Quantus SS58 format - use crate::cli::address_format::QuantusSS58; - let beneficiary_str = spend_status.beneficiary.to_quantus_ss58(); - log_print!(" Beneficiary: {}", beneficiary_str.bright_cyan()); - log_print!(" Valid From: Block #{}", spend_status.valid_from); - log_print!(" Expires At: Block #{}", spend_status.expire_at); - log_print!( - " Status: {}", - match spend_status.status { - quantus_subxt::api::runtime_types::pallet_treasury::PaymentState::Pending => - "Pending".bright_yellow(), - quantus_subxt::api::runtime_types::pallet_treasury::PaymentState::Attempted { .. } => - "Attempted".bright_blue(), - quantus_subxt::api::runtime_types::pallet_treasury::PaymentState::Failed => - "Failed".bright_red(), - } - ); - log_print!(""); - count += 1; - } - } - - if count == 0 { - log_print!("📭 No active Treasury spends found"); - } else { - log_print!("Total: {} active spend(s)", count.to_string().bright_green().bold()); - } - - Ok(()) -} - -/// Directly create a Treasury spend via sudo (testing/root only) -async fn spend_sudo( - quantus_client: &crate::chain::client::QuantusClient, - beneficiary: &str, - amount: &str, - from: &str, - password: Option, - password_file: Option, - execution_mode: crate::cli::common::ExecutionMode, -) -> crate::error::Result<()> { - use sp_core::crypto::{AccountId32 as SpAccountId32, Ss58Codec}; - - log_print!("💰 Creating Treasury Spend via Sudo (Root)"); - log_print!(" 📍 Beneficiary: {}", beneficiary.bright_yellow()); - log_print!(" 💵 Amount: {}", amount.bright_green()); - log_print!(" ⚠️ Using ROOT permissions (sudo)"); - - // Parse amount - let amount_value = crate::cli::send::parse_amount(quantus_client, amount).await?; - - // Parse beneficiary address - let beneficiary_resolved = crate::cli::common::resolve_address(beneficiary)?; - let (beneficiary_sp, _) = SpAccountId32::from_ss58check_with_version(&beneficiary_resolved) - .map_err(|e| { - crate::error::QuantusError::Generic(format!( - "Invalid beneficiary address '{beneficiary}': {e:?}" - )) - })?; - let bytes: [u8; 32] = *beneficiary_sp.as_ref(); - let beneficiary_account = subxt::utils::AccountId32::from(bytes); - let beneficiary_multi = subxt::utils::MultiAddress::Id(beneficiary_account.clone()); - - // Create the treasury spend call - let spend_call = quantus_subxt::api::Call::TreasuryPallet( - quantus_subxt::api::treasury_pallet::Call::spend { - asset_kind: Box::new(()), - amount: amount_value, - beneficiary: Box::new(beneficiary_multi), - valid_from: None, - }, - ); - - // Wrap with sudo - let sudo_call = quantus_subxt::api::tx().sudo().sudo(spend_call); + // Account balance + let account_storage = quantus_subxt::api::storage().system().account(treasury_account.clone()); + let account_info = storage_at.fetch(&account_storage).await?.ok_or_else(|| { + crate::error::QuantusError::Generic("Treasury account not found in system".to_string()) + })?; - // Load wallet keypair - let keypair = crate::wallet::load_keypair_from_wallet(from, password, password_file)?; + let free = account_info.data.free; + let reserved = account_info.data.reserved; - // Submit transaction - log_print!("📡 Submitting sudo transaction..."); - let tx_hash = - submit_transaction(quantus_client, &keypair, sudo_call, None, execution_mode).await?; - log_print!( - "✅ {} Sudo transaction submitted! Hash: {:?}", - "SUCCESS".bright_green().bold(), - tx_hash - ); + let formatted_free = crate::cli::send::format_balance_with_symbol(quantus_client, free).await?; + let formatted_reserved = + crate::cli::send::format_balance_with_symbol(quantus_client, reserved).await?; - log_success!("🎉 {} Treasury spend created via sudo!", "FINISHED".bright_green().bold()); - log_print!("💡 Next step: quantus treasury list-spends"); - log_print!("💡 Then payout: quantus treasury payout --index --from {}", beneficiary); + let account_ss58 = treasury_account.to_quantus_ss58(); + log_print!("📍 Account: {}", account_ss58.bright_yellow()); + log_print!("📊 Reward portion: {}%", portion.to_string().bright_cyan()); + log_print!("💰 Free: {}", formatted_free); + log_print!("💰 Reserved: {}", formatted_reserved); Ok(()) } diff --git a/src/quantus_metadata.scale b/src/quantus_metadata.scale index f55447cfe4fd2a7edb00938b85e0300a619dbb4e..c38c0f5dfcfbf0edbfffc2d34642d04ed85ff8e6 100644 GIT binary patch delta 7789 zcmb_BZB$g(wP){p2WAv-knb-U6jTftP%vmf1;j`c6%>t)h*P+RiNL_jV8F%?Vo2gs zjJzAOYa62&ZG(m^2_d&>Vk>>IhQuVMt!aGgnMhh=HL)>Tv!1OsZ{ItEg4(yKNAhCyQT=;;~zMy8OPD;B@yD$phf0R+;VvfAzQcYp@Zn-+zO#0Xqr&5G)-G{+9JPm>UBv54N6D7(j#ii6%+GWwH-tfx}4PpeBVs|&Vnikp_$s>y{ zwZwl+&`(vZ-s^%Pk zlWP0aV+LxuR1Y)?a2_g`nU%mi8WY)n-@ z+E}Ar>UkE@yEne^xCJu1Z~S^MK)UK|t%XeWv(_Y-O6d1_phi2ps3rk^Jiu#?vB~}tl69kLikxl0fWcTrDI@He|I1m3f1cewyIqR z64Z`^fl#DRs=qtcZ|#J>T!#0gOIl`QamGkIh+I-86A1YMs-i+msBk zzMdJ(4Os%@LwC^f0ocZ;rKYE)B@d=42SUF3Cwrc{yLUM4sDu&Smrk4x2BrJMFEVBI z(1{>5_*^77DAxfI>Zi?t>ilzokW0DuKxDV)T)i~V|L27!?yFswBf6jcE26L4amk;% z-CdUp21bIewt^4mrPsgXQJqwVYFlJh&wLlu{r!Lc#5WeH=6s*oeeNGQH(BI-zkQ&u zeTnc#-%Eye*$)o;h-PSiHbXeS=#tRLVQ|IQjT;Vs_3>5zd0`ag1;DqycWquEyf+|} zcJB!2@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