All the power to you now that you're getting the hang of things—by no means anything to show-off about, but may as well start somewhere !
This is intended for beginners just getting started and want to get familiar with customizing their chain. Not all configurations will follow the same approach—this in fact is the most basic approach. Learn more in the related material section.
Learn how to customize a chain's genesis configuration for the balances pallet.
Initialize balances for endowed accounts.
Genesis configuration is a useful tool for testing chain behaviour by defining an initial state for things such as accounts, balances, genesis for custom pallets, and more. Here is a simple guide on how to configure custom intial balances for a runtime, by modifying BalancesConfig in
chain_spec.rs, modify the accounts-to-amount map to apply it to the set of all endowed accounts (this is how every node template is set up):
Alternatively, write out each account you would like to pre-seed, as shown below:
By changing the right-hand-side value of the
balances tuple, you can customize the amount of each account. Take a look at the Rust documentation on how this is implemented. Let's modify things such that Alice's account is pre-seeded with 1<<10:
ContractsConfigfrom the Add the Contracts Pallet tutorial.