planetmint-go/x/dao/simulation/distribution_request.go
Jürgen Eckel a982abecf5
Distribute assets (#162)
* distributed & result msgs
* added DistributionResult
* added RDDL token conversion methods
* set proper validatoraddress within the testcases for e2e/dao
* set proper root dir for test cases
* fixed some wordings
---------

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2023-11-15 13:31:20 +01:00

30 lines
893 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 SimulateMsgDistributionRequest(
_ 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.MsgDistributionRequest{
Creator: simAccount.Address.String(),
}
// TODO: Handling the DistributionRequest simulation
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "DistributionRequest simulation not implemented"), nil, nil
}
}