Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
use cdc for marshaling
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze committed Apr 19, 2022
1 parent 300d671 commit 90aaede
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions app/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,7 @@ func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simty
}

stakingState := new(stakingtypes.GenesisState)
err = cdc.UnmarshalJSON(stakingStateBz, stakingState)
if err != nil {
panic(err)
}
cdc.MustUnmarshalJSON(stakingStateBz, stakingState)

// we should get the BondDenom and make it the evmdenom.
// thus simulation accounts could have positive amount of gas token.
Expand All @@ -154,10 +151,7 @@ func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simty
}

evmState := new(evmtypes.GenesisState)
err = cdc.UnmarshalJSON(evmStateBz, evmState)
if err != nil {
panic(err)
}
cdc.MustUnmarshalJSON(evmStateBz, evmState)

// we should replace the EvmDenom with BondDenom
evmState.Params.EvmDenom = bondDenom
Expand Down

0 comments on commit 90aaede

Please sign in to comment.