difftreelog
Add chain spec entries for system properties and vesting
in: master
3 files changed
Cargo.lockdiffbeforeafterboth3522 "sc-rpc-api",3522 "sc-rpc-api",3523 "sc-service",3523 "sc-service",3524 "sc-transaction-pool",3524 "sc-transaction-pool",3525 "serde",3526 "serde_json",3525 "sp-api",3527 "sp-api",3526 "sp-block-builder",3528 "sp-block-builder",3527 "sp-blockchain",3529 "sp-blockchain",node/Cargo.tomldiffbeforeafterboth58substrate-frame-rpc-system = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'release_flexi'}58substrate-frame-rpc-system = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'release_flexi'}59pallet-contracts-rpc = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'release_flexi'} 59pallet-contracts-rpc = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'release_flexi'} 6061serde = { version = "1.0.102", features = ["derive"] }62serde_json = "1.0.41"606361[features]64[features]62default = []65default = []node/src/chain_spec.rsdiffbeforeafterboth9use sp_core::{sr25519, Pair, Public};9use sp_core::{sr25519, Pair, Public};10use sp_finality_grandpa::AuthorityId as GrandpaId;10use sp_finality_grandpa::AuthorityId as GrandpaId;11use sp_runtime::traits::{IdentifyAccount, Verify};11use sp_runtime::traits::{IdentifyAccount, Verify};12use serde_json::map::Map;121313// Note this is the URL for the telemetry server14// Note this is the URL for the telemetry server14//const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";15//const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";41pub fn development_config() -> Result<ChainSpec, String> {42pub fn development_config() -> Result<ChainSpec, String> {42 let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;43 let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;4445 let mut properties = Map::new();46 properties.insert("tokenSymbol".into(), "UniqueTest".into());47 properties.insert("tokenDecimals".into(), 15.into());48 properties.insert("ss58Format".into(), 0.into());434944 Ok(ChainSpec::from_genesis(50 Ok(ChainSpec::from_genesis(45 // Name51 // Name71 // Protocol ID77 // Protocol ID72 None,78 None,73 // Properties79 // Properties74 None,80 Some(properties),75 // Extensions81 // Extensions76 None,82 None,77 ))83 ))133 enable_println: bool,139 enable_println: bool,134) -> GenesisConfig {140) -> GenesisConfig {141142 let vested_accounts = vec![143 get_account_id_from_seed::<sr25519::Public>("Bob"),144 ];145135 GenesisConfig {146 GenesisConfig {136 system: Some(SystemConfig {147 system: Some(SystemConfig {155 }),166 }),156 pallet_treasury: Some(Default::default()),167 pallet_treasury: Some(Default::default()),157 pallet_sudo: Some(SudoConfig { key: root_key }),168 pallet_sudo: Some(SudoConfig { key: root_key }),158 pallet_vesting: Some(Default::default()),169 pallet_vesting: Some(VestingConfig {170 vesting: vested_accounts171 .iter()172 .cloned()173 .map(|k| (k, 1000, 100, 1 << 98))174 .collect(),175 }),159 pallet_nft: Some(NftConfig {176 pallet_nft: Some(NftConfig {160 collection: vec![(177 collection: vec![(161 1,178 1,