1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
use super::*;
use crate::chain_spec::interlay::{interlay_genesis, PARA_ID};
fn testnet_properties(bitcoin_network: &str) -> Map<String, Value> {
let mut properties = Map::new();
let mut token_symbol: Vec<String> = vec![];
let mut token_decimals: Vec<u32> = vec![];
[INTR, IBTC, DOT, KINT, KBTC, KSM].iter().for_each(|token| {
token_symbol.push(token.symbol().to_string());
token_decimals.push(token.decimals() as u32);
});
properties.insert("tokenSymbol".into(), token_symbol.into());
properties.insert("tokenDecimals".into(), token_decimals.into());
properties.insert("ss58Format".into(), interlay_runtime::SS58Prefix::get().into());
properties.insert("bitcoinNetwork".into(), bitcoin_network.into());
properties
}
pub fn staging_mainnet_config(benchmarking: bool) -> InterlayChainSpec {
InterlayChainSpec::from_genesis(
"Interlay",
"interlay",
ChainType::Live,
move || {
interlay_genesis(
vec![
get_authority_keys_from_public_key(hex![
"7a6868acf544dc5c3f2f9f6f9a5952017bbefb51da41819307fc21cf3efb554d"
]),
get_authority_keys_from_public_key(hex![
"440e84dd3604be606f3110c21f93a0e981fb93b28288270dcdce8a43c68ff36e"
]),
get_authority_keys_from_public_key(hex![
"c425b0d9fed64d3bd5be0a6d06053d2bfb72f4983146788f5684aec9f5eb0c7f"
]),
],
vec![(
get_account_id_from_string("5ECj4iBBi3h8kYzhqLFmzVLafC64UpsXvK7H4ZZyXoVQJdJq"),
BoundedVec::truncate_from("Interlay".as_bytes().to_vec()),
)],
vec![
get_account_id_from_string("5Ec37KSdjSbGKoQN4evLXrZskjc7jxXYrowPHEtH2MzRC7mv"),
get_account_id_from_string("5ECj4iBBi3h8kYzhqLFmzVLafC64UpsXvK7H4ZZyXoVQJdJq"),
get_account_id_from_string("5FgWDuxgS8VasP6KtvESHUuuDn6L8BTCqbYyFW9mDwAaLtbY"),
get_account_id_from_string("5H3n25VshwPeMzKhn4gnVEjCEndFsjt85ydW2Vvo8ysy7CnZ"),
get_account_id_from_string("5GKciEHZWSGxtAihqGjXC6XpXSGNoudDxACuDLbYF1ipygZj"),
get_account_id_from_string("5GjJ26ffHApgUFLgxKWpWL5T5ppxWjSRJe42PjPNATLvjcJK"),
get_account_id_from_string("5DqzGaydetDXGya818gyuHA7GAjEWRsQN6UWNKpvfgq2KyM7"),
]
.into_iter()
.chain(if benchmarking {
vec![get_account_id_from_seed::<sr25519::Public>("Alice")]
} else {
vec![]
})
.collect(),
vec![],
Some(get_account_id_from_string(
"5Ec37KSdjSbGKoQN4evLXrZskjc7jxXYrowPHEtH2MzRC7mv",
)),
PARA_ID.into(),
DEFAULT_BITCOIN_CONFIRMATIONS,
true, )
},
Vec::new(),
None,
None,
None,
Some(testnet_properties(BITCOIN_TESTNET)),
Extensions {
relay_chain: "staging".into(),
para_id: PARA_ID.into(),
},
)
}