@@ -441,7 +441,7 @@ pub fn staging_testnet_config() -> Result<ChainSpec, String> {
441441 ) )
442442}
443443
444- #[ cfg( any ( feature = "contextfree" , feature = "finitestate" ) ) ]
444+ #[ cfg( feature = "contextfree" ) ]
445445fn contextfree_genesis_accounts ( ) -> (
446446 Vec < ( AccountId , u128 ) > ,
447447 Vec < (
@@ -570,6 +570,99 @@ fn contextfree_genesis_accounts() -> (
570570 ( endowed_accounts, initial_authorities, root_key)
571571}
572572
573+ #[ cfg( feature = "finitestate" ) ]
574+ fn finitestate_genesis_accounts ( ) -> (
575+ Vec < ( AccountId , u128 ) > ,
576+ Vec < (
577+ AccountId ,
578+ AccountId ,
579+ GrandpaId ,
580+ BabeId ,
581+ ImOnlineId ,
582+ AuthorityDiscoveryId ,
583+ ) > ,
584+ AccountId ,
585+ ) {
586+ let endowed_accounts: Vec < ( AccountId , u128 ) > = vec ! [
587+ //Chainbridge pallet account
588+ (
589+ AccountId :: from_ss58check( "a7Qbi6onJLQu6h37oLDRCoYbYcQ7B49Tz4gxNsPP5UT5bMy4B" ) . unwrap( ) ,
590+ 300700000 * DOLLARS ,
591+ ) ,
592+ //Team account
593+ (
594+ AccountId :: from_ss58check( "a7SvNLeY4LLRvUzmgEEBQwmdMExW5ZpPqBEvDDuB65nHF9hTk" ) . unwrap( ) ,
595+ 150000000 * DOLLARS ,
596+ ) ,
597+ //Advisor account
598+ (
599+ AccountId :: from_ss58check( "a7QJhiA62xQR4HsCtCyEgJDVQ6eLnsQFAMXpHeYUQtoict1Zy" ) . unwrap( ) ,
600+ 50000000 * DOLLARS ,
601+ ) ,
602+ //Eco & Dev community account
603+ (
604+ AccountId :: from_ss58check( "a7RFMEiomBwYPRfjDJKHKKwK1a2fdwsmB9w1bZgCyDXwMrCUa" ) . unwrap( ) ,
605+ 220000000 * DOLLARS ,
606+ ) ,
607+ //Protocol Reserve account
608+ (
609+ AccountId :: from_ss58check( "a7RSYT4AXr668NGpMC3vv7h5Jqb4HYNr4cqNt9M5H4nRrjz3b" ) . unwrap( ) ,
610+ 279270000 * DOLLARS ,
611+ ) ,
612+ ] ;
613+
614+ let initial_authorities: Vec < (
615+ AccountId ,
616+ AccountId ,
617+ GrandpaId ,
618+ BabeId ,
619+ ImOnlineId ,
620+ AuthorityDiscoveryId ,
621+ ) > = vec ! [
622+ (
623+ // a7PJf9QzaZpBxcZc1xwxCtXmexowt4i15zKDRmS3dr6cAmbjf
624+ hex![ "34320a13ec8008a9b735f9acc991a1c54c399c377696f38661aa3c5fcb86f714" ] . into( ) ,
625+ // a7SiPCDWkTpvmw7iWRyxpL9YKZnnHLFoYFvECBRzNFnkGsUzS
626+ hex![ "cafeee6712174eb1aca3a417917e2ec2c48ac95dd2f1e86d362d801fbe2d2b65" ] . into( ) ,
627+ // a7TjXAbsJ8H7hjjDr9CTiEhQqYfzbQEFkBMceDpjcHDDz6M2A
628+ hex![ "f8193f2ed5a172117e517da0847f1056c0dc10b3df8695f78d91bc03c2a7a0f9" ]
629+ . unchecked_into( ) ,
630+ // a7SM7m8VQEudoEscP8antLbabujSmSRPM56JMDDgN9WPJxnCK
631+ hex![ "bac6d3c69e0b13082363c93b6b440469a9066fb9dd720203d1c32e1b2fc9dc41" ]
632+ . unchecked_into( ) ,
633+ // a7SM7m8VQEudoEscP8antLbabujSmSRPM56JMDDgN9WPJxnCK
634+ hex![ "bac6d3c69e0b13082363c93b6b440469a9066fb9dd720203d1c32e1b2fc9dc41" ]
635+ . unchecked_into( ) ,
636+ // a7SM7m8VQEudoEscP8antLbabujSmSRPM56JMDDgN9WPJxnCK
637+ hex![ "bac6d3c69e0b13082363c93b6b440469a9066fb9dd720203d1c32e1b2fc9dc41" ]
638+ . unchecked_into( ) ,
639+ ) ,
640+ (
641+ // a7TXW1KoxRsDwZoGKY9jhFKFLvp1VB2mSony3mftp1P6F1txD
642+ hex![ "eeee65b0e5fd2a934353083cf31e0737ebd161a27cf9312be07177ad4ee0fb7e" ] . into( ) ,
643+ // a7RLS2NBBmYkT3PFdjxwRSVkVGJJaANJqCCHyouBwxcwyMenA
644+ hex![ "8e04d37a3692c00496060e068dd0b3933a5e98ab6abca77488637972b4ab0421" ] . into( ) ,
645+ // a7NJ1SZmHcBhDRboxU4XxaumwTB8Twmi3Qwnuqd2GbnrvY1PE
646+ hex![ "0776e1c83d2bcfe140e5a50aaf96d19d68f22fda9b6e14c84d4a0d15e4e6ad6a" ]
647+ . unchecked_into( ) ,
648+ // a7PTUVStVQg5n5VRmTaB9LLSEEdLKJdNGqLVzX6zYTMuabyXQ
649+ hex![ "3aeb61a30ffbe647e0dd6812ff0cf48a89239b693a824eeaa7c8bcc2ae81c11e" ]
650+ . unchecked_into( ) ,
651+ // a7PTUVStVQg5n5VRmTaB9LLSEEdLKJdNGqLVzX6zYTMuabyXQ
652+ hex![ "3aeb61a30ffbe647e0dd6812ff0cf48a89239b693a824eeaa7c8bcc2ae81c11e" ]
653+ . unchecked_into( ) ,
654+ // a7PTUVStVQg5n5VRmTaB9LLSEEdLKJdNGqLVzX6zYTMuabyXQ
655+ hex![ "3aeb61a30ffbe647e0dd6812ff0cf48a89239b693a824eeaa7c8bcc2ae81c11e" ]
656+ . unchecked_into( ) ,
657+ ) ,
658+ ] ;
659+
660+ let root_key: AccountId =
661+ AccountId :: from_ss58check ( "a7PywYxBDEBYTAfYPFGWEghzCFcTmp6fMvDR51sMMf2sotgAX" ) . unwrap ( ) ;
662+
663+ ( endowed_accounts, initial_authorities, root_key)
664+ }
665+
573666//TODO: we need to update contextfree spec when we want to launch it officially
574667#[ cfg( feature = "contextfree" ) ]
575668fn contextfree_config_genesis ( wasm_binary : & [ u8 ] ) -> contextfree:: GenesisConfig {
@@ -605,7 +698,7 @@ fn contextfree_config_genesis(wasm_binary: &[u8]) -> contextfree::GenesisConfig
605698 authorities : vec ! [ ] ,
606699 } ,
607700 staking : contextfree:: StakingConfig {
608- validator_count : 4 ,
701+ validator_count : 2 ,
609702 minimum_validator_count : 2 ,
610703 stakers : vec ! [ ] ,
611704 invulnerables : initial_authorities. iter ( ) . map ( |x| x. 0 . clone ( ) ) . collect ( ) ,
@@ -656,7 +749,7 @@ fn contextfree_config_genesis(wasm_binary: &[u8]) -> contextfree::GenesisConfig
656749
657750#[ cfg( feature = "finitestate" ) ]
658751fn finitestate_config_genesis ( wasm_binary : & [ u8 ] ) -> finitestate:: GenesisConfig {
659- let ( mut endowed_accounts, initial_authorities, root_key) = contextfree_genesis_accounts ( ) ;
752+ let ( mut endowed_accounts, initial_authorities, root_key) = finitestate_genesis_accounts ( ) ;
660753 endowed_accounts. push ( ( root_key. clone ( ) , 10000 * DOLLARS ) ) ;
661754
662755 initial_authorities. iter ( ) . for_each ( |x| {
0 commit comments