mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
* Update wasm-builder version to 2.0.0 * Fix all crate compile * Update cargo lock * Bump runtime impl_version
This commit is contained in:
@@ -113,7 +113,7 @@ fn westend_session_keys(
|
||||
westend::SessionKeys { babe, grandpa, im_online, parachain_validator, authority_discovery }
|
||||
}
|
||||
|
||||
fn polkadot_staging_testnet_config_genesis() -> polkadot::GenesisConfig {
|
||||
fn polkadot_staging_testnet_config_genesis(wasm_binary: &[u8]) -> polkadot::GenesisConfig {
|
||||
// subkey inspect "$SECRET"
|
||||
let endowed_accounts = vec![];
|
||||
|
||||
@@ -132,7 +132,7 @@ fn polkadot_staging_testnet_config_genesis() -> polkadot::GenesisConfig {
|
||||
|
||||
polkadot::GenesisConfig {
|
||||
system: Some(polkadot::SystemConfig {
|
||||
code: polkadot::WASM_BINARY.to_vec(),
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
}),
|
||||
balances: Some(polkadot::BalancesConfig {
|
||||
@@ -197,7 +197,7 @@ fn polkadot_staging_testnet_config_genesis() -> polkadot::GenesisConfig {
|
||||
}
|
||||
}
|
||||
|
||||
fn westend_staging_testnet_config_genesis() -> westend::GenesisConfig {
|
||||
fn westend_staging_testnet_config_genesis(wasm_binary: &[u8]) -> westend::GenesisConfig {
|
||||
// subkey inspect "$SECRET"
|
||||
let endowed_accounts = vec![
|
||||
// 5ENpP27BrVdJTdUfY6djmcw3d3xEJ6NzSUU52CCPmGpMrdEY
|
||||
@@ -284,7 +284,7 @@ fn westend_staging_testnet_config_genesis() -> westend::GenesisConfig {
|
||||
|
||||
westend::GenesisConfig {
|
||||
system: Some(westend::SystemConfig {
|
||||
code: westend::WASM_BINARY.to_vec(),
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
}),
|
||||
balances: Some(westend::BalancesConfig {
|
||||
@@ -337,7 +337,7 @@ fn westend_staging_testnet_config_genesis() -> westend::GenesisConfig {
|
||||
}
|
||||
}
|
||||
|
||||
fn kusama_staging_testnet_config_genesis() -> kusama::GenesisConfig {
|
||||
fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisConfig {
|
||||
// subkey inspect "$SECRET"
|
||||
let endowed_accounts = vec![
|
||||
// 5CVFESwfkk7NmhQ6FwHCM9roBvr9BGa4vJHFYU8DnGQxrXvz
|
||||
@@ -424,7 +424,7 @@ fn kusama_staging_testnet_config_genesis() -> kusama::GenesisConfig {
|
||||
|
||||
kusama::GenesisConfig {
|
||||
system: Some(kusama::SystemConfig {
|
||||
code: kusama::WASM_BINARY.to_vec(),
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
}),
|
||||
balances: Some(kusama::BalancesConfig {
|
||||
@@ -490,54 +490,60 @@ fn kusama_staging_testnet_config_genesis() -> kusama::GenesisConfig {
|
||||
}
|
||||
|
||||
/// Polkadot staging testnet config.
|
||||
pub fn polkadot_staging_testnet_config() -> PolkadotChainSpec {
|
||||
pub fn polkadot_staging_testnet_config() -> Result<PolkadotChainSpec, String> {
|
||||
let wasm_binary = polkadot::WASM_BINARY.ok_or("Polkadot development wasm not available")?;
|
||||
let boot_nodes = vec![];
|
||||
PolkadotChainSpec::from_genesis(
|
||||
|
||||
Ok(PolkadotChainSpec::from_genesis(
|
||||
"Polkadot Staging Testnet",
|
||||
"polkadot_staging_testnet",
|
||||
ChainType::Live,
|
||||
polkadot_staging_testnet_config_genesis,
|
||||
move || polkadot_staging_testnet_config_genesis(wasm_binary),
|
||||
boot_nodes,
|
||||
Some(TelemetryEndpoints::new(vec![(POLKADOT_STAGING_TELEMETRY_URL.to_string(), 0)])
|
||||
.expect("Polkadot Staging telemetry url is valid; qed")),
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
/// Staging testnet config.
|
||||
pub fn kusama_staging_testnet_config() -> KusamaChainSpec {
|
||||
pub fn kusama_staging_testnet_config() -> Result<KusamaChainSpec, String> {
|
||||
let wasm_binary = kusama::WASM_BINARY.ok_or("Kusama development wasm not available")?;
|
||||
let boot_nodes = vec![];
|
||||
KusamaChainSpec::from_genesis(
|
||||
|
||||
Ok(KusamaChainSpec::from_genesis(
|
||||
"Kusama Staging Testnet",
|
||||
"kusama_staging_testnet",
|
||||
ChainType::Live,
|
||||
kusama_staging_testnet_config_genesis,
|
||||
move || kusama_staging_testnet_config_genesis(wasm_binary),
|
||||
boot_nodes,
|
||||
Some(TelemetryEndpoints::new(vec![(KUSAMA_STAGING_TELEMETRY_URL.to_string(), 0)])
|
||||
.expect("Kusama Staging telemetry url is valid; qed")),
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
/// Westend staging testnet config.
|
||||
pub fn westend_staging_testnet_config() -> WestendChainSpec {
|
||||
pub fn westend_staging_testnet_config() -> Result<WestendChainSpec, String> {
|
||||
let wasm_binary = westend::WASM_BINARY.ok_or("Westend development wasm not available")?;
|
||||
let boot_nodes = vec![];
|
||||
WestendChainSpec::from_genesis(
|
||||
|
||||
Ok(WestendChainSpec::from_genesis(
|
||||
"Westend Staging Testnet",
|
||||
"westend_staging_testnet",
|
||||
ChainType::Live,
|
||||
westend_staging_testnet_config_genesis,
|
||||
move || westend_staging_testnet_config_genesis(wasm_binary),
|
||||
boot_nodes,
|
||||
Some(TelemetryEndpoints::new(vec![(WESTEND_STAGING_TELEMETRY_URL.to_string(), 0)])
|
||||
.expect("Westend Staging telemetry url is valid; qed")),
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
/// Helper function to generate a crypto pair from seed
|
||||
@@ -595,6 +601,7 @@ fn testnet_accounts() -> Vec<AccountId> {
|
||||
|
||||
/// Helper function to create polkadot GenesisConfig for testing
|
||||
pub fn polkadot_testnet_genesis(
|
||||
wasm_binary: &[u8],
|
||||
initial_authorities: Vec<(AccountId, AccountId, BabeId, GrandpaId, ImOnlineId, ValidatorId, AuthorityDiscoveryId)>,
|
||||
_root_key: AccountId,
|
||||
endowed_accounts: Option<Vec<AccountId>>,
|
||||
@@ -606,7 +613,7 @@ pub fn polkadot_testnet_genesis(
|
||||
|
||||
polkadot::GenesisConfig {
|
||||
system: Some(polkadot::SystemConfig {
|
||||
code: polkadot::WASM_BINARY.to_vec(),
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
}),
|
||||
indices: Some(polkadot::IndicesConfig {
|
||||
@@ -669,6 +676,7 @@ pub fn polkadot_testnet_genesis(
|
||||
|
||||
/// Helper function to create kusama GenesisConfig for testing
|
||||
pub fn kusama_testnet_genesis(
|
||||
wasm_binary: &[u8],
|
||||
initial_authorities: Vec<(AccountId, AccountId, BabeId, GrandpaId, ImOnlineId, ValidatorId, AuthorityDiscoveryId)>,
|
||||
_root_key: AccountId,
|
||||
endowed_accounts: Option<Vec<AccountId>>,
|
||||
@@ -680,7 +688,7 @@ pub fn kusama_testnet_genesis(
|
||||
|
||||
kusama::GenesisConfig {
|
||||
system: Some(kusama::SystemConfig {
|
||||
code: kusama::WASM_BINARY.to_vec(),
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
}),
|
||||
indices: Some(kusama::IndicesConfig {
|
||||
@@ -743,6 +751,7 @@ pub fn kusama_testnet_genesis(
|
||||
|
||||
/// Helper function to create polkadot GenesisConfig for testing
|
||||
pub fn westend_testnet_genesis(
|
||||
wasm_binary: &[u8],
|
||||
initial_authorities: Vec<(AccountId, AccountId, BabeId, GrandpaId, ImOnlineId, ValidatorId, AuthorityDiscoveryId)>,
|
||||
root_key: AccountId,
|
||||
endowed_accounts: Option<Vec<AccountId>>,
|
||||
@@ -754,7 +763,7 @@ pub fn westend_testnet_genesis(
|
||||
|
||||
westend::GenesisConfig {
|
||||
system: Some(westend::SystemConfig {
|
||||
code: westend::WASM_BINARY.to_vec(),
|
||||
code: wasm_binary.to_vec(),
|
||||
changes_trie_config: Default::default(),
|
||||
}),
|
||||
indices: Some(westend::IndicesConfig {
|
||||
@@ -803,8 +812,9 @@ pub fn westend_testnet_genesis(
|
||||
}
|
||||
}
|
||||
|
||||
fn polkadot_development_config_genesis() -> polkadot::GenesisConfig {
|
||||
fn polkadot_development_config_genesis(wasm_binary: &[u8]) -> polkadot::GenesisConfig {
|
||||
polkadot_testnet_genesis(
|
||||
wasm_binary,
|
||||
vec![
|
||||
get_authority_keys_from_seed("Alice"),
|
||||
],
|
||||
@@ -813,8 +823,9 @@ fn polkadot_development_config_genesis() -> polkadot::GenesisConfig {
|
||||
)
|
||||
}
|
||||
|
||||
fn kusama_development_config_genesis() -> kusama::GenesisConfig {
|
||||
fn kusama_development_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisConfig {
|
||||
kusama_testnet_genesis(
|
||||
wasm_binary,
|
||||
vec![
|
||||
get_authority_keys_from_seed("Alice"),
|
||||
],
|
||||
@@ -823,8 +834,9 @@ fn kusama_development_config_genesis() -> kusama::GenesisConfig {
|
||||
)
|
||||
}
|
||||
|
||||
fn westend_development_config_genesis() -> westend::GenesisConfig {
|
||||
fn westend_development_config_genesis(wasm_binary: &[u8]) -> westend::GenesisConfig {
|
||||
westend_testnet_genesis(
|
||||
wasm_binary,
|
||||
vec![
|
||||
get_authority_keys_from_seed("Alice"),
|
||||
],
|
||||
@@ -834,52 +846,59 @@ fn westend_development_config_genesis() -> westend::GenesisConfig {
|
||||
}
|
||||
|
||||
/// Polkadot development config (single validator Alice)
|
||||
pub fn polkadot_development_config() -> PolkadotChainSpec {
|
||||
PolkadotChainSpec::from_genesis(
|
||||
pub fn polkadot_development_config() -> Result<PolkadotChainSpec, String> {
|
||||
let wasm_binary = polkadot::WASM_BINARY.ok_or("Polkadot development wasm not available")?;
|
||||
|
||||
Ok(PolkadotChainSpec::from_genesis(
|
||||
"Development",
|
||||
"dev",
|
||||
ChainType::Development,
|
||||
polkadot_development_config_genesis,
|
||||
move || polkadot_development_config_genesis(wasm_binary),
|
||||
vec![],
|
||||
None,
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
/// Kusama development config (single validator Alice)
|
||||
pub fn kusama_development_config() -> KusamaChainSpec {
|
||||
KusamaChainSpec::from_genesis(
|
||||
pub fn kusama_development_config() -> Result<KusamaChainSpec, String> {
|
||||
let wasm_binary = kusama::WASM_BINARY.ok_or("Kusama development wasm not available")?;
|
||||
|
||||
Ok(KusamaChainSpec::from_genesis(
|
||||
"Development",
|
||||
"kusama_dev",
|
||||
ChainType::Development,
|
||||
kusama_development_config_genesis,
|
||||
move || kusama_development_config_genesis(wasm_binary),
|
||||
vec![],
|
||||
None,
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
/// Westend development config (single validator Alice)
|
||||
pub fn westend_development_config() -> WestendChainSpec {
|
||||
WestendChainSpec::from_genesis(
|
||||
pub fn westend_development_config() -> Result<WestendChainSpec, String> {
|
||||
let wasm_binary = westend::WASM_BINARY.ok_or("Westend development wasm not available")?;
|
||||
|
||||
Ok(WestendChainSpec::from_genesis(
|
||||
"Development",
|
||||
"westend_dev",
|
||||
ChainType::Development,
|
||||
westend_development_config_genesis,
|
||||
move || westend_development_config_genesis(wasm_binary),
|
||||
vec![],
|
||||
None,
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
fn polkadot_local_testnet_genesis() -> polkadot::GenesisConfig {
|
||||
fn polkadot_local_testnet_genesis(wasm_binary: &[u8]) -> polkadot::GenesisConfig {
|
||||
polkadot_testnet_genesis(
|
||||
wasm_binary,
|
||||
vec![
|
||||
get_authority_keys_from_seed("Alice"),
|
||||
get_authority_keys_from_seed("Bob"),
|
||||
@@ -890,22 +909,25 @@ fn polkadot_local_testnet_genesis() -> polkadot::GenesisConfig {
|
||||
}
|
||||
|
||||
/// Polkadot local testnet config (multivalidator Alice + Bob)
|
||||
pub fn polkadot_local_testnet_config() -> PolkadotChainSpec {
|
||||
PolkadotChainSpec::from_genesis(
|
||||
pub fn polkadot_local_testnet_config() -> Result<PolkadotChainSpec, String> {
|
||||
let wasm_binary = polkadot::WASM_BINARY.ok_or("Polkadot development wasm not available")?;
|
||||
|
||||
Ok(PolkadotChainSpec::from_genesis(
|
||||
"Local Testnet",
|
||||
"local_testnet",
|
||||
ChainType::Local,
|
||||
polkadot_local_testnet_genesis,
|
||||
move || polkadot_local_testnet_genesis(wasm_binary),
|
||||
vec![],
|
||||
None,
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
fn kusama_local_testnet_genesis() -> kusama::GenesisConfig {
|
||||
fn kusama_local_testnet_genesis(wasm_binary: &[u8]) -> kusama::GenesisConfig {
|
||||
kusama_testnet_genesis(
|
||||
wasm_binary,
|
||||
vec![
|
||||
get_authority_keys_from_seed("Alice"),
|
||||
get_authority_keys_from_seed("Bob"),
|
||||
@@ -916,22 +938,25 @@ fn kusama_local_testnet_genesis() -> kusama::GenesisConfig {
|
||||
}
|
||||
|
||||
/// Kusama local testnet config (multivalidator Alice + Bob)
|
||||
pub fn kusama_local_testnet_config() -> KusamaChainSpec {
|
||||
KusamaChainSpec::from_genesis(
|
||||
pub fn kusama_local_testnet_config() -> Result<KusamaChainSpec, String> {
|
||||
let wasm_binary = kusama::WASM_BINARY.ok_or("Kusama development wasm not available")?;
|
||||
|
||||
Ok(KusamaChainSpec::from_genesis(
|
||||
"Kusama Local Testnet",
|
||||
"kusama_local_testnet",
|
||||
ChainType::Local,
|
||||
kusama_local_testnet_genesis,
|
||||
move || kusama_local_testnet_genesis(wasm_binary),
|
||||
vec![],
|
||||
None,
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
fn westend_local_testnet_genesis() -> westend::GenesisConfig {
|
||||
fn westend_local_testnet_genesis(wasm_binary: &[u8]) -> westend::GenesisConfig {
|
||||
westend_testnet_genesis(
|
||||
wasm_binary,
|
||||
vec![
|
||||
get_authority_keys_from_seed("Alice"),
|
||||
get_authority_keys_from_seed("Bob"),
|
||||
@@ -942,16 +967,18 @@ fn westend_local_testnet_genesis() -> westend::GenesisConfig {
|
||||
}
|
||||
|
||||
/// Westend local testnet config (multivalidator Alice + Bob)
|
||||
pub fn westend_local_testnet_config() -> WestendChainSpec {
|
||||
WestendChainSpec::from_genesis(
|
||||
pub fn westend_local_testnet_config() -> Result<WestendChainSpec, String> {
|
||||
let wasm_binary = westend::WASM_BINARY.ok_or("Westend development wasm not available")?;
|
||||
|
||||
Ok(WestendChainSpec::from_genesis(
|
||||
"Westend Local Testnet",
|
||||
"westend_local_testnet",
|
||||
ChainType::Local,
|
||||
westend_local_testnet_genesis,
|
||||
move || westend_local_testnet_genesis(wasm_binary),
|
||||
vec![],
|
||||
None,
|
||||
Some(DEFAULT_PROTOCOL_ID),
|
||||
None,
|
||||
Default::default(),
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user