forked from cerc-io/laconicd-deprecated
620f6a6770
* add gasWanted transient store keys * add gasWanted transient store keeper functions * add gasWanted transient store tracker * add comment * remove unncesary comment * remove unnecesary function * fix tests * fix bad comment * remove unnecesary comment * update comment * update changelog * Update CHANGELOG.md Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * add GasWantedDecorator * remove unnecesary comments * gasWanted decorator test * fix tests * fix tests and build * fix lint * updated end block event * Update app/ante/fee_market.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix undeclared variable * Update app/ante/fee_market_test.go * remove unnecesary line * migrate MinGasMultiplier to FeeMarket module * set limited gas wanted * remove old newKeeper param * update proto comment * fix test * update comments * Update x/feemarket/keeper/abci.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * address comments from review * tidy * tests Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
28 lines
881 B
Go
28 lines
881 B
Go
package simulation
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"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(), sdk.ZeroDec(), types.DefaultMinGasMultiplier)
|
|
|
|
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)
|
|
}
|