mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-06-04 13:16:39 +00:00

* ignite scaffold message report-pop-result challenge:Challenge --module dao * add issuePoPRewards and fix typo * add util validate struct and report pop test cases * add TODOs * replace depricated error * fix broken import * add error handler for failed pop issuance * add placeholder for validator is issuer check * added changed go.mod and go.sum * generate docs * reduce cognitive complexity --------- Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>
30 lines
877 B
Go
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/dao/keeper"
|
|
"github.com/planetmint/planetmint-go/x/dao/types"
|
|
)
|
|
|
|
func SimulateMsgReportPopResult(
|
|
_ 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.MsgReportPopResult{
|
|
Creator: simAccount.Address.String(),
|
|
}
|
|
|
|
// TODO: Handling the ReportPopResult simulation
|
|
|
|
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "ReportPopResult simulation not implemented"), nil, nil
|
|
}
|
|
}
|