mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-05-31 19:26:38 +00:00

* add mint address to config file * ignite scaffold type mint-request beneficiary amount liquid-tx-hash --module dao * add mintrequest stores * rename mint_request.go * add unit tests for mint request store * ignite scaffold message mint-token mint-request:MintRequest --module dao * add ante handler for mint address * add msg validation for mint request * fix staticcheck error * ignite scaffold query get-mint-requests-by-hash hash --response mint-request:MintRequest --module dao * add a query for mint request and additional validation for msg server * add mock for mint unit testing * add unit test for mint token msg server * add unit tests for query mint requests by hash * ignite scaffold query mint-requests-by-address address --response mint-requests:MintRequests --module dao * implement query mint requests by address and unit tests * add e2e test for token mint --------- Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
30 lines
855 B
Go
30 lines
855 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 SimulateMsgMintToken(
|
|
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.MsgMintToken{
|
|
Creator: simAccount.Address.String(),
|
|
}
|
|
|
|
// TODO: Handling the MintToken simulation
|
|
|
|
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "MintToken simulation not implemented"), nil, nil
|
|
}
|
|
}
|