forked from cerc-io/laconicd-deprecated
bf54193669
* change basefee to a module params * add changelog and fix linter * change params type of basefee and remove default base fee * restaure event * clean code * fix proto * fix protos * fix logic * update rpc tests * fix comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
26 lines
792 B
Go
26 lines
792 B
Go
package simulation
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
|
|
"github.com/cosmos/cosmos-sdk/types/module"
|
|
|
|
"github.com/tharsis/ethermint/x/feemarket/types"
|
|
)
|
|
|
|
// RandomizedGenState generates a random GenesisState for nft
|
|
func RandomizedGenState(simState *module.SimulationState) {
|
|
params := types.NewParams(simState.Rand.Uint32()%2 == 0, simState.Rand.Uint32(), simState.Rand.Uint32(), simState.Rand.Uint64(), simState.Rand.Int63())
|
|
blockGas := simState.Rand.Uint64()
|
|
feemarketGenesis := types.NewGenesisState(params, blockGas)
|
|
|
|
bz, err := json.MarshalIndent(feemarketGenesis, "", " ")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
fmt.Printf("Selected randomly generated %s parameters:\n%s\n", types.ModuleName, bz)
|
|
|
|
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(feemarketGenesis)
|
|
}
|