Skip to content

Commit

Permalink
fix: distribution balance (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond authored Aug 27, 2024
1 parent 034dde7 commit 45852e8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions utils/update-genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ func UpdateGenesis(validatorBalance, homePath, genesisFilePath string) {
genesis.AppState.Auth.Accounts = append(genesis.AppState.Auth.Accounts, genesisInit.AppState.Auth.Accounts...)
genesis.AppState.Bank.Balances = append(genesis.AppState.Bank.Balances, genesisInit.AppState.Bank.Balances...)

// distrAddr := authtypes.NewModuleAddress("distribution").String()
distrAddr := authtypes.NewModuleAddress("distribution").String()

// addressDenomMap := map[string][]string{
// distrAddr: {"ibc/2180E84E20F5679FCC760D8C165B60F42065DEF7F46A72B447CFF1B7DC6C0A65", "ueden", "uedenb"},
// }
addressDenomMap := map[string][]string{
distrAddr: {"ibc/2180E84E20F5679FCC760D8C165B60F42065DEF7F46A72B447CFF1B7DC6C0A65", "ueden", "uedenb"},
}

genesis.AppState.Bank.Balances, coinsToRemove = FilterBalancesByDenoms(genesis.AppState.Bank.Balances, addressDenomMap)

// genesis.AppState.Bank.Balances, coinsToRemove = FilterBalancesByDenoms(genesis.AppState.Bank.Balances, addressDenomMap)
// update supply
genesis.AppState.Bank.Supply = genesis.AppState.Bank.Supply.Sub(coinsToRemove...)

// update bank params
genesis.AppState.Bank.Params.DefaultSendEnabled = true

// update supply
// genesis.AppState.Bank.Supply = genesis.AppState.Bank.Supply.Sub(coinsToRemove...)

// ColorReset staking data
stakingParams := genesis.AppState.Staking.Params
genesis.AppState.Staking = genesisInit.AppState.Staking
Expand Down

0 comments on commit 45852e8

Please sign in to comment.