fn testnet_genesis(
	wasm_binary: &[u8],
	initial_authorities: Vec<(AuraId, GrandpaId)>,
	root_key: AccountId,
	endowed_accounts: Vec<AccountId>,
	_enable_println: bool,
) -> GenesisConfig {
	GenesisConfig {
		system: SystemConfig {
			// Add Wasm runtime to storage.
			code: wasm_binary.to_vec(),
			changes_trie_config: Default::default(),
		},
		balances: BalancesConfig {
			// Configure endowed accounts with initial balance of 1 << 60.
			balances: endowed_accounts
				.iter()
				.cloned()
				.map(|k| (k, 1 << 60))
				.collect(),
		},
		aura: AuraConfig {
			authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),
		},
		grandpa: GrandpaConfig {
			authorities: initial_authorities
				.iter()
				.map(|x| (x.1.clone(), 1))
				.collect(),
		},
		sudo: SudoConfig {
			// Assign network admin rights.
			key: root_key,
		},
		evm: EVMConfig {
			accounts: {
				let mut map = BTreeMap::new();
				map.insert(
					// H160 address of Alice dev account
					// Derived from SS58 (42 prefix) address
					// SS58: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
					// hex: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d
					// Using the full hex key, truncating to the first 20 bytes (the first 40 hex chars)
					H160::from_str("d43593c715fdd31c61141abd04a99fd6822c8558")
						.expect("internal H160 is valid; qed"),
					pallet_evm::GenesisAccount {
						balance: U256::from_str("0xffffffffffffffffffffffffffffffff")
							.expect("internal U256 is valid; qed"),
						code: Default::default(),
						nonce: Default::default(),
						storage: Default::default(),
					},
				);
				map.insert(
					// H160 address of CI test runner account
					H160::from_str("6be02d1d3665660d22ff9624b7be0551ee1ac91b")
						.expect("internal H160 is valid; qed"),
					pallet_evm::GenesisAccount {
						balance: U256::from_str("0xffffffffffffffffffffffffffffffff")
							.expect("internal U256 is valid; qed"),
						code: Default::default(),
						nonce: Default::default(),
						storage: Default::default(),
					},
				);
				map
			},
		},
		ethereum: EthereumConfig {},
		dynamic_fee: Default::default(),
	}
}
/// Configure initial storage state for FRAME modules.
Configure initial storage state for FRAME modules.
Configure initial storage state for FRAME modules .
fn testnet_genesis(
	wasm_binary: &[u8],
	initial_authorities: Vec<(AuraId, GrandpaId)>,
	root_key: AccountId,
	endowed_accounts: Vec<AccountId>,
	_enable_println: bool,
) -> GenesisConfig {
	GenesisConfig {
		system: SystemConfig {
			// Add Wasm runtime to storage.
			code: wasm_binary.to_vec(),
			changes_trie_config: Default::default(),
		},
		balances: BalancesConfig {
			// Configure endowed accounts with initial balance of 1 << 60.
			balances: endowed_accounts
				.iter()
				.cloned()
				.map(|k| (k, 1 << 60))
				.collect(),
		},
		aura: AuraConfig {
			authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),
		},
		grandpa: GrandpaConfig {
			authorities: initial_authorities
				.iter()
				.map(|x| (x.1.clone(), 1))
				.collect(),
		},
		sudo: SudoConfig {
			// Assign network admin rights.
			key: root_key,
		},
		evm: EVMConfig {
			accounts: {
				let mut map = BTreeMap::new();
				map.insert(
					// H160 address of Alice dev account
					// Derived from SS58 (42 prefix) address
					// SS58: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
					// hex: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d
					// Using the full hex key, truncating to the first 20 bytes (the first 40 hex chars)
					H160::from_str("d43593c715fdd31c61141abd04a99fd6822c8558")
						.expect("internal H160 is valid; qed"),
					pallet_evm::GenesisAccount {
						balance: U256::from_str("0xffffffffffffffffffffffffffffffff")
							.expect("internal U256 is valid; qed"),
						code: Default::default(),
						nonce: Default::default(),
						storage: Default::default(),
					},
				);
				map.insert(
					// H160 address of CI test runner account
					H160::from_str("6be02d1d3665660d22ff9624b7be0551ee1ac91b")
						.expect("internal H160 is valid; qed"),
					pallet_evm::GenesisAccount {
						balance: U256::from_str("0xffffffffffffffffffffffffffffffff")
							.expect("internal U256 is valid; qed"),
						code: Default::default(),
						nonce: Default::default(),
						storage: Default::default(),
					},
				);
				map
			},
		},
		ethereum: EthereumConfig {},
		dynamic_fee: Default::default(),
	}
}
fn testnet_genesis ( wasm_binary : & [ u8 ] , initial_authorities : Vec < ( AuraId , GrandpaId ) > , root_key : AccountId , endowed_accounts : Vec < AccountId > , _enable_println : bool , ) -> GenesisConfig { GenesisConfig { system : SystemConfig { // Add Wasm runtime to storage. code : wasm_binary . to_vec ( ) , changes_trie_config : Default :: default ( ) , } , balances : BalancesConfig { // Configure endowed accounts with initial balance of 1 << 60. balances : endowed_accounts . iter ( ) . cloned ( ) . map ( | k | ( k , 1 << 60 ) ) . collect ( ) , } , aura : AuraConfig { authorities : initial_authorities . iter ( ) . map ( | x | ( x . 0 . clone ( ) ) ) . collect ( ) , } , grandpa : GrandpaConfig { authorities : initial_authorities . iter ( ) . map ( | x | ( x . 1 . clone ( ) , 1 ) ) . collect ( ) , } , sudo : SudoConfig { // Assign network admin rights. key : root_key , } , evm : EVMConfig { accounts : { let mut map = BTreeMap :: new ( ) ; map . insert ( // H160 address of Alice dev account // Derived from SS58 (42 prefix) address // SS58: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY // hex: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d // Using the full hex key, truncating to the first 20 bytes (the first 40 hex chars) H160 :: from_str ( " " ) . expect ( " " ) , pallet_evm :: GenesisAccount { balance : U256 :: from_str ( " " ) . expect ( " " ) , code : Default :: default ( ) , nonce : Default :: default ( ) , storage : Default :: default ( ) , } , ) ; map . insert ( // H160 address of CI test runner account H160 :: from_str ( " " ) . expect ( " " ) , pallet_evm :: GenesisAccount { balance : U256 :: from_str ( " " ) . expect ( " " ) , code : Default :: default ( ) , nonce : Default :: default ( ) , storage : Default :: default ( ) , } , ) ; map } , } , ethereum : EthereumConfig { } , dynamic_fee : Default :: default ( ) , } }
Configure initial storage state for FRAME modules.
Configure initial storage state for FRAME modules .
wasm_binary
&[u8]
initial_authorities
Vec<(AuraId, GrandpaId)>
root_key
AccountId
endowed_accounts
Vec<AccountId>
_enable_println
bool