dojo icon indicating copy to clipboard operation
dojo copied to clipboard

Genesis loading overwrites balances

Open greged93 opened this issue 1 year ago • 2 comments

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.

greged93 avatar Feb 15 '24 14:02 greged93

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 avatar Feb 15 '24 14:02 kariy

@kariy isn't something that has been fixed?

glihm avatar Jun 19 '24 21:06 glihm