I am learning substrate and just upgraded to the latest version 3.0. I have a fresh instance of the Substrate node template - using Substrate 3.0 and Frame 2.0 from GitHub.
I have built the library I am starting the node template with ./target/release/node-template --dev --tmp
the node starts fine creates blocks etc all looks fine.
I then go to Polkadot.js.org/app and the usual accounts we are used to seeing are there Alice Bob etc and a few stash accounts.
but all of the accounts have zero balance.
I cannot figure out how to set the account balances to non zero so that I can at least send transactions between accounts and I cannot figure out which Genesis block config is being used in chain_spec.rs as none of the account listings link up with the accounts shown in the polkadot.js app.
I am guessing that the config being used is this one since the accounts match the listing in the Polkadot.js app
The comment says prefunded accounts but I see no code to prefund them and I have no idea how to prefund them. With the previous version of the substrate-note-template the accounts where always just preloaded from the start.
I cannot even figure out which genesis config is being used as the accounts do not balance with any of these.
This is the closest but the Polkadot.js does not show the Charlie_Stash, Dave_Stash, Eve_Stash and Ferdie Stash accounts only the Alice and Bob Stash accounts are shown wherease this config has all Stash accounts for all of them.
pub fn local_testnet_config() -> Result<ChainSpec, String> {
let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm binary not available".to_string())?;
Ok(ChainSpec::from_genesis(
// Name
"Local Testnet",
// ID
"local_testnet",
ChainType::Local,
move || testnet_genesis(
wasm_binary,
// Initial PoA authorities
vec![
authority_keys_from_seed("Alice"),
authority_keys_from_seed("Bob"),
],
// Sudo account
get_account_id_from_seed::<sr25519::Public>("Alice"),
// Pre-funded accounts
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Charlie"),
get_account_id_from_seed::<sr25519::Public>("Dave"),
get_account_id_from_seed::<sr25519::Public>("Eve"),
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
],
true,
),
// Bootnodes
vec![],
// Telemetry
None,
// Protocol ID
None,
// Properties
None,
// Extensions
None,
))
}[![enter image description here][1]][1]