astar_collator/parachain/chain_spec/shibuya.rs
1// This file is part of Astar.
2
3// Copyright (C) Stake Technologies Pte.Ltd.
4// SPDX-License-Identifier: GPL-3.0-or-later
5
6// Astar is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10
11// Astar is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// You should have received a copy of the GNU General Public License
17// along with Astar. If not, see <http://www.gnu.org/licenses/>.
18
19//! Shibuya chain specifications.
20
21use super::Extensions;
22use astar_primitives::parachain::SHIBUYA_ID;
23use sc_service::ChainType;
24use shibuya_runtime::wasm_binary_unwrap;
25
26/// Specialized `ChainSpec` for Shibuya testnet.
27pub type ShibuyaChainSpec = sc_service::GenericChainSpec<Extensions>;
28
29/// Gen Shibuya chain specification.
30pub fn get_chain_spec() -> ShibuyaChainSpec {
31 let mut properties = serde_json::map::Map::new();
32 properties.insert("tokenSymbol".into(), "SBY".into());
33 properties.insert("tokenDecimals".into(), 18.into());
34
35 ShibuyaChainSpec::builder(
36 wasm_binary_unwrap(),
37 Extensions {
38 bad_blocks: Default::default(),
39 relay_chain: "paseo".into(),
40 para_id: SHIBUYA_ID,
41 },
42 )
43 .with_name("Shibuya Testnet")
44 .with_id("shibuya")
45 .with_chain_type(ChainType::Development)
46 .with_properties(properties)
47 .with_genesis_config(shibuya_runtime::genesis_config::default_config(SHIBUYA_ID))
48 .build()
49}