Genesis loading overwrites balances
Describe the bug
Balance of an account directly set in the fee token storage gets overwritten by the GenesisContractJson balance.
To Reproduce
- Fund a contract address by setting the storage var for the corresponding address in the fee token storage of the genesis.
- Load the genesis as is in Katana.
- Check the balance of the contract address. It will be 0 since it wasn't set in the
GenesisContractJson.
Expected behavior Would expect the balance to be the one I set in the fee token storage.
Thanks for the issue.
One issue with prioritizing the storage value over the balance field in the allocations entry, is that the fee token total supply may not be accurately configured bcs the total supply is calculated by summing up the balance value of all allocations.
The fix must include an implementation where the balances set directly in the storage mapping are taken into consideration when calculating the total supply of the fee token.
@kariy isn't something that has been fixed?