Skip to content

Commit

Permalink
Chainspec for testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsso committed Oct 15, 2021
1 parent 224abcc commit 184c727
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 313 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/release-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,6 @@ jobs:
prerelease: false
outputs:
upload_url: ${{steps.create_release.outputs.upload_url}}
buildMac:
needs: prepare
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Rust Dependecies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Project
run: |
./scripts/init.sh
rustup target add x86_64-apple-darwin --toolchain nightly-2021-05-11
cargo build --release
- name: PackRelease
run: |
zip PolkadexNodeMacOS.zip --junk-paths target/release/polkadex-node extras/customSpecRaw.json
- name: Archive binary
uses: actions/upload-artifact@v1
with:
name: PolkadexNodeMacOS.zip
path: PolkadexNodeMacOS.zip
- name: Upload Release Asset
id: upload-release-asset0
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare.outputs.upload_url }}
asset_path: PolkadexNodeMacOS.zip
asset_name: PolkadexNodeMacOS.zip
asset_content_type: application/octet-stream
buildUbuntu:
runs-on: ubuntu-latest
needs: prepare
Expand Down
343 changes: 115 additions & 228 deletions extras/customSpecRaw.json

Large diffs are not rendered by default.

61 changes: 12 additions & 49 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_core::{crypto::UncheckedInto, sr25519, Pair, Public};
use sp_runtime::{traits::{IdentifyAccount, Verify}, Perbill};
use node_polkadex_runtime::constants::currency::*;
pub use node_polkadex_runtime::GenesisConfig;
use node_polkadex_runtime::{
wasm_binary_unwrap, AuthorityDiscoveryConfig, BabeConfig, BalancesConfig,
Expand Down Expand Up @@ -125,7 +124,12 @@ fn udon_testnet_config_genesis() -> GenesisConfig {

/// Staging testnet config.
pub fn udon_testnet_config() -> ChainSpec {
let boot_nodes = vec![];
let boot_nodes = vec![
"/ip4/13.235.190.203/tcp/30333/p2p/12D3KooWMJ4AMmzpRbv914ZGZR6ehBhcZvGtqYid5jxSx8vXiSr7".parse().unwrap(),
"/ip4/54.176.87.85/tcp/30333/ws/p2p/12D3KooWQfzQ5eJfXxJ1GK2xKNYhDQGyEvt3cteokENHd6rnSFJC".parse().unwrap(),
"/ip4/18.198.113.243/tcp/30333/ws/p2p/12D3KooWHzoUKuYehN51LNc1QYK8er4KyweikD1GQaZn9ViCkygN".parse().unwrap(),
"/ip4/52.28.14.93/tcp/30333/p2p/12D3KooWE1t2sSVntkhpFRva6UGdXJKeDqMfjtRYFGX8msHfEdZi".parse().unwrap()
];
ChainSpec::from_genesis(
"Polkadex Test Net",
"polkadex_udon_testnet",
Expand Down Expand Up @@ -274,7 +278,7 @@ fn mainnet_genesis_constuctor() -> GenesisConfig {
hex!["b68fae03e44288bde5c66fd89893d943baf88b8cffb33aa7f1dedf0d4a86ad3c"]
.unchecked_into(),
), ];
let root_key = hex!["a2f6199c36e89dd066de2582ae6f705783f040c1fc06f30455532258886bfa76"].into();
let root_key = hex!["70a5f4e786b47baf52d5a34742bb8312139cfe1c747fbeb3912c197d38c53332"].into();
testnet_genesis(initial_authorities, vec![], root_key)
}

Expand Down Expand Up @@ -434,9 +438,11 @@ pub fn testnet_genesis(
operation_status: false
},
tokens: TokensConfig {
balances : vec![],
// endowed_accounts: vec![
balances : vec![(root_key.clone(),AssetId::Asset(24),1000000u128)],
// [
// (endowed_accounts[0].to_owned(), AssetId::Asset(24), 1000000000000000000u128),
// (endowed_accounts[0].to_owned(), AssetId::Asset(702), 1000000000000000000u128),

// ],
},
polkadex_ocex: PolkadexOcexConfig {
Expand All @@ -456,50 +462,7 @@ pub fn get_vesting_terms() -> Vec<(AccountId, u32, u32, u32, Balance)> {

pub fn get_stakeholder_tokens() -> Vec<(AccountId, Balance)> {
let claims = vec![
(hex!["e4cdc8abc0405db44c1a6886a2f2c59012fa3b98c07b61d63cc7f9e437ba243e"].into(), 3 * 6_000 * PDEX),
(hex!["b26562a2e476fea86b26b2e47f12d279deb0ca7812bd1dad5b4fc8a909e10b22"].into(), 3 * 800_000 * PDEX),
(hex!["e83adffb6338272e981cbc0c6cc03fd4e5e8447497b6b531b9436870c6079758"].into(), 3 * 6_000 * PDEX),
(hex!["e613dd948e7baacc02c97db737ad43af7024f5ae595d06f1611ce827c300b17f"].into(), 3 * 120_000 * PDEX),
(hex!["182400644f4780a65a43e00f9630152fe0ab2323d0dacd04e808ceccf462f416"].into(), 3 * 35_000 * PDEX),
(hex!["b8779ddd7bc8dc00dc0e220b6b07b509553c3cdbdad3e384cc1ba2187cbca53f"].into(), 3 * 1875 * PDEX),
(hex!["62168680c9ed6e456fa59bd01525a53dd6fa991757e920482016e7db6caebd45"].into(), 3 * 4375 * PDEX),
(hex!["1c2eaec3bd844d93d29d442c1ecc431e8502ce7b13f950ae203ee63ff2a1750a"].into(), 3 * 17500 * PDEX),
(hex!["78d4caac9c5b562190901aafb9f2c74780c5831a89257254ca225729e755d919"].into(), 3 * 17500 * PDEX),
(hex!["1a8538e949213a4034bca131957bbfe8bc45107be4e93c86f92353fccff90039"].into(), 3 * 17500 * PDEX),
(hex!["fac6591fd5605154f1a77fc142d66d9c2f7b11f5c0bc61a3ac8ab46099e87e3a"].into(), 3 * 5250 * PDEX),
(hex!["ccb97ce4726461ad53c0ec9277b1ba3f7f88b0a11f847f1ca17d358e6e4d0a05"].into(), 3 * 63750 * PDEX),
(hex!["08a1c86a2c789eeb1295c3b3ba63b2cde5d23fa6c80d8f87246c21a11fa3ba1d"].into(), 3 * 35000 * PDEX),
(hex!["082cb53d6299dc033e467de007bfd5c4c0d24135aa85d2f1d983008ff78fbb66"].into(), 3 * 42500 * PDEX),
(hex!["48cb52f3831917977aec38d9c3a3c73c8253b82523af35d44b7122e674677f05"].into(), 3 * 17500 * PDEX),
(hex!["0617b168a08acd31e3323ff63cb6e8e7682ba002ca0184a59a0ebc6dcf4e7f2b"].into(), 3 * 17500 * PDEX),

(hex!["0a1f6fa0345ceac40338c78bdfc68a211898921032d30e1b4492090c29962505"].into(), 3 * 10625 * PDEX),
(hex!["b2fa882baef6358e3b4379c290fc989093da5f62b0c8cc57bb972fa7232efe10"].into(), 3 * 8750 * PDEX),
(hex!["ecd0a0fba2f97d02d81fa3408e7e1f4a40b36d58fb7b999f0d0f5e073b810d3d"].into(), 3 * 31875 * PDEX),
(hex!["0838d06bad89b000120bea3e2cbf59e342f518a3f76becfa8c35bfd386e79825"].into(), 3 * 17500 * PDEX),
(hex!["60285b86e8196e4e20565440e2ded16459a8f1e8b6c5ce8bacb4a5b11eee8b05"].into(), 3 * 25250 * PDEX),
(hex!["68732830b518f410592bfb6f623e9864e9c021bc4adfe4845916932024bf9119"].into(), 3 * 2625 * PDEX),
(hex!["bc13c9a902a524609f064014695f2b6548a17d7e8bb12a834220559bc38bbc5d"].into(), 3 * 14000 * PDEX),
(hex!["daeb89c994d06f7e996e2c3e9e1fe685765e40f083432fbcdcb7f77bc1f9a378"].into(), 3 * 2625 * PDEX),
(hex!["3ceab1c17a4302ac0471e943279bd993adf12af6d2010a4f73bbdf428fba914f"].into(), 3 * 10000 * PDEX),
(hex!["baf1346f012c29003aeb63ac2503fbfafcd0dc182e98053b34f8bb08510ca73f"].into(), 3 * 15280 * PDEX),
(hex!["969554a9c50959bc434b99051b9803cc911ba3cad6c0e1d2ab2b8bcbbd1f057e"].into(), 3 * 20000 * PDEX),

(hex!["724513af8211cbaaeb17e7bbff8f2286718135d4ebe10e556c5b2076dbbd342d"].into(), 3 * 20000 * PDEX),
(hex!["cc0056b00683900613556f57c5324a2882fa9b5f50702e61ffade0b1102f0674"].into(), 3 * 10000 * PDEX),
(hex!["eab1d6b0efce910517067712d026e42ab5f84ffd068b80d3cd55cd7c95d4db68"].into(), 3 * 20000 * PDEX),
(hex!["3ee90311650ce54b81d70f77537dc255c130ac9f5f5933cc6e2cedcb00ebdf5d"].into(), 3 * 50000 * PDEX),
(hex!["a0cc2a61879f21b7924392cfea5c35b47781f795ca24d179188c6d3f2a67952b"].into(), 3 * 20000 * PDEX),
(hex!["2c6ce334da34c1ffdfb9cfb9962afdc9decf8f36b8d5282c2dbdef7c7b1aee53"].into(), 3 * 20000 * PDEX),
(hex!["aa36b0d46767a839e11f18d8f15d373ed1f63abb33324edd87ebdc5fcfabd812"].into(), 3 * 20000 * PDEX),

(hex!["7a56462554bef5d4f946a3c2ea1798398303aaf49e2d80d272096fb04cd95d06"].into(), 3 * 375 * PDEX),
(hex!["9a82629aac0895e5998542537f6b5b3a1c2c6fd46e827d409de88aacf9755a0e"].into(), 3 * 938 * PDEX),
(hex!["8039b9f35380bc3c20206d25c44006bd98e1252d7cb80acd6290b4f9c17bcd4c"].into(), 50000 * PDEX),
(hex!["ec3cfd6b94a36adf49492caae5c59005b04e88a936c6106c4feca1631b5d6025"].into(), 50000 * PDEX),
(hex!["8a442ebbcdb3aeace616292a957f36462e1e4c69e11de340527bfb617b01e068"].into(), 50000 * PDEX),
(hex!["2c6789aa288e153564fe1ad4f824d8b760171db53d4e7500e2d3f9d51e979e03"].into(), 400000 * PDEX),
(hex!["148d5e55a937b6a6c80db86b28bc55f7336b17b13225e80468eef71d01c79341"].into(), 3655828 * PDEX),

];
claims
}
Expand Down

0 comments on commit 184c727

Please sign in to comment.