mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-05-19 21:36:38 +00:00

* add MintAddress to params.proto * ignite scaffold message update-params params:Params --module dao * add dao get and set params * make dao.MsgUpdateParams.Params non-nullable * use GetMintAddress in ante handler * adjust dao e2e test suit for mint address param * change msg creator to authority and set gov module as default in gov proposal * fix staticcheck error * remove depricated config param * fix linter errors Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
30 lines
867 B
Go
30 lines
867 B
Go
package simulation
|
|
|
|
import (
|
|
"math/rand"
|
|
|
|
"github.com/cosmos/cosmos-sdk/baseapp"
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
|
"github.com/planetmint/planetmint-go/x/dao/keeper"
|
|
"github.com/planetmint/planetmint-go/x/dao/types"
|
|
)
|
|
|
|
func SimulateMsgUpdateParams(
|
|
_ types.AccountKeeper,
|
|
_ types.BankKeeper,
|
|
_ keeper.Keeper,
|
|
) simtypes.Operation {
|
|
return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
|
|
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
|
|
simAccount, _ := simtypes.RandomAcc(r, accs)
|
|
msg := &types.MsgUpdateParams{
|
|
Authority: simAccount.Address.String(),
|
|
}
|
|
|
|
// TODO: Handling the UpdateParams simulation
|
|
|
|
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "UpdateParams simulation not implemented"), nil, nil
|
|
}
|
|
}
|