planetmint-go/x/machine/simulation/attest_machine.go
Lorenz Herzberger 181907eeb4
ignite scaffold message attest-machine machine:Machine --module machine
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-03 14:40:45 +02:00

30 lines
835 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"
"planetmint-go/x/machine/keeper"
"planetmint-go/x/machine/types"
)
func SimulateMsgAttestMachine(
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.MsgAttestMachine{
Creator: simAccount.Address.String(),
}
// TODO: Handling the AttestMachine simulation
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "AttestMachine simulation not implemented"), nil, nil
}
}