-
Notifications
You must be signed in to change notification settings - Fork 41
/
recover.go
31 lines (26 loc) · 979 Bytes
/
recover.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package simulation
import (
"math/rand"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
"github.com/aura-nw/aura/x/smartaccount/keeper"
"github.com/aura-nw/aura/x/smartaccount/types"
typesv1 "github.com/aura-nw/aura/x/smartaccount/types/v1beta1"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
)
func SimulateMsgRecover(
wk *wasmkeeper.PermissionedKeeper,
ak types.AccountKeeper,
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 := &typesv1.MsgRecover{
Creator: simAccount.Address.String(),
}
// TODO: Handling the UpdateKey simulation
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "UpdateKey simulation not implemented"), nil, nil
}
}