mirror of
https://github.com/pezkuwichain/pez-minimal-template.git
synced 2026-06-13 17:41:04 +00:00
Update the minimal template to stable2503 (#23)
This synchronizes the template to the stable2503 branch. Co-authored-by: iulianbarbu <14218860+iulianbarbu@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
dbc4be1c1f
commit
cf2536b751
+11
-9
@@ -41,7 +41,7 @@ pub mod genesis_config_presets {
|
||||
use super::*;
|
||||
use crate::{
|
||||
interface::{Balance, MinimumBalance},
|
||||
sp_keyring::AccountKeyring,
|
||||
sp_keyring::Sr25519Keyring,
|
||||
BalancesConfig, RuntimeGenesisConfig, SudoConfig,
|
||||
};
|
||||
|
||||
@@ -51,17 +51,14 @@ pub mod genesis_config_presets {
|
||||
/// Returns a development genesis config preset.
|
||||
pub fn development_config_genesis() -> Value {
|
||||
let endowment = <MinimumBalance as Get<Balance>>::get().max(1) * 1000;
|
||||
let config = RuntimeGenesisConfig {
|
||||
frame_support::build_struct_json_patch!(RuntimeGenesisConfig {
|
||||
balances: BalancesConfig {
|
||||
balances: AccountKeyring::iter()
|
||||
balances: Sr25519Keyring::iter()
|
||||
.map(|a| (a.to_account_id(), endowment))
|
||||
.collect::<Vec<_>>(),
|
||||
},
|
||||
sudo: SudoConfig { key: Some(AccountKeyring::Alice.to_account_id()) },
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
serde_json::to_value(config).expect("Could not build genesis config.")
|
||||
sudo: SudoConfig { key: Some(Sr25519Keyring::Alice.to_account_id()) },
|
||||
})
|
||||
}
|
||||
|
||||
/// Get the set of the available genesis config presets.
|
||||
@@ -121,6 +118,10 @@ type TxExtension = (
|
||||
// Ensures that the sender has enough funds to pay for the transaction
|
||||
// and deducts the fee from the sender's account.
|
||||
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
|
||||
// Reclaim the unused weight from the block using post dispatch information.
|
||||
// It must be last in the pipeline in order to catch the refund in previous transaction
|
||||
// extensions
|
||||
frame_system::WeightReclaim<Runtime>,
|
||||
);
|
||||
|
||||
// Composes the runtime by adding all the used pallets and deriving necessary types.
|
||||
@@ -137,7 +138,8 @@ mod runtime {
|
||||
RuntimeHoldReason,
|
||||
RuntimeSlashReason,
|
||||
RuntimeLockId,
|
||||
RuntimeTask
|
||||
RuntimeTask,
|
||||
RuntimeViewFunction
|
||||
)]
|
||||
pub struct Runtime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user