planetmint-go/x/machine/simulation/update_params.go
Jürgen Eckel b14f175eba
added UpdateParam messge for the machine module
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2024-02-26 11:02:50 +01:00

30 lines
877 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/machine/keeper"
"github.com/planetmint/planetmint-go/x/machine/types"
)
func SimulateMsgUpdateParams(
ak types.AccountKeeper,
bk types.BankKeeper,
k 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
}
}