cli
cli copied to clipboard
`network prepare`: support updating balance of existing genesis accounts in genesis
Is your feature request related to a problem? Please describe. For mainnet chain, a token distribution might be already defined in the initial genesis for the chain with special allocations. A account with token distribution might also redeem vouchers. Therefore, we must support in the genesis generation, increasing the balance of an already existing account.
Describe the solution you'd like
We currently use appd add-genesis-account ... in genesis generation to add genesis accounts from launch information.
Since add-genesis-account fails for accounts that already exist in the genesis we should instead update manually the genesis by searching and increasing the account balance.
We can:
- Always manually update the genesis by adding an entry for the account when it doesn't exist
- Only perform the manual update if the account already exists.
add-genesis-accountis used otherwise
Cons:
We should take care if some chains have additional logic in add-genesis-account other than updating the genesis. That could be the case for evm chains