refactor: export HasRegisterServices (backport #23488) (#23490)

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
mergify[bot] 2025-01-24 11:33:17 -05:00 committed by GitHub
parent 9508724a3c
commit 522a2baebd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
117 changed files with 694 additions and 493 deletions

View File

@ -59,6 +59,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (all) [#23445](https://github.com/cosmos/cosmos-sdk/pull/23445) Remove `v2` code from codebase.
* (codec) [#22988](https://github.com/cosmos/cosmos-sdk/pull/22988) Improve edge case handling for recursion limits.
* (proto) [#23437](https://github.com/cosmos/cosmos-sdk/pull/23437) Deprecate `Block` field from `GetBlockByHeightResponse` and return empty comet block for `GetBlockByHeight`.
* (module) [#23488](https://github.com/cosmos/cosmos-sdk/pull/23488) Remove CoreAppModuleAdaptor which is no longer used and add HasRegisterServices public interface.
### Bug Fixes

View File

@ -23,8 +23,8 @@ import (
"github.com/cosmos/gogoproto/jsonpb"
"github.com/cosmos/gogoproto/proto"
gogotypes "github.com/cosmos/gogoproto/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
coretesting "cosmossdk.io/core/testing"
errorsmod "cosmossdk.io/errors"

View File

@ -14,9 +14,9 @@ import (
protoio "github.com/cosmos/gogoproto/io"
"github.com/cosmos/gogoproto/proto"
gogotypes "github.com/cosmos/gogoproto/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/address"
"cosmossdk.io/core/comet"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: baseapp/abci_utils.go
//
// Generated by this command:
//
// mockgen -source=baseapp/abci_utils.go -package mock -destination baseapp/testutil/mock/mocks.go
//
// Package mock is a generated GoMock package.
package mock
@ -10,13 +15,14 @@ import (
types "github.com/cosmos/cosmos-sdk/crypto/types"
types0 "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockValidatorStore is a mock of ValidatorStore interface.
type MockValidatorStore struct {
ctrl *gomock.Controller
recorder *MockValidatorStoreMockRecorder
isgomock struct{}
}
// MockValidatorStoreMockRecorder is the mock recorder for MockValidatorStore.
@ -46,7 +52,7 @@ func (m *MockValidatorStore) GetPubKeyByConsAddr(arg0 context.Context, arg1 type
}
// GetPubKeyByConsAddr indicates an expected call of GetPubKeyByConsAddr.
func (mr *MockValidatorStoreMockRecorder) GetPubKeyByConsAddr(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockValidatorStoreMockRecorder) GetPubKeyByConsAddr(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPubKeyByConsAddr", reflect.TypeOf((*MockValidatorStore)(nil).GetPubKeyByConsAddr), arg0, arg1)
}
@ -55,6 +61,7 @@ func (mr *MockValidatorStoreMockRecorder) GetPubKeyByConsAddr(arg0, arg1 interfa
type MockGasTx struct {
ctrl *gomock.Controller
recorder *MockGasTxMockRecorder
isgomock struct{}
}
// MockGasTxMockRecorder is the mock recorder for MockGasTx.
@ -92,6 +99,7 @@ func (mr *MockGasTxMockRecorder) GetGas() *gomock.Call {
type MockProposalTxVerifier struct {
ctrl *gomock.Controller
recorder *MockProposalTxVerifierMockRecorder
isgomock struct{}
}
// MockProposalTxVerifierMockRecorder is the mock recorder for MockProposalTxVerifier.
@ -121,7 +129,7 @@ func (m *MockProposalTxVerifier) PrepareProposalVerifyTx(tx types0.Tx) ([]byte,
}
// PrepareProposalVerifyTx indicates an expected call of PrepareProposalVerifyTx.
func (mr *MockProposalTxVerifierMockRecorder) PrepareProposalVerifyTx(tx interface{}) *gomock.Call {
func (mr *MockProposalTxVerifierMockRecorder) PrepareProposalVerifyTx(tx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareProposalVerifyTx", reflect.TypeOf((*MockProposalTxVerifier)(nil).PrepareProposalVerifyTx), tx)
}
@ -136,7 +144,7 @@ func (m *MockProposalTxVerifier) ProcessProposalVerifyTx(txBz []byte) (types0.Tx
}
// ProcessProposalVerifyTx indicates an expected call of ProcessProposalVerifyTx.
func (mr *MockProposalTxVerifierMockRecorder) ProcessProposalVerifyTx(txBz interface{}) *gomock.Call {
func (mr *MockProposalTxVerifierMockRecorder) ProcessProposalVerifyTx(txBz any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessProposalVerifyTx", reflect.TypeOf((*MockProposalTxVerifier)(nil).ProcessProposalVerifyTx), txBz)
}
@ -151,7 +159,7 @@ func (m *MockProposalTxVerifier) TxDecode(txBz []byte) (types0.Tx, error) {
}
// TxDecode indicates an expected call of TxDecode.
func (mr *MockProposalTxVerifierMockRecorder) TxDecode(txBz interface{}) *gomock.Call {
func (mr *MockProposalTxVerifierMockRecorder) TxDecode(txBz any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TxDecode", reflect.TypeOf((*MockProposalTxVerifier)(nil).TxDecode), txBz)
}
@ -166,7 +174,7 @@ func (m *MockProposalTxVerifier) TxEncode(tx types0.Tx) ([]byte, error) {
}
// TxEncode indicates an expected call of TxEncode.
func (mr *MockProposalTxVerifierMockRecorder) TxEncode(tx interface{}) *gomock.Call {
func (mr *MockProposalTxVerifierMockRecorder) TxEncode(tx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TxEncode", reflect.TypeOf((*MockProposalTxVerifier)(nil).TxEncode), tx)
}
@ -175,6 +183,7 @@ func (mr *MockProposalTxVerifierMockRecorder) TxEncode(tx interface{}) *gomock.C
type MockTxSelector struct {
ctrl *gomock.Controller
recorder *MockTxSelectorMockRecorder
isgomock struct{}
}
// MockTxSelectorMockRecorder is the mock recorder for MockTxSelector.
@ -215,7 +224,7 @@ func (m *MockTxSelector) SelectTxForProposal(ctx context.Context, maxTxBytes, ma
}
// SelectTxForProposal indicates an expected call of SelectTxForProposal.
func (mr *MockTxSelectorMockRecorder) SelectTxForProposal(ctx, maxTxBytes, maxBlockGas, memTx, txBz interface{}) *gomock.Call {
func (mr *MockTxSelectorMockRecorder) SelectTxForProposal(ctx, maxTxBytes, maxBlockGas, memTx, txBz any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectTxForProposal", reflect.TypeOf((*MockTxSelector)(nil).SelectTxForProposal), ctx, maxTxBytes, maxBlockGas, memTx, txBz)
}
@ -229,7 +238,7 @@ func (m *MockTxSelector) SelectedTxs(ctx context.Context) [][]byte {
}
// SelectedTxs indicates an expected call of SelectedTxs.
func (mr *MockTxSelectorMockRecorder) SelectedTxs(ctx interface{}) *gomock.Call {
func (mr *MockTxSelectorMockRecorder) SelectedTxs(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectedTxs", reflect.TypeOf((*MockTxSelector)(nil).SelectedTxs), ctx)
}

1
go.mod
View File

@ -29,7 +29,6 @@ require (
github.com/cosmos/gogoproto v1.7.0
github.com/cosmos/ledger-cosmos-go v0.14.0
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.4
github.com/google/go-cmp v0.6.0
github.com/gorilla/handlers v1.5.2

4
go.sum
View File

@ -507,7 +507,6 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v1.0.0 h1:BvNoksIyRqyQTW78rIZP9A44WwAminKiomQa7jXp9EI=
@ -557,7 +556,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -589,7 +587,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -647,7 +644,6 @@ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@ -8,7 +8,6 @@ import (
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtcrypto "github.com/cometbft/cometbft/crypto"
cmted25519 "github.com/cometbft/cometbft/crypto/ed25519"
"google.golang.org/grpc"
runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
"cosmossdk.io/core/appmodule"
@ -25,7 +24,6 @@ import (
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/server/api"
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/auth/ante/unorderedtx"
@ -86,8 +84,8 @@ func (a *App) RegisterModules(modules ...module.AppModule) error {
if mod, ok := appModule.(module.HasServices); ok {
mod.RegisterServices(a.configurator)
} else if module, ok := appModule.(hasServicesV1); ok {
if err := module.RegisterServices(a.configurator); err != nil {
} else if mod, ok := appModule.(module.HasRegisterServices); ok {
if err := mod.RegisterServices(a.configurator); err != nil {
return err
}
}
@ -306,14 +304,6 @@ func (a *App) UnsafeFindStoreKey(storeKey string) storetypes.StoreKey {
return a.storeKeys[i]
}
var _ servertypes.Application = &App{}
// hasServicesV1 is the interface for registering service in baseapp Cosmos SDK.
// This API is part of core/appmodule but commented out for dependencies.
type hasServicesV1 interface {
RegisterServices(grpc.ServiceRegistrar) error
}
// ValidatorKeyProvider returns a function that generates a private key for use by comet.
func (a *App) ValidatorKeyProvider() KeyGenF {
return func() (cmtcrypto.PrivKey, error) {

View File

@ -8,8 +8,8 @@ import (
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/cosmos/gogoproto/proto"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"google.golang.org/grpc"
"cosmossdk.io/core/appmodule"

View File

@ -41,7 +41,6 @@ require (
// this version is not used as it is always replaced by the latest Cosmos SDK version
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/jackc/pgx/v5 v5.7.1
github.com/spf13/cast v1.7.1
github.com/spf13/cobra v1.8.1
@ -52,6 +51,8 @@ require (
google.golang.org/protobuf v1.36.3
)
require go.uber.org/mock v0.5.0
require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.36.2-20241120201313-68e42a58b301.1 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.36.2-20240130113600-88ef6483f90f.1 // indirect

View File

@ -55,7 +55,7 @@ require (
require (
cosmossdk.io/core/testing v0.0.1
github.com/golang/mock v1.6.0
go.uber.org/mock v0.5.0
)
require (

View File

@ -4,7 +4,7 @@ import (
"context"
"testing"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"gotest.tools/v3/assert"
"pgregory.net/rapid"

View File

@ -5,8 +5,8 @@ import (
"fmt"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"gotest.tools/v3/assert"
"cosmossdk.io/collections"

View File

@ -4,8 +4,8 @@ import (
"context"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/comet"
coretesting "cosmossdk.io/core/testing"

View File

@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"gotest.tools/v3/assert"
"cosmossdk.io/collections"

View File

@ -6,8 +6,8 @@ import (
"io"
"testing"
"github.com/golang/mock/gomock"
"github.com/google/go-cmp/cmp"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/appmodule"
"cosmossdk.io/log"

View File

@ -4,7 +4,7 @@ import (
"context"
"testing"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/appmodule"
"cosmossdk.io/log"

View File

@ -5,8 +5,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"gotest.tools/v3/assert"
"cosmossdk.io/core/appmodule"

View File

@ -5,7 +5,7 @@ import (
"math/big"
"testing"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"gotest.tools/v3/assert"
"cosmossdk.io/core/appmodule"

View File

@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"gotest.tools/v3/assert"
"pgregory.net/rapid"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: client/account_retriever.go
//
// Generated by this command:
//
// mockgen -source=client/account_retriever.go -package mock -destination testutil/mock/account_retriever.go
//
// Package mock is a generated GoMock package.
package mock
@ -10,13 +15,14 @@ import (
client "github.com/cosmos/cosmos-sdk/client"
types "github.com/cosmos/cosmos-sdk/crypto/types"
types0 "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccount is a mock of Account interface.
type MockAccount struct {
ctrl *gomock.Controller
recorder *MockAccountMockRecorder
isgomock struct{}
}
// MockAccountMockRecorder is the mock recorder for MockAccount.
@ -96,6 +102,7 @@ func (mr *MockAccountMockRecorder) GetSequence() *gomock.Call {
type MockAccountRetriever struct {
ctrl *gomock.Controller
recorder *MockAccountRetrieverMockRecorder
isgomock struct{}
}
// MockAccountRetrieverMockRecorder is the mock recorder for MockAccountRetriever.
@ -124,7 +131,7 @@ func (m *MockAccountRetriever) EnsureExists(clientCtx client.Context, addr types
}
// EnsureExists indicates an expected call of EnsureExists.
func (mr *MockAccountRetrieverMockRecorder) EnsureExists(clientCtx, addr interface{}) *gomock.Call {
func (mr *MockAccountRetrieverMockRecorder) EnsureExists(clientCtx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureExists", reflect.TypeOf((*MockAccountRetriever)(nil).EnsureExists), clientCtx, addr)
}
@ -139,7 +146,7 @@ func (m *MockAccountRetriever) GetAccount(clientCtx client.Context, addr types0.
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountRetrieverMockRecorder) GetAccount(clientCtx, addr interface{}) *gomock.Call {
func (mr *MockAccountRetrieverMockRecorder) GetAccount(clientCtx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountRetriever)(nil).GetAccount), clientCtx, addr)
}
@ -155,7 +162,7 @@ func (m *MockAccountRetriever) GetAccountNumberSequence(clientCtx client.Context
}
// GetAccountNumberSequence indicates an expected call of GetAccountNumberSequence.
func (mr *MockAccountRetrieverMockRecorder) GetAccountNumberSequence(clientCtx, addr interface{}) *gomock.Call {
func (mr *MockAccountRetrieverMockRecorder) GetAccountNumberSequence(clientCtx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountNumberSequence", reflect.TypeOf((*MockAccountRetriever)(nil).GetAccountNumberSequence), clientCtx, addr)
}
@ -171,7 +178,7 @@ func (m *MockAccountRetriever) GetAccountWithHeight(clientCtx client.Context, ad
}
// GetAccountWithHeight indicates an expected call of GetAccountWithHeight.
func (mr *MockAccountRetrieverMockRecorder) GetAccountWithHeight(clientCtx, addr interface{}) *gomock.Call {
func (mr *MockAccountRetrieverMockRecorder) GetAccountWithHeight(clientCtx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountWithHeight", reflect.TypeOf((*MockAccountRetriever)(nil).GetAccountWithHeight), clientCtx, addr)
}

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/cosmos/gogoproto/grpc (interfaces: Server)
//
// Generated by this command:
//
// mockgen -package mock -destination testutil/mock/grpc_server.go github.com/cosmos/gogoproto/grpc Server
//
// Package mock is a generated GoMock package.
package mock
@ -7,7 +12,7 @@ package mock
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
grpc "google.golang.org/grpc"
)
@ -15,6 +20,7 @@ import (
type MockServer struct {
ctrl *gomock.Controller
recorder *MockServerMockRecorder
isgomock struct{}
}
// MockServerMockRecorder is the mock recorder for MockServer.
@ -35,13 +41,13 @@ func (m *MockServer) EXPECT() *MockServerMockRecorder {
}
// RegisterService mocks base method.
func (m *MockServer) RegisterService(arg0 *grpc.ServiceDesc, arg1 interface{}) {
func (m *MockServer) RegisterService(sd *grpc.ServiceDesc, ss any) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RegisterService", arg0, arg1)
m.ctrl.Call(m, "RegisterService", sd, ss)
}
// RegisterService indicates an expected call of RegisterService.
func (mr *MockServerMockRecorder) RegisterService(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockServerMockRecorder) RegisterService(sd, ss any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterService", reflect.TypeOf((*MockServer)(nil).RegisterService), arg0, arg1)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterService", reflect.TypeOf((*MockServer)(nil).RegisterService), sd, ss)
}

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: cosmossdk.io/log (interfaces: Logger)
//
// Generated by this command:
//
// mockgen -package mock -destination testutil/mock/logger.go cosmossdk.io/log Logger
//
// Package mock is a generated GoMock package.
package mock
@ -8,13 +13,14 @@ import (
reflect "reflect"
log "cosmossdk.io/log"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockLogger is a mock of Logger interface.
type MockLogger struct {
ctrl *gomock.Controller
recorder *MockLoggerMockRecorder
isgomock struct{}
}
// MockLoggerMockRecorder is the mock recorder for MockLogger.
@ -35,44 +41,44 @@ func (m *MockLogger) EXPECT() *MockLoggerMockRecorder {
}
// Debug mocks base method.
func (m *MockLogger) Debug(arg0 string, arg1 ...interface{}) {
func (m *MockLogger) Debug(msg string, keyVals ...any) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs := []any{msg}
for _, a := range keyVals {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "Debug", varargs...)
}
// Debug indicates an expected call of Debug.
func (mr *MockLoggerMockRecorder) Debug(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
func (mr *MockLoggerMockRecorder) Debug(msg any, keyVals ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
varargs := append([]any{msg}, keyVals...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockLogger)(nil).Debug), varargs...)
}
// Error mocks base method.
func (m *MockLogger) Error(arg0 string, arg1 ...interface{}) {
func (m *MockLogger) Error(msg string, keyVals ...any) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs := []any{msg}
for _, a := range keyVals {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "Error", varargs...)
}
// Error indicates an expected call of Error.
func (mr *MockLoggerMockRecorder) Error(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
func (mr *MockLoggerMockRecorder) Error(msg any, keyVals ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
varargs := append([]any{msg}, keyVals...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Error", reflect.TypeOf((*MockLogger)(nil).Error), varargs...)
}
// Impl mocks base method.
func (m *MockLogger) Impl() interface{} {
func (m *MockLogger) Impl() any {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Impl")
ret0, _ := ret[0].(interface{})
ret0, _ := ret[0].(any)
return ret0
}
@ -83,44 +89,44 @@ func (mr *MockLoggerMockRecorder) Impl() *gomock.Call {
}
// Info mocks base method.
func (m *MockLogger) Info(arg0 string, arg1 ...interface{}) {
func (m *MockLogger) Info(msg string, keyVals ...any) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs := []any{msg}
for _, a := range keyVals {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "Info", varargs...)
}
// Info indicates an expected call of Info.
func (mr *MockLoggerMockRecorder) Info(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
func (mr *MockLoggerMockRecorder) Info(msg any, keyVals ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
varargs := append([]any{msg}, keyVals...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockLogger)(nil).Info), varargs...)
}
// Warn mocks base method.
func (m *MockLogger) Warn(arg0 string, arg1 ...interface{}) {
func (m *MockLogger) Warn(msg string, keyVals ...any) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs := []any{msg}
for _, a := range keyVals {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "Warn", varargs...)
}
// Warn indicates an expected call of Warn.
func (mr *MockLoggerMockRecorder) Warn(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
func (mr *MockLoggerMockRecorder) Warn(msg any, keyVals ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
varargs := append([]any{msg}, keyVals...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warn", reflect.TypeOf((*MockLogger)(nil).Warn), varargs...)
}
// With mocks base method.
func (m *MockLogger) With(arg0 ...interface{}) log.Logger {
func (m *MockLogger) With(keyVals ...any) log.Logger {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range arg0 {
varargs := []any{}
for _, a := range keyVals {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "With", varargs...)
@ -129,7 +135,7 @@ func (m *MockLogger) With(arg0 ...interface{}) log.Logger {
}
// With indicates an expected call of With.
func (mr *MockLoggerMockRecorder) With(arg0 ...interface{}) *gomock.Call {
func (mr *MockLoggerMockRecorder) With(keyVals ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MockLogger)(nil).With), arg0...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MockLogger)(nil).With), keyVals...)
}

View File

@ -10,7 +10,7 @@ package mock
import (
"reflect"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"github.com/cosmos/cosmos-sdk/types"
)

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: types/invariant.go
//
// Generated by this command:
//
// mockgen -source=types/invariant.go -package mock -destination testutil/mock/types_invariant.go
//
// Package mock is a generated GoMock package.
package mock
@ -8,13 +13,14 @@ import (
reflect "reflect"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockInvariantRegistry is a mock of InvariantRegistry interface.
type MockInvariantRegistry struct {
ctrl *gomock.Controller
recorder *MockInvariantRegistryMockRecorder
isgomock struct{}
}
// MockInvariantRegistryMockRecorder is the mock recorder for MockInvariantRegistry.
@ -41,7 +47,7 @@ func (m *MockInvariantRegistry) RegisterRoute(moduleName, route string, invar ty
}
// RegisterRoute indicates an expected call of RegisterRoute.
func (mr *MockInvariantRegistryMockRecorder) RegisterRoute(moduleName, route, invar interface{}) *gomock.Call {
func (mr *MockInvariantRegistryMockRecorder) RegisterRoute(moduleName, route, invar any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRoute", reflect.TypeOf((*MockInvariantRegistry)(nil).RegisterRoute), moduleName, route, invar)
}

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: types/module/mock_appmodule_test.go
//
// Generated by this command:
//
// mockgen -source=types/module/mock_appmodule_test.go -package mock -destination testutil/mock/types_mock_appmodule.go
//
// Package mock is a generated GoMock package.
package mock
@ -12,13 +17,14 @@ import (
appmodule "cosmossdk.io/core/appmodule"
appmodulev2 "cosmossdk.io/core/appmodule/v2"
module "github.com/cosmos/cosmos-sdk/types/module"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAppModuleWithAllExtensions is a mock of AppModuleWithAllExtensions interface.
type MockAppModuleWithAllExtensions struct {
ctrl *gomock.Controller
recorder *MockAppModuleWithAllExtensionsMockRecorder
isgomock struct{}
}
// MockAppModuleWithAllExtensionsMockRecorder is the mock recorder for MockAppModuleWithAllExtensions.
@ -76,7 +82,7 @@ func (m *MockAppModuleWithAllExtensions) EndBlock(arg0 context.Context) ([]modul
}
// EndBlock indicates an expected call of EndBlock.
func (mr *MockAppModuleWithAllExtensionsMockRecorder) EndBlock(arg0 interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsMockRecorder) EndBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).EndBlock), arg0)
}
@ -91,7 +97,7 @@ func (m *MockAppModuleWithAllExtensions) ExportGenesis(ctx context.Context) (jso
}
// ExportGenesis indicates an expected call of ExportGenesis.
func (mr *MockAppModuleWithAllExtensionsMockRecorder) ExportGenesis(ctx interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsMockRecorder) ExportGenesis(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).ExportGenesis), ctx)
}
@ -105,7 +111,7 @@ func (m *MockAppModuleWithAllExtensions) InitGenesis(ctx context.Context, data j
}
// InitGenesis indicates an expected call of InitGenesis.
func (mr *MockAppModuleWithAllExtensionsMockRecorder) InitGenesis(ctx, data interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsMockRecorder) InitGenesis(ctx, data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).InitGenesis), ctx, data)
}
@ -155,7 +161,7 @@ func (m *MockAppModuleWithAllExtensions) RegisterServices(arg0 module.Configurat
}
// RegisterServices indicates an expected call of RegisterServices.
func (mr *MockAppModuleWithAllExtensionsMockRecorder) RegisterServices(arg0 interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsMockRecorder) RegisterServices(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterServices", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).RegisterServices), arg0)
}
@ -169,7 +175,7 @@ func (m *MockAppModuleWithAllExtensions) ValidateGenesis(data json.RawMessage) e
}
// ValidateGenesis indicates an expected call of ValidateGenesis.
func (mr *MockAppModuleWithAllExtensionsMockRecorder) ValidateGenesis(data interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsMockRecorder) ValidateGenesis(data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensions)(nil).ValidateGenesis), data)
}
@ -178,6 +184,7 @@ func (mr *MockAppModuleWithAllExtensionsMockRecorder) ValidateGenesis(data inter
type MockAppModuleWithAllExtensionsABCI struct {
ctrl *gomock.Controller
recorder *MockAppModuleWithAllExtensionsABCIMockRecorder
isgomock struct{}
}
// MockAppModuleWithAllExtensionsABCIMockRecorder is the mock recorder for MockAppModuleWithAllExtensionsABCI.
@ -206,7 +213,7 @@ func (m *MockAppModuleWithAllExtensionsABCI) BeginBlock(arg0 context.Context) er
}
// BeginBlock indicates an expected call of BeginBlock.
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) BeginBlock(arg0 interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) BeginBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginBlock", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).BeginBlock), arg0)
}
@ -249,7 +256,7 @@ func (m *MockAppModuleWithAllExtensionsABCI) EndBlock(arg0 context.Context) ([]m
}
// EndBlock indicates an expected call of EndBlock.
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) EndBlock(arg0 interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) EndBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).EndBlock), arg0)
}
@ -264,7 +271,7 @@ func (m *MockAppModuleWithAllExtensionsABCI) ExportGenesis(ctx context.Context)
}
// ExportGenesis indicates an expected call of ExportGenesis.
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ExportGenesis(ctx interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ExportGenesis(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ExportGenesis), ctx)
}
@ -279,7 +286,7 @@ func (m *MockAppModuleWithAllExtensionsABCI) InitGenesis(ctx context.Context, da
}
// InitGenesis indicates an expected call of InitGenesis.
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) InitGenesis(ctx, data interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) InitGenesis(ctx, data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).InitGenesis), ctx, data)
}
@ -329,7 +336,7 @@ func (m *MockAppModuleWithAllExtensionsABCI) RegisterServices(arg0 module.Config
}
// RegisterServices indicates an expected call of RegisterServices.
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterServices(arg0 interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) RegisterServices(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterServices", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).RegisterServices), arg0)
}
@ -343,7 +350,7 @@ func (m *MockAppModuleWithAllExtensionsABCI) ValidateGenesis(data json.RawMessag
}
// ValidateGenesis indicates an expected call of ValidateGenesis.
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ValidateGenesis(data interface{}) *gomock.Call {
func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ValidateGenesis(data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockAppModuleWithAllExtensionsABCI)(nil).ValidateGenesis), data)
}
@ -352,6 +359,7 @@ func (mr *MockAppModuleWithAllExtensionsABCIMockRecorder) ValidateGenesis(data i
type MockCoreAppModule struct {
ctrl *gomock.Controller
recorder *MockCoreAppModuleMockRecorder
isgomock struct{}
}
// MockCoreAppModuleMockRecorder is the mock recorder for MockCoreAppModule.
@ -380,7 +388,7 @@ func (m *MockCoreAppModule) BeginBlock(arg0 context.Context) error {
}
// BeginBlock indicates an expected call of BeginBlock.
func (mr *MockCoreAppModuleMockRecorder) BeginBlock(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleMockRecorder) BeginBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginBlock", reflect.TypeOf((*MockCoreAppModule)(nil).BeginBlock), arg0)
}
@ -394,7 +402,7 @@ func (m *MockCoreAppModule) DefaultGenesis(arg0 appmodule.GenesisTarget) error {
}
// DefaultGenesis indicates an expected call of DefaultGenesis.
func (mr *MockCoreAppModuleMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleMockRecorder) DefaultGenesis(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockCoreAppModule)(nil).DefaultGenesis), arg0)
}
@ -408,7 +416,7 @@ func (m *MockCoreAppModule) EndBlock(arg0 context.Context) error {
}
// EndBlock indicates an expected call of EndBlock.
func (mr *MockCoreAppModuleMockRecorder) EndBlock(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleMockRecorder) EndBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockCoreAppModule)(nil).EndBlock), arg0)
}
@ -422,7 +430,7 @@ func (m *MockCoreAppModule) ExportGenesis(arg0 context.Context, arg1 appmodule.G
}
// ExportGenesis indicates an expected call of ExportGenesis.
func (mr *MockCoreAppModuleMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleMockRecorder) ExportGenesis(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockCoreAppModule)(nil).ExportGenesis), arg0, arg1)
}
@ -436,7 +444,7 @@ func (m *MockCoreAppModule) InitGenesis(arg0 context.Context, arg1 appmodule.Gen
}
// InitGenesis indicates an expected call of InitGenesis.
func (mr *MockCoreAppModuleMockRecorder) InitGenesis(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleMockRecorder) InitGenesis(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockCoreAppModule)(nil).InitGenesis), arg0, arg1)
}
@ -474,7 +482,7 @@ func (m *MockCoreAppModule) Precommit(arg0 context.Context) error {
}
// Precommit indicates an expected call of Precommit.
func (mr *MockCoreAppModuleMockRecorder) Precommit(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleMockRecorder) Precommit(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Precommit", reflect.TypeOf((*MockCoreAppModule)(nil).Precommit), arg0)
}
@ -488,7 +496,7 @@ func (m *MockCoreAppModule) PrepareCheckState(arg0 context.Context) error {
}
// PrepareCheckState indicates an expected call of PrepareCheckState.
func (mr *MockCoreAppModuleMockRecorder) PrepareCheckState(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleMockRecorder) PrepareCheckState(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCheckState", reflect.TypeOf((*MockCoreAppModule)(nil).PrepareCheckState), arg0)
}
@ -502,7 +510,7 @@ func (m *MockCoreAppModule) ValidateGenesis(arg0 appmodule.GenesisSource) error
}
// ValidateGenesis indicates an expected call of ValidateGenesis.
func (mr *MockCoreAppModuleMockRecorder) ValidateGenesis(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleMockRecorder) ValidateGenesis(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockCoreAppModule)(nil).ValidateGenesis), arg0)
}
@ -511,6 +519,7 @@ func (mr *MockCoreAppModuleMockRecorder) ValidateGenesis(arg0 interface{}) *gomo
type MockCoreAppModuleWithPreBlock struct {
ctrl *gomock.Controller
recorder *MockCoreAppModuleWithPreBlockMockRecorder
isgomock struct{}
}
// MockCoreAppModuleWithPreBlockMockRecorder is the mock recorder for MockCoreAppModuleWithPreBlock.
@ -539,7 +548,7 @@ func (m *MockCoreAppModuleWithPreBlock) BeginBlock(arg0 context.Context) error {
}
// BeginBlock indicates an expected call of BeginBlock.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) BeginBlock(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) BeginBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginBlock", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).BeginBlock), arg0)
}
@ -553,7 +562,7 @@ func (m *MockCoreAppModuleWithPreBlock) DefaultGenesis(arg0 appmodule.GenesisTar
}
// DefaultGenesis indicates an expected call of DefaultGenesis.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) DefaultGenesis(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) DefaultGenesis(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultGenesis", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).DefaultGenesis), arg0)
}
@ -567,7 +576,7 @@ func (m *MockCoreAppModuleWithPreBlock) EndBlock(arg0 context.Context) error {
}
// EndBlock indicates an expected call of EndBlock.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) EndBlock(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) EndBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).EndBlock), arg0)
}
@ -581,7 +590,7 @@ func (m *MockCoreAppModuleWithPreBlock) ExportGenesis(arg0 context.Context, arg1
}
// ExportGenesis indicates an expected call of ExportGenesis.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) ExportGenesis(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) ExportGenesis(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExportGenesis", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).ExportGenesis), arg0, arg1)
}
@ -595,7 +604,7 @@ func (m *MockCoreAppModuleWithPreBlock) InitGenesis(arg0 context.Context, arg1 a
}
// InitGenesis indicates an expected call of InitGenesis.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) InitGenesis(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) InitGenesis(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitGenesis", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).InitGenesis), arg0, arg1)
}
@ -633,7 +642,7 @@ func (m *MockCoreAppModuleWithPreBlock) PreBlock(arg0 context.Context) error {
}
// PreBlock indicates an expected call of PreBlock.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) PreBlock(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) PreBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreBlock", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).PreBlock), arg0)
}
@ -647,7 +656,7 @@ func (m *MockCoreAppModuleWithPreBlock) Precommit(arg0 context.Context) error {
}
// Precommit indicates an expected call of Precommit.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) Precommit(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) Precommit(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Precommit", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).Precommit), arg0)
}
@ -661,7 +670,7 @@ func (m *MockCoreAppModuleWithPreBlock) PrepareCheckState(arg0 context.Context)
}
// PrepareCheckState indicates an expected call of PrepareCheckState.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) PrepareCheckState(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) PrepareCheckState(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareCheckState", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).PrepareCheckState), arg0)
}
@ -675,7 +684,7 @@ func (m *MockCoreAppModuleWithPreBlock) ValidateGenesis(arg0 appmodule.GenesisSo
}
// ValidateGenesis indicates an expected call of ValidateGenesis.
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) ValidateGenesis(arg0 interface{}) *gomock.Call {
func (mr *MockCoreAppModuleWithPreBlockMockRecorder) ValidateGenesis(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateGenesis", reflect.TypeOf((*MockCoreAppModuleWithPreBlock)(nil).ValidateGenesis), arg0)
}

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: types/module/module.go
//
// Generated by this command:
//
// mockgen -source=types/module/module.go -package mock -destination testutil/mock/types_module_module.go
//
// Package mock is a generated GoMock package.
package mock
@ -12,8 +17,8 @@ import (
client "github.com/cosmos/cosmos-sdk/client"
types "github.com/cosmos/cosmos-sdk/types"
module "github.com/cosmos/cosmos-sdk/types/module"
gomock "github.com/golang/mock/gomock"
runtime "github.com/grpc-ecosystem/grpc-gateway/runtime"
gomock "go.uber.org/mock/gomock"
grpc "google.golang.org/grpc"
)
@ -21,6 +26,7 @@ import (
type MockAppModuleBasic struct {
ctrl *gomock.Controller
recorder *MockAppModuleBasicMockRecorder
isgomock struct{}
}
// MockAppModuleBasicMockRecorder is the mock recorder for MockAppModuleBasic.
@ -47,7 +53,7 @@ func (m *MockAppModuleBasic) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1
}
// RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes.
func (mr *MockAppModuleBasicMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAppModuleBasicMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockAppModuleBasic)(nil).RegisterGRPCGatewayRoutes), arg0, arg1)
}
@ -59,7 +65,7 @@ func (m *MockAppModuleBasic) RegisterLegacyAminoCodec(arg0 registry.AminoRegistr
}
// RegisterLegacyAminoCodec indicates an expected call of RegisterLegacyAminoCodec.
func (mr *MockAppModuleBasicMockRecorder) RegisterLegacyAminoCodec(arg0 interface{}) *gomock.Call {
func (mr *MockAppModuleBasicMockRecorder) RegisterLegacyAminoCodec(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockAppModuleBasic)(nil).RegisterLegacyAminoCodec), arg0)
}
@ -68,6 +74,7 @@ func (mr *MockAppModuleBasicMockRecorder) RegisterLegacyAminoCodec(arg0 interfac
type MockAppModule struct {
ctrl *gomock.Controller
recorder *MockAppModuleMockRecorder
isgomock struct{}
}
// MockAppModuleMockRecorder is the mock recorder for MockAppModule.
@ -129,6 +136,7 @@ func (mr *MockAppModuleMockRecorder) Name() *gomock.Call {
type MockHasAminoCodec struct {
ctrl *gomock.Controller
recorder *MockHasAminoCodecMockRecorder
isgomock struct{}
}
// MockHasAminoCodecMockRecorder is the mock recorder for MockHasAminoCodec.
@ -155,7 +163,7 @@ func (m *MockHasAminoCodec) RegisterLegacyAminoCodec(arg0 registry.AminoRegistra
}
// RegisterLegacyAminoCodec indicates an expected call of RegisterLegacyAminoCodec.
func (mr *MockHasAminoCodecMockRecorder) RegisterLegacyAminoCodec(arg0 interface{}) *gomock.Call {
func (mr *MockHasAminoCodecMockRecorder) RegisterLegacyAminoCodec(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterLegacyAminoCodec", reflect.TypeOf((*MockHasAminoCodec)(nil).RegisterLegacyAminoCodec), arg0)
}
@ -164,6 +172,7 @@ func (mr *MockHasAminoCodecMockRecorder) RegisterLegacyAminoCodec(arg0 interface
type MockHasGRPCGateway struct {
ctrl *gomock.Controller
recorder *MockHasGRPCGatewayMockRecorder
isgomock struct{}
}
// MockHasGRPCGatewayMockRecorder is the mock recorder for MockHasGRPCGateway.
@ -190,7 +199,7 @@ func (m *MockHasGRPCGateway) RegisterGRPCGatewayRoutes(arg0 client.Context, arg1
}
// RegisterGRPCGatewayRoutes indicates an expected call of RegisterGRPCGatewayRoutes.
func (mr *MockHasGRPCGatewayMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockHasGRPCGatewayMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterGRPCGatewayRoutes", reflect.TypeOf((*MockHasGRPCGateway)(nil).RegisterGRPCGatewayRoutes), arg0, arg1)
}
@ -199,6 +208,7 @@ func (mr *MockHasGRPCGatewayMockRecorder) RegisterGRPCGatewayRoutes(arg0, arg1 i
type MockHasInvariants struct {
ctrl *gomock.Controller
recorder *MockHasInvariantsMockRecorder
isgomock struct{}
}
// MockHasInvariantsMockRecorder is the mock recorder for MockHasInvariants.
@ -225,7 +235,7 @@ func (m *MockHasInvariants) RegisterInvariants(arg0 types.InvariantRegistry) {
}
// RegisterInvariants indicates an expected call of RegisterInvariants.
func (mr *MockHasInvariantsMockRecorder) RegisterInvariants(arg0 interface{}) *gomock.Call {
func (mr *MockHasInvariantsMockRecorder) RegisterInvariants(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInvariants", reflect.TypeOf((*MockHasInvariants)(nil).RegisterInvariants), arg0)
}
@ -234,6 +244,7 @@ func (mr *MockHasInvariantsMockRecorder) RegisterInvariants(arg0 interface{}) *g
type MockHasServices struct {
ctrl *gomock.Controller
recorder *MockHasServicesMockRecorder
isgomock struct{}
}
// MockHasServicesMockRecorder is the mock recorder for MockHasServices.
@ -260,60 +271,61 @@ func (m *MockHasServices) RegisterServices(arg0 module.Configurator) {
}
// RegisterServices indicates an expected call of RegisterServices.
func (mr *MockHasServicesMockRecorder) RegisterServices(arg0 interface{}) *gomock.Call {
func (mr *MockHasServicesMockRecorder) RegisterServices(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterServices", reflect.TypeOf((*MockHasServices)(nil).RegisterServices), arg0)
}
// MockhasServicesV1 is a mock of hasServicesV1 interface.
type MockhasServicesV1 struct {
// MockHasRegisterServices is a mock of HasRegisterServices interface.
type MockHasRegisterServices struct {
ctrl *gomock.Controller
recorder *MockhasServicesV1MockRecorder
recorder *MockHasRegisterServicesMockRecorder
isgomock struct{}
}
// MockhasServicesV1MockRecorder is the mock recorder for MockhasServicesV1.
type MockhasServicesV1MockRecorder struct {
mock *MockhasServicesV1
// MockHasRegisterServicesMockRecorder is the mock recorder for MockHasRegisterServices.
type MockHasRegisterServicesMockRecorder struct {
mock *MockHasRegisterServices
}
// NewMockhasServicesV1 creates a new mock instance.
func NewMockhasServicesV1(ctrl *gomock.Controller) *MockhasServicesV1 {
mock := &MockhasServicesV1{ctrl: ctrl}
mock.recorder = &MockhasServicesV1MockRecorder{mock}
// NewMockHasRegisterServices creates a new mock instance.
func NewMockHasRegisterServices(ctrl *gomock.Controller) *MockHasRegisterServices {
mock := &MockHasRegisterServices{ctrl: ctrl}
mock.recorder = &MockHasRegisterServicesMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockhasServicesV1) EXPECT() *MockhasServicesV1MockRecorder {
func (m *MockHasRegisterServices) EXPECT() *MockHasRegisterServicesMockRecorder {
return m.recorder
}
// IsAppModule mocks base method.
func (m *MockhasServicesV1) IsAppModule() {
func (m *MockHasRegisterServices) IsAppModule() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "IsAppModule")
}
// IsAppModule indicates an expected call of IsAppModule.
func (mr *MockhasServicesV1MockRecorder) IsAppModule() *gomock.Call {
func (mr *MockHasRegisterServicesMockRecorder) IsAppModule() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAppModule", reflect.TypeOf((*MockhasServicesV1)(nil).IsAppModule))
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAppModule", reflect.TypeOf((*MockHasRegisterServices)(nil).IsAppModule))
}
// IsOnePerModuleType mocks base method.
func (m *MockhasServicesV1) IsOnePerModuleType() {
func (m *MockHasRegisterServices) IsOnePerModuleType() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "IsOnePerModuleType")
}
// IsOnePerModuleType indicates an expected call of IsOnePerModuleType.
func (mr *MockhasServicesV1MockRecorder) IsOnePerModuleType() *gomock.Call {
func (mr *MockHasRegisterServicesMockRecorder) IsOnePerModuleType() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOnePerModuleType", reflect.TypeOf((*MockhasServicesV1)(nil).IsOnePerModuleType))
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOnePerModuleType", reflect.TypeOf((*MockHasRegisterServices)(nil).IsOnePerModuleType))
}
// RegisterServices mocks base method.
func (m *MockhasServicesV1) RegisterServices(arg0 grpc.ServiceRegistrar) error {
func (m *MockHasRegisterServices) RegisterServices(arg0 grpc.ServiceRegistrar) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterServices", arg0)
ret0, _ := ret[0].(error)
@ -321,15 +333,16 @@ func (m *MockhasServicesV1) RegisterServices(arg0 grpc.ServiceRegistrar) error {
}
// RegisterServices indicates an expected call of RegisterServices.
func (mr *MockhasServicesV1MockRecorder) RegisterServices(arg0 interface{}) *gomock.Call {
func (mr *MockHasRegisterServicesMockRecorder) RegisterServices(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterServices", reflect.TypeOf((*MockhasServicesV1)(nil).RegisterServices), arg0)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterServices", reflect.TypeOf((*MockHasRegisterServices)(nil).RegisterServices), arg0)
}
// MockHasABCIEndBlock is a mock of HasABCIEndBlock interface.
type MockHasABCIEndBlock struct {
ctrl *gomock.Controller
recorder *MockHasABCIEndBlockMockRecorder
isgomock struct{}
}
// MockHasABCIEndBlockMockRecorder is the mock recorder for MockHasABCIEndBlock.
@ -359,7 +372,7 @@ func (m *MockHasABCIEndBlock) EndBlock(arg0 context.Context) ([]module.Validator
}
// EndBlock indicates an expected call of EndBlock.
func (mr *MockHasABCIEndBlockMockRecorder) EndBlock(arg0 interface{}) *gomock.Call {
func (mr *MockHasABCIEndBlockMockRecorder) EndBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndBlock", reflect.TypeOf((*MockHasABCIEndBlock)(nil).EndBlock), arg0)
}

View File

@ -10,7 +10,7 @@ import (
types0 "github.com/cosmos/cosmos-sdk/x/auth/types"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.

View File

@ -7,8 +7,8 @@ import (
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/comet"
storetypes "cosmossdk.io/store/types"

View File

@ -3,8 +3,8 @@ package types_test
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"github.com/cosmos/cosmos-sdk/testutil/mock"
sdk "github.com/cosmos/cosmos-sdk/types"

View File

@ -1,4 +1,4 @@
package module
package module_test
import (
"context"
@ -14,34 +14,36 @@ import (
"github.com/cosmos/cosmos-sdk/client"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
)
var (
_ appmodule.AppModule = coreAppModuleAdaptor{}
_ HasAminoCodec = coreAppModuleAdaptor{}
_ HasGRPCGateway = coreAppModuleAdaptor{}
_ module.HasAminoCodec = coreAppModuleAdaptor{}
_ module.HasGRPCGateway = coreAppModuleAdaptor{}
_ appmodule.HasRegisterInterfaces = coreAppModuleAdaptor{}
_ HasABCIGenesis = coreAppModuleAdaptor{}
_ HasServices = coreAppModuleAdaptor{}
_ module.HasABCIGenesis = coreAppModuleAdaptor{}
_ module.HasServices = coreAppModuleAdaptor{}
)
// CoreAppModuleAdaptor wraps the core API module as an AppModule that this version of the SDK can use.
func CoreAppModuleAdaptor(name string, module appmodule.AppModule) AppModule {
func newCoreAppModuleAdaptor(name string, module appmodule.AppModule) module.AppModule {
return coreAppModuleAdaptor{
name: name,
module: module,
name: name,
appModule: module,
}
}
// coreAppModuleAdaptor wraps the core API module as an AppModule that this version of the SDK can use.
// This is only used for testing purposes.
type coreAppModuleAdaptor struct {
name string
module appmodule.AppModule
name string
appModule appmodule.AppModule
}
// DefaultGenesis implements HasGenesis
func (c coreAppModuleAdaptor) DefaultGenesis() json.RawMessage {
if mod, ok := c.module.(appmodule.HasGenesisAuto); ok {
if mod, ok := c.appModule.(appmodule.HasGenesisAuto); ok {
target := genesis.RawJSONTarget{}
err := mod.DefaultGenesis(target.Target())
if err != nil {
@ -56,11 +58,11 @@ func (c coreAppModuleAdaptor) DefaultGenesis() json.RawMessage {
return res
}
if mod, ok := c.module.(HasGenesisBasics); ok {
if mod, ok := c.appModule.(module.HasGenesisBasics); ok {
return mod.DefaultGenesis()
}
if mod, ok := c.module.(HasGenesis); ok {
if mod, ok := c.appModule.(module.HasGenesis); ok {
return mod.DefaultGenesis()
}
@ -69,7 +71,7 @@ func (c coreAppModuleAdaptor) DefaultGenesis() json.RawMessage {
// ValidateGenesis implements HasGenesis
func (c coreAppModuleAdaptor) ValidateGenesis(bz json.RawMessage) error {
if mod, ok := c.module.(appmodule.HasGenesisAuto); ok {
if mod, ok := c.appModule.(appmodule.HasGenesisAuto); ok {
source, err := genesis.SourceFromRawJSON(bz)
if err != nil {
return err
@ -80,11 +82,11 @@ func (c coreAppModuleAdaptor) ValidateGenesis(bz json.RawMessage) error {
}
}
if mod, ok := c.module.(HasGenesisBasics); ok {
if mod, ok := c.appModule.(module.HasGenesisBasics); ok {
return mod.ValidateGenesis(bz)
}
if mod, ok := c.module.(HasGenesis); ok {
if mod, ok := c.appModule.(module.HasGenesis); ok {
return mod.ValidateGenesis(bz)
}
@ -93,7 +95,7 @@ func (c coreAppModuleAdaptor) ValidateGenesis(bz json.RawMessage) error {
// ExportGenesis implements HasGenesis
func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context) (json.RawMessage, error) {
if module, ok := c.module.(appmodule.HasGenesisAuto); ok {
if module, ok := c.appModule.(appmodule.HasGenesisAuto); ok {
ctx := sdk.UnwrapSDKContext(ctx).WithGasMeter(storetypes.NewInfiniteGasMeter()) // avoid race conditions
target := genesis.RawJSONTarget{}
err := module.ExportGenesis(ctx, target.Target())
@ -109,11 +111,11 @@ func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context) (json.RawMessag
return rawJSON, nil
}
if mod, ok := c.module.(HasABCIGenesis); ok {
if mod, ok := c.appModule.(module.HasABCIGenesis); ok {
return mod.ExportGenesis(ctx)
}
if mod, ok := c.module.(HasGenesis); ok {
if mod, ok := c.appModule.(module.HasGenesis); ok {
eg, err := mod.ExportGenesis(ctx)
if err != nil {
return nil, err
@ -126,8 +128,8 @@ func (c coreAppModuleAdaptor) ExportGenesis(ctx context.Context) (json.RawMessag
}
// InitGenesis implements HasGenesis
func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, bz json.RawMessage) ([]ValidatorUpdate, error) {
if module, ok := c.module.(appmodule.HasGenesisAuto); ok {
func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, bz json.RawMessage) ([]module.ValidatorUpdate, error) {
if module, ok := c.appModule.(appmodule.HasGenesisAuto); ok {
// core API genesis
source, err := genesis.SourceFromRawJSON(bz)
if err != nil {
@ -139,11 +141,11 @@ func (c coreAppModuleAdaptor) InitGenesis(ctx context.Context, bz json.RawMessag
}
}
if mod, ok := c.module.(HasABCIGenesis); ok {
if mod, ok := c.appModule.(module.HasABCIGenesis); ok {
return mod.InitGenesis(ctx, bz)
}
if mod, ok := c.module.(HasGenesis); ok {
if mod, ok := c.appModule.(module.HasGenesis); ok {
if err := mod.InitGenesis(ctx, bz); err != nil {
return nil, err
}
@ -159,7 +161,7 @@ func (c coreAppModuleAdaptor) Name() string {
}
func (c coreAppModuleAdaptor) GetQueryCmd() *cobra.Command {
if mod, ok := c.module.(interface {
if mod, ok := c.appModule.(interface {
GetQueryCmd() *cobra.Command
}); ok {
return mod.GetQueryCmd()
@ -169,7 +171,7 @@ func (c coreAppModuleAdaptor) GetQueryCmd() *cobra.Command {
}
func (c coreAppModuleAdaptor) GetTxCmd() *cobra.Command {
if mod, ok := c.module.(interface {
if mod, ok := c.appModule.(interface {
GetTxCmd() *cobra.Command
}); ok {
return mod.GetTxCmd()
@ -180,7 +182,7 @@ func (c coreAppModuleAdaptor) GetTxCmd() *cobra.Command {
// RegisterGRPCGatewayRoutes implements HasGRPCGateway
func (c coreAppModuleAdaptor) RegisterGRPCGatewayRoutes(ctx client.Context, mux *runtime.ServeMux) {
if mod, ok := c.module.(interface {
if mod, ok := c.appModule.(interface {
RegisterGRPCGatewayRoutes(context client.Context, mux *runtime.ServeMux)
}); ok {
mod.RegisterGRPCGatewayRoutes(ctx, mux)
@ -189,7 +191,7 @@ func (c coreAppModuleAdaptor) RegisterGRPCGatewayRoutes(ctx client.Context, mux
// RegisterInterfaces implements HasRegisterInterfaces
func (c coreAppModuleAdaptor) RegisterInterfaces(reg registry.InterfaceRegistrar) {
if mod, ok := c.module.(interface {
if mod, ok := c.appModule.(interface {
RegisterInterfaces(registry.InterfaceRegistrar)
}); ok {
mod.RegisterInterfaces(reg)
@ -198,7 +200,7 @@ func (c coreAppModuleAdaptor) RegisterInterfaces(reg registry.InterfaceRegistrar
// RegisterLegacyAminoCodec implements HasAminoCodec
func (c coreAppModuleAdaptor) RegisterLegacyAminoCodec(amino registry.AminoRegistrar) {
if mod, ok := c.module.(interface {
if mod, ok := c.appModule.(interface {
RegisterLegacyAminoCodec(amino registry.AminoRegistrar)
}); ok {
mod.RegisterLegacyAminoCodec(amino)
@ -206,15 +208,15 @@ func (c coreAppModuleAdaptor) RegisterLegacyAminoCodec(amino registry.AminoRegis
}
// RegisterServices implements HasServices
func (c coreAppModuleAdaptor) RegisterServices(cfg Configurator) {
if module, ok := c.module.(hasServicesV1); ok {
func (c coreAppModuleAdaptor) RegisterServices(cfg module.Configurator) {
if module, ok := c.appModule.(module.HasRegisterServices); ok {
err := module.RegisterServices(cfg)
if err != nil {
panic(err)
}
}
if module, ok := c.module.(appmodule.HasMigrations); ok {
if module, ok := c.appModule.(appmodule.HasMigrations); ok {
err := module.RegisterMigrations(cfg)
if err != nil {
panic(err)

View File

@ -90,15 +90,16 @@ type HasInvariants interface {
RegisterInvariants(sdk.InvariantRegistry)
}
// HasServices is the interface for modules to register services.
// HasServices is the interface for modules to register legacy services using the deprecated Configurator type.
// Deprecated: use HasRegisterServices and its interface in your modules instea.
type HasServices interface {
// RegisterServices allows a module to register services.
RegisterServices(Configurator)
}
// hasServicesV1 is the interface for registering service in baseapp Cosmos SDK.
// HasRegisterServices is the interface for registering service in baseapp Cosmos SDK.
// This API is part of core/appmodule but commented out for dependencies.
type hasServicesV1 interface {
type HasRegisterServices interface {
appmodulev2.AppModule
RegisterServices(grpc.ServiceRegistrar) error
@ -406,7 +407,7 @@ func (m *Manager) RegisterServices(cfg Configurator) error {
module.RegisterServices(cfg)
}
if module, ok := module.(hasServicesV1); ok {
if module, ok := module.(HasRegisterServices); ok {
err := module.RegisterServices(cfg)
if err != nil {
return err

View File

@ -8,9 +8,9 @@ import (
"testing"
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/golang/mock/gomock"
"github.com/spf13/cobra"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"google.golang.org/grpc"
"cosmossdk.io/core/appmodule"
@ -41,7 +41,7 @@ func TestAssertNoForgottenModules(t *testing.T) {
mockAppModule1.EXPECT().Name().Times(2).Return("module1")
mm := module.NewManager(
mockAppModule1,
module.CoreAppModuleAdaptor("module3", mockAppModule3),
newCoreAppModuleAdaptor("module3", mockAppModule3),
)
require.NotNil(t, mm)
require.Equal(t, 2, len(mm.Modules))
@ -71,7 +71,7 @@ func TestManagerOrderSetters(t *testing.T) {
mockAppModule1.EXPECT().Name().Times(2).Return("module1")
mockAppModule2.EXPECT().Name().Times(2).Return("module2")
mm := module.NewManager(mockAppModule1, mockAppModule2, module.CoreAppModuleAdaptor("module3", mockAppModule3))
mm := module.NewManager(mockAppModule1, mockAppModule2, newCoreAppModuleAdaptor("module3", mockAppModule3))
require.NotNil(t, mm)
require.Equal(t, 3, len(mm.Modules))
@ -114,7 +114,7 @@ func TestManager_RegisterQueryServices(t *testing.T) {
mockAppModule1.EXPECT().Name().Times(2).Return("module1")
mockAppModule2.EXPECT().Name().Times(2).Return("module2")
// TODO: This is not working for Core API modules yet
mm := module.NewManager(mockAppModule1, mockAppModule2, module.CoreAppModuleAdaptor("mockAppModule3", mockAppModule3))
mm := module.NewManager(mockAppModule1, mockAppModule2, newCoreAppModuleAdaptor("mockAppModule3", mockAppModule3))
require.NotNil(t, mm)
require.Equal(t, 3, len(mm.Modules))
@ -146,7 +146,7 @@ func TestManager_InitGenesis(t *testing.T) {
mockAppModule3 := mock.NewMockCoreAppModule(mockCtrl)
mockAppModule1.EXPECT().Name().Times(2).Return("module1")
mockAppModule2.EXPECT().Name().Times(4).Return("module2")
mm := module.NewManager(mockAppModule1, mockAppModule2, module.CoreAppModuleAdaptor("module3", mockAppModule3))
mm := module.NewManager(mockAppModule1, mockAppModule2, newCoreAppModuleAdaptor("module3", mockAppModule3))
require.NotNil(t, mm)
require.Equal(t, 3, len(mm.Modules))
@ -178,7 +178,7 @@ func TestManager_InitGenesis(t *testing.T) {
// happy path
mm2 := module.NewManager(mockAppModuleABCI1, mockAppModule2, module.CoreAppModuleAdaptor("module3", mockAppModule3))
mm2 := module.NewManager(mockAppModuleABCI1, mockAppModule2, newCoreAppModuleAdaptor("module3", mockAppModule3))
mockAppModuleABCI1.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module1"])).Times(1).Return([]module.ValidatorUpdate{{}}, nil)
mockAppModule2.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Eq(genesisData["module2"])).Times(1)
mockAppModule3.EXPECT().InitGenesis(gomock.Eq(ctx), gomock.Any()).Times(1).Return(nil)
@ -195,7 +195,7 @@ func TestManager_ExportGenesis(t *testing.T) {
mockCoreAppModule := MockCoreAppModule{}
mockAppModule1.EXPECT().Name().Times(2).Return("module1")
mockAppModule2.EXPECT().Name().Times(2).Return("module2")
mm := module.NewManager(mockAppModule1, mockAppModule2, module.CoreAppModuleAdaptor("mockCoreAppModule", mockCoreAppModule))
mm := module.NewManager(mockAppModule1, mockAppModule2, newCoreAppModuleAdaptor("mockCoreAppModule", mockCoreAppModule))
require.NotNil(t, mm)
require.Equal(t, 3, len(mm.Modules))

View File

@ -7,8 +7,8 @@ import (
"strings"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
apisigning "cosmossdk.io/api/cosmos/tx/signing/v1beta1"
"cosmossdk.io/core/gas"

View File

@ -3,8 +3,8 @@ package ante_test
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
apisigning "cosmossdk.io/api/cosmos/tx/signing/v1beta1"
"cosmossdk.io/math"

View File

@ -7,8 +7,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"google.golang.org/protobuf/types/known/anypb"
apisigning "cosmossdk.io/api/cosmos/tx/signing/v1beta1"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/auth/ante/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/auth/ante/expected_keepers.go -package testutil -destination x/auth/ante/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -12,13 +17,14 @@ import (
appmodule "cosmossdk.io/core/appmodule"
types "github.com/cosmos/cosmos-sdk/types"
types0 "github.com/cosmos/cosmos-sdk/x/auth/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -61,7 +67,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddres
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr)
}
@ -89,7 +95,7 @@ func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress
}
// GetModuleAddress indicates an expected call of GetModuleAddress.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), moduleName)
}
@ -103,7 +109,7 @@ func (m *MockAccountKeeper) GetParams(ctx context.Context) types0.Params {
}
// GetParams indicates an expected call of GetParams.
func (mr *MockAccountKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetParams(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockAccountKeeper)(nil).GetParams), ctx)
}
@ -117,7 +123,7 @@ func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr type
}
// NewAccountWithAddress indicates an expected call of NewAccountWithAddress.
func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccountWithAddress", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccountWithAddress), ctx, addr)
}
@ -129,7 +135,7 @@ func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types.AccountI)
}
// SetAccount indicates an expected call of SetAccount.
func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, acc)
}
@ -138,6 +144,7 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomoc
type MockFeegrantKeeper struct {
ctrl *gomock.Controller
recorder *MockFeegrantKeeperMockRecorder
isgomock struct{}
}
// MockFeegrantKeeperMockRecorder is the mock recorder for MockFeegrantKeeper.
@ -166,7 +173,7 @@ func (m *MockFeegrantKeeper) UseGrantedFees(ctx context.Context, granter, grante
}
// UseGrantedFees indicates an expected call of UseGrantedFees.
func (mr *MockFeegrantKeeperMockRecorder) UseGrantedFees(ctx, granter, grantee, fee, msgs interface{}) *gomock.Call {
func (mr *MockFeegrantKeeperMockRecorder) UseGrantedFees(ctx, granter, grantee, fee, msgs any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseGrantedFees", reflect.TypeOf((*MockFeegrantKeeper)(nil).UseGrantedFees), ctx, granter, grantee, fee, msgs)
}
@ -175,6 +182,7 @@ func (mr *MockFeegrantKeeperMockRecorder) UseGrantedFees(ctx, granter, grantee,
type MockConsensusKeeper struct {
ctrl *gomock.Controller
recorder *MockConsensusKeeperMockRecorder
isgomock struct{}
}
// MockConsensusKeeperMockRecorder is the mock recorder for MockConsensusKeeper.
@ -204,7 +212,7 @@ func (m *MockConsensusKeeper) AppVersion(ctx context.Context) (uint64, error) {
}
// AppVersion indicates an expected call of AppVersion.
func (mr *MockConsensusKeeperMockRecorder) AppVersion(ctx interface{}) *gomock.Call {
func (mr *MockConsensusKeeperMockRecorder) AppVersion(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppVersion", reflect.TypeOf((*MockConsensusKeeper)(nil).AppVersion), ctx)
}
@ -220,7 +228,7 @@ func (m *MockConsensusKeeper) BlockParams(arg0 context.Context) (uint64, uint64,
}
// BlockParams indicates an expected call of BlockParams.
func (mr *MockConsensusKeeperMockRecorder) BlockParams(arg0 interface{}) *gomock.Call {
func (mr *MockConsensusKeeperMockRecorder) BlockParams(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockParams", reflect.TypeOf((*MockConsensusKeeper)(nil).BlockParams), arg0)
}

View File

@ -4,8 +4,8 @@ import (
"context"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"google.golang.org/protobuf/types/known/anypb"
// TODO We don't need to import these API types if we use gogo's registry

View File

@ -7,8 +7,8 @@ import (
"sync/atomic"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"pgregory.net/rapid"
"cosmossdk.io/core/appmodule"

View File

@ -8,7 +8,7 @@ import (
"sort"
"github.com/cosmos/gogoproto/proto"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"

View File

@ -5,9 +5,9 @@ import (
"encoding/binary"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -5,7 +5,7 @@ import (
"github.com/cosmos/gogoproto/proto"
any "github.com/cosmos/gogoproto/types/any"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"google.golang.org/protobuf/runtime/protoiface"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/auth/types/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/auth/types/expected_keepers.go -package testutil -destination x/auth/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -10,13 +15,14 @@ import (
transaction "cosmossdk.io/core/transaction"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockBankKeeper is a mock of BankKeeper interface.
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -39,7 +45,7 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder {
// IsSendEnabledCoins mocks base method.
func (m *MockBankKeeper) IsSendEnabledCoins(ctx context.Context, coins ...types.Coin) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
varargs := []any{ctx}
for _, a := range coins {
varargs = append(varargs, a)
}
@ -49,9 +55,9 @@ func (m *MockBankKeeper) IsSendEnabledCoins(ctx context.Context, coins ...types.
}
// IsSendEnabledCoins indicates an expected call of IsSendEnabledCoins.
func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoins(ctx interface{}, coins ...interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoins(ctx any, coins ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, coins...)
varargs := append([]any{ctx}, coins...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledCoins", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledCoins), varargs...)
}
@ -64,7 +70,7 @@ func (m *MockBankKeeper) SendCoins(ctx context.Context, from, to types.AccAddres
}
// SendCoins indicates an expected call of SendCoins.
func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, from, to, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, from, to, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoins", reflect.TypeOf((*MockBankKeeper)(nil).SendCoins), ctx, from, to, amt)
}
@ -78,7 +84,7 @@ func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, sende
}
// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt)
}
@ -87,6 +93,7 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAd
type MockAccountsModKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountsModKeeperMockRecorder
isgomock struct{}
}
// MockAccountsModKeeperMockRecorder is the mock recorder for MockAccountsModKeeper.
@ -115,7 +122,7 @@ func (m *MockAccountsModKeeper) InitAccountNumberSeqUnsafe(ctx context.Context,
}
// InitAccountNumberSeqUnsafe indicates an expected call of InitAccountNumberSeqUnsafe.
func (mr *MockAccountsModKeeperMockRecorder) InitAccountNumberSeqUnsafe(ctx, currentAccNum interface{}) *gomock.Call {
func (mr *MockAccountsModKeeperMockRecorder) InitAccountNumberSeqUnsafe(ctx, currentAccNum any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitAccountNumberSeqUnsafe", reflect.TypeOf((*MockAccountsModKeeper)(nil).InitAccountNumberSeqUnsafe), ctx, currentAccNum)
}
@ -129,7 +136,7 @@ func (m *MockAccountsModKeeper) IsAccountsModuleAccount(ctx context.Context, acc
}
// IsAccountsModuleAccount indicates an expected call of IsAccountsModuleAccount.
func (mr *MockAccountsModKeeperMockRecorder) IsAccountsModuleAccount(ctx, accountAddr interface{}) *gomock.Call {
func (mr *MockAccountsModKeeperMockRecorder) IsAccountsModuleAccount(ctx, accountAddr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAccountsModuleAccount", reflect.TypeOf((*MockAccountsModKeeper)(nil).IsAccountsModuleAccount), ctx, accountAddr)
}
@ -144,7 +151,7 @@ func (m *MockAccountsModKeeper) MigrateLegacyAccount(ctx context.Context, addr [
}
// MigrateLegacyAccount indicates an expected call of MigrateLegacyAccount.
func (mr *MockAccountsModKeeperMockRecorder) MigrateLegacyAccount(ctx, addr, accNum, accType, msg interface{}) *gomock.Call {
func (mr *MockAccountsModKeeperMockRecorder) MigrateLegacyAccount(ctx, addr, accNum, accType, msg any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MigrateLegacyAccount", reflect.TypeOf((*MockAccountsModKeeper)(nil).MigrateLegacyAccount), ctx, addr, accNum, accType, msg)
}
@ -159,7 +166,7 @@ func (m *MockAccountsModKeeper) NextAccountNumber(ctx context.Context) (uint64,
}
// NextAccountNumber indicates an expected call of NextAccountNumber.
func (mr *MockAccountsModKeeperMockRecorder) NextAccountNumber(ctx interface{}) *gomock.Call {
func (mr *MockAccountsModKeeperMockRecorder) NextAccountNumber(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextAccountNumber", reflect.TypeOf((*MockAccountsModKeeper)(nil).NextAccountNumber), ctx)
}
@ -174,7 +181,7 @@ func (m *MockAccountsModKeeper) Query(ctx context.Context, accountAddr []byte, q
}
// Query indicates an expected call of Query.
func (mr *MockAccountsModKeeperMockRecorder) Query(ctx, accountAddr, queryRequest interface{}) *gomock.Call {
func (mr *MockAccountsModKeeperMockRecorder) Query(ctx, accountAddr, queryRequest any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockAccountsModKeeper)(nil).Query), ctx, accountAddr, queryRequest)
}
@ -189,7 +196,7 @@ func (m *MockAccountsModKeeper) SendModuleMessage(ctx context.Context, sender []
}
// SendModuleMessage indicates an expected call of SendModuleMessage.
func (mr *MockAccountsModKeeperMockRecorder) SendModuleMessage(ctx, sender, msg interface{}) *gomock.Call {
func (mr *MockAccountsModKeeperMockRecorder) SendModuleMessage(ctx, sender, msg any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendModuleMessage", reflect.TypeOf((*MockAccountsModKeeper)(nil).SendModuleMessage), ctx, sender, msg)
}

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/auth/tx/config/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/auth/tx/config/expected_keepers.go -package testutil -destination x/auth/tx/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -9,13 +14,14 @@ import (
reflect "reflect"
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockBankKeeper is a mock of BankKeeper interface.
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -45,7 +51,7 @@ func (m *MockBankKeeper) DenomMetadataV2(c context.Context, req *bankv1beta1.Que
}
// DenomMetadataV2 indicates an expected call of DenomMetadataV2.
func (mr *MockBankKeeperMockRecorder) DenomMetadataV2(c, req interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) DenomMetadataV2(c, req any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DenomMetadataV2", reflect.TypeOf((*MockBankKeeper)(nil).DenomMetadataV2), c, req)
}

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/auth/vesting/types/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/auth/vesting/types/expected_keepers.go -package testutil -destination x/auth/vesting/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -9,13 +14,14 @@ import (
reflect "reflect"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockBankKeeper is a mock of BankKeeper interface.
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -44,7 +50,7 @@ func (m *MockBankKeeper) BlockedAddr(addr types.AccAddress) bool {
}
// BlockedAddr indicates an expected call of BlockedAddr.
func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockedAddr", reflect.TypeOf((*MockBankKeeper)(nil).BlockedAddr), addr)
}
@ -52,7 +58,7 @@ func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call
// IsSendEnabledCoins mocks base method.
func (m *MockBankKeeper) IsSendEnabledCoins(ctx context.Context, coins ...types.Coin) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx}
varargs := []any{ctx}
for _, a := range coins {
varargs = append(varargs, a)
}
@ -62,9 +68,9 @@ func (m *MockBankKeeper) IsSendEnabledCoins(ctx context.Context, coins ...types.
}
// IsSendEnabledCoins indicates an expected call of IsSendEnabledCoins.
func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoins(ctx interface{}, coins ...interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) IsSendEnabledCoins(ctx any, coins ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx}, coins...)
varargs := append([]any{ctx}, coins...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledCoins", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledCoins), varargs...)
}
@ -77,7 +83,7 @@ func (m *MockBankKeeper) SendCoins(ctx context.Context, fromAddr, toAddr types.A
}
// SendCoins indicates an expected call of SendCoins.
func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, fromAddr, toAddr, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, fromAddr, toAddr, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoins", reflect.TypeOf((*MockBankKeeper)(nil).SendCoins), ctx, fromAddr, toAddr, amt)
}

View File

@ -4,9 +4,9 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -16,7 +16,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/spf13/cobra v1.8.1
@ -170,6 +170,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require github.com/cockroachdb/apd/v3 v3.2.1 // indirect
replace github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-rc.1

View File

@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -6,8 +6,8 @@ import (
gogoproto "github.com/cosmos/gogoproto/proto"
gogoprotoany "github.com/cosmos/gogoproto/types/any"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -3,7 +3,7 @@ package keeper_test
import (
"time"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
sdkmath "cosmossdk.io/math"

View File

@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/authz/testutil/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/authz/testutil/expected_keepers.go -package testutil -destination x/authz/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -11,13 +16,14 @@ import (
address "cosmossdk.io/core/address"
types "cosmossdk.io/x/bank/types"
types0 "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -60,7 +66,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types0.AccAddre
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr)
}
@ -74,7 +80,7 @@ func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr type
}
// NewAccountWithAddress indicates an expected call of NewAccountWithAddress.
func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccountWithAddress", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccountWithAddress), ctx, addr)
}
@ -83,6 +89,7 @@ func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interfa
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -112,7 +119,7 @@ func (m *MockBankKeeper) Burn(arg0 context.Context, arg1 *types.MsgBurn) (*types
}
// Burn indicates an expected call of Burn.
func (mr *MockBankKeeperMockRecorder) Burn(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) Burn(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Burn", reflect.TypeOf((*MockBankKeeper)(nil).Burn), arg0, arg1)
}
@ -126,7 +133,7 @@ func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types0.AccAddr
}
// GetAllBalances indicates an expected call of GetAllBalances.
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr)
}
@ -140,7 +147,7 @@ func (m *MockBankKeeper) MintCoins(ctx context.Context, moduleName string, amt t
}
// MintCoins indicates an expected call of MintCoins.
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt)
}
@ -155,7 +162,7 @@ func (m *MockBankKeeper) MultiSend(arg0 context.Context, arg1 *types.MsgMultiSen
}
// MultiSend indicates an expected call of MultiSend.
func (mr *MockBankKeeperMockRecorder) MultiSend(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) MultiSend(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MultiSend", reflect.TypeOf((*MockBankKeeper)(nil).MultiSend), arg0, arg1)
}
@ -170,7 +177,7 @@ func (m *MockBankKeeper) Send(arg0 context.Context, arg1 *types.MsgSend) (*types
}
// Send indicates an expected call of Send.
func (mr *MockBankKeeperMockRecorder) Send(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) Send(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockBankKeeper)(nil).Send), arg0, arg1)
}
@ -184,7 +191,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, sende
}
// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt)
}
@ -199,7 +206,7 @@ func (m *MockBankKeeper) SetSendEnabled(arg0 context.Context, arg1 *types.MsgSet
}
// SetSendEnabled indicates an expected call of SetSendEnabled.
func (mr *MockBankKeeperMockRecorder) SetSendEnabled(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SetSendEnabled(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).SetSendEnabled), arg0, arg1)
}
@ -213,7 +220,7 @@ func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types0.AccAddr
}
// SpendableCoins indicates an expected call of SpendableCoins.
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr)
}
@ -228,7 +235,7 @@ func (m *MockBankKeeper) UpdateParams(arg0 context.Context, arg1 *types.MsgUpdat
}
// UpdateParams indicates an expected call of UpdateParams.
func (mr *MockBankKeeperMockRecorder) UpdateParams(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) UpdateParams(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateParams", reflect.TypeOf((*MockBankKeeper)(nil).UpdateParams), arg0, arg1)
}

View File

@ -17,7 +17,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/hashicorp/go-metrics v0.5.3 // indirect
@ -169,6 +169,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require github.com/cockroachdb/apd/v3 v3.2.1 // indirect
replace github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-rc.1

View File

@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/collections"
"cosmossdk.io/core/header"

View File

@ -10,8 +10,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
coreevent "cosmossdk.io/core/event"
"cosmossdk.io/core/header"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/bank/types/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/bank/types/expected_keepers.go -package testutil -destination x/bank/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -11,13 +16,14 @@ import (
address "cosmossdk.io/core/address"
types "github.com/cosmos/cosmos-sdk/types"
types0 "github.com/cosmos/cosmos-sdk/x/auth/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -60,7 +66,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddres
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr)
}
@ -74,7 +80,7 @@ func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName str
}
// GetModuleAccount indicates an expected call of GetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName)
}
@ -89,7 +95,7 @@ func (m *MockAccountKeeper) GetModuleAccountAndPermissions(ctx context.Context,
}
// GetModuleAccountAndPermissions indicates an expected call of GetModuleAccountAndPermissions.
func (mr *MockAccountKeeperMockRecorder) GetModuleAccountAndPermissions(ctx, moduleName interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAccountAndPermissions(ctx, moduleName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccountAndPermissions", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccountAndPermissions), ctx, moduleName)
}
@ -103,7 +109,7 @@ func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress
}
// GetModuleAddress indicates an expected call of GetModuleAddress.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), moduleName)
}
@ -118,7 +124,7 @@ func (m *MockAccountKeeper) GetModuleAddressAndPermissions(moduleName string) (t
}
// GetModuleAddressAndPermissions indicates an expected call of GetModuleAddressAndPermissions.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddressAndPermissions(moduleName interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddressAndPermissions(moduleName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddressAndPermissions", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddressAndPermissions), moduleName)
}
@ -146,7 +152,7 @@ func (m *MockAccountKeeper) HasAccount(ctx context.Context, addr types.AccAddres
}
// HasAccount indicates an expected call of HasAccount.
func (mr *MockAccountKeeperMockRecorder) HasAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) HasAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasAccount", reflect.TypeOf((*MockAccountKeeper)(nil).HasAccount), ctx, addr)
}
@ -160,7 +166,7 @@ func (m *MockAccountKeeper) NewAccount(arg0 context.Context, arg1 types.AccountI
}
// NewAccount indicates an expected call of NewAccount.
func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccount", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccount), arg0, arg1)
}
@ -174,7 +180,7 @@ func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr type
}
// NewAccountWithAddress indicates an expected call of NewAccountWithAddress.
func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccountWithAddress", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccountWithAddress), ctx, addr)
}
@ -186,7 +192,7 @@ func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types.AccountI)
}
// SetAccount indicates an expected call of SetAccount.
func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, acc)
}
@ -198,7 +204,7 @@ func (m *MockAccountKeeper) SetModuleAccount(ctx context.Context, macc types.Mod
}
// SetModuleAccount indicates an expected call of SetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(ctx, macc interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(ctx, macc any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), ctx, macc)
}
@ -212,7 +218,7 @@ func (m *MockAccountKeeper) ValidatePermissions(macc types.ModuleAccountI) error
}
// ValidatePermissions indicates an expected call of ValidatePermissions.
func (mr *MockAccountKeeperMockRecorder) ValidatePermissions(macc interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) ValidatePermissions(macc any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatePermissions", reflect.TypeOf((*MockAccountKeeper)(nil).ValidatePermissions), macc)
}

View File

@ -16,7 +16,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/pkg/errors v0.9.1
@ -27,6 +27,8 @@ require (
gotest.tools/v3 v3.5.1 // indirect
)
require go.uber.org/mock v0.5.0
require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.36.2-20241120201313-68e42a58b301.1 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.36.2-20240130113600-88ef6483f90f.1 // indirect

View File

@ -5,8 +5,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/collections"
"cosmossdk.io/core/comet"

View File

@ -3,8 +3,8 @@ package keeper_test
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/collections"
"cosmossdk.io/core/header"

View File

@ -3,8 +3,8 @@ package keeper_test
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/math"
"cosmossdk.io/x/distribution/keeper"

View File

@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -3,8 +3,8 @@ package keeper_test
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/math"
"cosmossdk.io/x/distribution/keeper"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/distribution/types/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/distribution/types/expected_keepers.go -package testutil -destination x/distribution/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -11,13 +16,14 @@ import (
address "cosmossdk.io/core/address"
types "cosmossdk.io/x/staking/types"
types0 "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -60,7 +66,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types0.AccAddre
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr)
}
@ -74,7 +80,7 @@ func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, name string) t
}
// GetModuleAccount indicates an expected call of GetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, name)
}
@ -88,7 +94,7 @@ func (m *MockAccountKeeper) GetModuleAddress(name string) types0.AccAddress {
}
// GetModuleAddress indicates an expected call of GetModuleAddress.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name)
}
@ -100,7 +106,7 @@ func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types0.M
}
// SetModuleAccount indicates an expected call of SetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1)
}
@ -109,6 +115,7 @@ func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -137,7 +144,7 @@ func (m *MockBankKeeper) BlockedAddr(addr types0.AccAddress) bool {
}
// BlockedAddr indicates an expected call of BlockedAddr.
func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) BlockedAddr(addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockedAddr", reflect.TypeOf((*MockBankKeeper)(nil).BlockedAddr), addr)
}
@ -151,7 +158,7 @@ func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types0.AccAddr
}
// GetAllBalances indicates an expected call of GetAllBalances.
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr)
}
@ -165,7 +172,7 @@ func (m *MockBankKeeper) IsSendEnabledDenom(ctx context.Context, denom string) b
}
// IsSendEnabledDenom indicates an expected call of IsSendEnabledDenom.
func (mr *MockBankKeeperMockRecorder) IsSendEnabledDenom(ctx, denom interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) IsSendEnabledDenom(ctx, denom any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSendEnabledDenom", reflect.TypeOf((*MockBankKeeper)(nil).IsSendEnabledDenom), ctx, denom)
}
@ -179,7 +186,7 @@ func (m *MockBankKeeper) MintCoins(ctx context.Context, moduleName string, amt t
}
// MintCoins indicates an expected call of MintCoins.
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt)
}
@ -193,7 +200,7 @@ func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, sende
}
// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt)
}
@ -207,7 +214,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, sende
}
// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt)
}
@ -221,7 +228,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, sender
}
// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt)
}
@ -235,7 +242,7 @@ func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types0.AccAddr
}
// SpendableCoins indicates an expected call of SpendableCoins.
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr)
}
@ -244,6 +251,7 @@ func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gom
type MockStakingKeeper struct {
ctrl *gomock.Controller
recorder *MockStakingKeeperMockRecorder
isgomock struct{}
}
// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.
@ -273,7 +281,7 @@ func (m *MockStakingKeeper) BondDenom(ctx context.Context) (string, error) {
}
// BondDenom indicates an expected call of BondDenom.
func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx)
}
@ -302,7 +310,7 @@ func (m *MockStakingKeeper) Delegation(arg0 context.Context, arg1 types0.AccAddr
}
// Delegation indicates an expected call of Delegation.
func (mr *MockStakingKeeperMockRecorder) Delegation(arg0, arg1, arg2 interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) Delegation(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delegation", reflect.TypeOf((*MockStakingKeeper)(nil).Delegation), arg0, arg1, arg2)
}
@ -317,7 +325,7 @@ func (m *MockStakingKeeper) GetAllDelegatorDelegations(ctx context.Context, dele
}
// GetAllDelegatorDelegations indicates an expected call of GetAllDelegatorDelegations.
func (mr *MockStakingKeeperMockRecorder) GetAllDelegatorDelegations(ctx, delegator interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) GetAllDelegatorDelegations(ctx, delegator any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllDelegatorDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllDelegatorDelegations), ctx, delegator)
}
@ -332,7 +340,7 @@ func (m *MockStakingKeeper) GetAllSDKDelegations(ctx context.Context) ([]types.D
}
// GetAllSDKDelegations indicates an expected call of GetAllSDKDelegations.
func (mr *MockStakingKeeperMockRecorder) GetAllSDKDelegations(ctx interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) GetAllSDKDelegations(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllSDKDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllSDKDelegations), ctx)
}
@ -347,7 +355,7 @@ func (m *MockStakingKeeper) GetAllValidators(ctx context.Context) ([]types.Valid
}
// GetAllValidators indicates an expected call of GetAllValidators.
func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllValidators", reflect.TypeOf((*MockStakingKeeper)(nil).GetAllValidators), ctx)
}
@ -361,7 +369,7 @@ func (m *MockStakingKeeper) IterateDelegations(ctx context.Context, delegator ty
}
// IterateDelegations indicates an expected call of IterateDelegations.
func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).IterateDelegations), ctx, delegator, fn)
}
@ -375,7 +383,7 @@ func (m *MockStakingKeeper) IterateValidators(arg0 context.Context, arg1 func(in
}
// IterateValidators indicates an expected call of IterateValidators.
func (mr *MockStakingKeeperMockRecorder) IterateValidators(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) IterateValidators(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateValidators", reflect.TypeOf((*MockStakingKeeper)(nil).IterateValidators), arg0, arg1)
}
@ -390,7 +398,7 @@ func (m *MockStakingKeeper) Validator(arg0 context.Context, arg1 types0.ValAddre
}
// Validator indicates an expected call of Validator.
func (mr *MockStakingKeeperMockRecorder) Validator(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) Validator(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validator", reflect.TypeOf((*MockStakingKeeper)(nil).Validator), arg0, arg1)
}
@ -419,7 +427,7 @@ func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 context.Context, arg1 types
}
// ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr.
func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorByConsAddr", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorByConsAddr), arg0, arg1)
}
@ -428,6 +436,7 @@ func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(arg0, arg1 interfac
type MockStakingHooks struct {
ctrl *gomock.Controller
recorder *MockStakingHooksMockRecorder
isgomock struct{}
}
// MockStakingHooksMockRecorder is the mock recorder for MockStakingHooks.
@ -456,7 +465,7 @@ func (m *MockStakingHooks) AfterDelegationModified(ctx context.Context, delAddr
}
// AfterDelegationModified indicates an expected call of AfterDelegationModified.
func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr interface{}) *gomock.Call {
func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterDelegationModified", reflect.TypeOf((*MockStakingHooks)(nil).AfterDelegationModified), ctx, delAddr, valAddr)
}
@ -470,7 +479,7 @@ func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr ty
}
// AfterValidatorCreated indicates an expected call of AfterValidatorCreated.
func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr interface{}) *gomock.Call {
func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterValidatorCreated", reflect.TypeOf((*MockStakingHooks)(nil).AfterValidatorCreated), ctx, valAddr)
}

View File

@ -14,7 +14,6 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/spf13/cobra v1.8.1
@ -170,6 +169,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require github.com/cockroachdb/apd/v3 v3.2.1 // indirect
replace github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-rc.1

View File

@ -509,7 +509,6 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v1.0.0 h1:BvNoksIyRqyQTW78rIZP9A44WwAminKiomQa7jXp9EI=
@ -559,7 +558,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -592,7 +590,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -654,7 +651,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@ -6,8 +6,8 @@ import (
"fmt"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/collections"
coreaddress "cosmossdk.io/core/address"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/evidence/types/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/evidence/types/expected_keepers.go -package testutil -destination x/evidence/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -14,13 +19,14 @@ import (
math "cosmossdk.io/math"
types "github.com/cosmos/cosmos-sdk/crypto/types"
types0 "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockStakingKeeper is a mock of StakingKeeper interface.
type MockStakingKeeper struct {
ctrl *gomock.Controller
recorder *MockStakingKeeperMockRecorder
isgomock struct{}
}
// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.
@ -64,7 +70,7 @@ func (m *MockStakingKeeper) ValidatorByConsAddr(arg0 context.Context, arg1 types
}
// ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr.
func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorByConsAddr", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorByConsAddr), arg0, arg1)
}
@ -73,6 +79,7 @@ func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(arg0, arg1 interfac
type MockSlashingKeeper struct {
ctrl *gomock.Controller
recorder *MockSlashingKeeperMockRecorder
isgomock struct{}
}
// MockSlashingKeeperMockRecorder is the mock recorder for MockSlashingKeeper.
@ -102,7 +109,7 @@ func (m *MockSlashingKeeper) GetPubkey(arg0 context.Context, arg1 types.Address)
}
// GetPubkey indicates an expected call of GetPubkey.
func (mr *MockSlashingKeeperMockRecorder) GetPubkey(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) GetPubkey(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPubkey", reflect.TypeOf((*MockSlashingKeeper)(nil).GetPubkey), arg0, arg1)
}
@ -116,7 +123,7 @@ func (m *MockSlashingKeeper) HasValidatorSigningInfo(arg0 context.Context, arg1
}
// HasValidatorSigningInfo indicates an expected call of HasValidatorSigningInfo.
func (mr *MockSlashingKeeperMockRecorder) HasValidatorSigningInfo(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) HasValidatorSigningInfo(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasValidatorSigningInfo", reflect.TypeOf((*MockSlashingKeeper)(nil).HasValidatorSigningInfo), arg0, arg1)
}
@ -130,7 +137,7 @@ func (m *MockSlashingKeeper) IsTombstoned(arg0 context.Context, arg1 types0.Cons
}
// IsTombstoned indicates an expected call of IsTombstoned.
func (mr *MockSlashingKeeperMockRecorder) IsTombstoned(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) IsTombstoned(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTombstoned", reflect.TypeOf((*MockSlashingKeeper)(nil).IsTombstoned), arg0, arg1)
}
@ -144,7 +151,7 @@ func (m *MockSlashingKeeper) Jail(arg0 context.Context, arg1 types0.ConsAddress)
}
// Jail indicates an expected call of Jail.
func (mr *MockSlashingKeeperMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) Jail(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Jail", reflect.TypeOf((*MockSlashingKeeper)(nil).Jail), arg0, arg1)
}
@ -158,7 +165,7 @@ func (m *MockSlashingKeeper) JailUntil(arg0 context.Context, arg1 types0.ConsAdd
}
// JailUntil indicates an expected call of JailUntil.
func (mr *MockSlashingKeeperMockRecorder) JailUntil(arg0, arg1, arg2 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) JailUntil(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JailUntil", reflect.TypeOf((*MockSlashingKeeper)(nil).JailUntil), arg0, arg1, arg2)
}
@ -172,7 +179,7 @@ func (m *MockSlashingKeeper) Slash(arg0 context.Context, arg1 types0.ConsAddress
}
// Slash indicates an expected call of Slash.
func (mr *MockSlashingKeeperMockRecorder) Slash(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) Slash(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Slash", reflect.TypeOf((*MockSlashingKeeper)(nil).Slash), arg0, arg1, arg2, arg3, arg4)
}
@ -187,7 +194,7 @@ func (m *MockSlashingKeeper) SlashFractionDoubleSign(arg0 context.Context) (math
}
// SlashFractionDoubleSign indicates an expected call of SlashFractionDoubleSign.
func (mr *MockSlashingKeeperMockRecorder) SlashFractionDoubleSign(arg0 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) SlashFractionDoubleSign(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SlashFractionDoubleSign", reflect.TypeOf((*MockSlashingKeeper)(nil).SlashFractionDoubleSign), arg0)
}
@ -201,7 +208,7 @@ func (m *MockSlashingKeeper) SlashWithInfractionReason(arg0 context.Context, arg
}
// SlashWithInfractionReason indicates an expected call of SlashWithInfractionReason.
func (mr *MockSlashingKeeperMockRecorder) SlashWithInfractionReason(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) SlashWithInfractionReason(arg0, arg1, arg2, arg3, arg4, arg5 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SlashWithInfractionReason", reflect.TypeOf((*MockSlashingKeeper)(nil).SlashWithInfractionReason), arg0, arg1, arg2, arg3, arg4, arg5)
}
@ -215,7 +222,7 @@ func (m *MockSlashingKeeper) Tombstone(arg0 context.Context, arg1 types0.ConsAdd
}
// Tombstone indicates an expected call of Tombstone.
func (mr *MockSlashingKeeperMockRecorder) Tombstone(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockSlashingKeeperMockRecorder) Tombstone(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tombstone", reflect.TypeOf((*MockSlashingKeeper)(nil).Tombstone), arg0, arg1)
}
@ -224,6 +231,7 @@ func (mr *MockSlashingKeeperMockRecorder) Tombstone(arg0, arg1 interface{}) *gom
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -250,7 +258,7 @@ func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types0.AccountI)
}
// SetAccount indicates an expected call of SetAccount.
func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, acc)
}
@ -259,6 +267,7 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomoc
type MockConsensusKeeper struct {
ctrl *gomock.Controller
recorder *MockConsensusKeeperMockRecorder
isgomock struct{}
}
// MockConsensusKeeperMockRecorder is the mock recorder for MockConsensusKeeper.
@ -290,7 +299,7 @@ func (m *MockConsensusKeeper) EvidenceParams(arg0 context.Context) (int64, time.
}
// EvidenceParams indicates an expected call of EvidenceParams.
func (mr *MockConsensusKeeperMockRecorder) EvidenceParams(arg0 interface{}) *gomock.Call {
func (mr *MockConsensusKeeperMockRecorder) EvidenceParams(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvidenceParams", reflect.TypeOf((*MockConsensusKeeper)(nil).EvidenceParams), arg0)
}

View File

@ -17,7 +17,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/spf13/cobra v1.8.1
@ -175,6 +175,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require github.com/cockroachdb/apd/v3 v3.2.1 // indirect
replace github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-rc.1

View File

@ -4,7 +4,7 @@ import (
"errors"
"testing"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"gotest.tools/v3/assert"
coretesting "cosmossdk.io/core/testing"

View File

@ -3,8 +3,8 @@ package keeper_test
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -3,7 +3,7 @@ package keeper_test
import (
"time"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"cosmossdk.io/collections"
"cosmossdk.io/core/header"

View File

@ -3,8 +3,8 @@ package module_test
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/feegrant/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/feegrant/expected_keepers.go -package testutil -destination x/feegrant/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -10,13 +15,14 @@ import (
address "cosmossdk.io/core/address"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -59,7 +65,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddres
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr)
}
@ -73,7 +79,7 @@ func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName str
}
// GetModuleAccount indicates an expected call of GetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName)
}
@ -87,7 +93,7 @@ func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress
}
// GetModuleAddress indicates an expected call of GetModuleAddress.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), moduleName)
}
@ -101,7 +107,7 @@ func (m *MockAccountKeeper) NewAccountWithAddress(ctx context.Context, addr type
}
// NewAccountWithAddress indicates an expected call of NewAccountWithAddress.
func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccountWithAddress", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccountWithAddress), ctx, addr)
}
@ -113,7 +119,7 @@ func (m *MockAccountKeeper) SetAccount(ctx context.Context, acc types.AccountI)
}
// SetAccount indicates an expected call of SetAccount.
func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, acc)
}
@ -122,6 +128,7 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomoc
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -150,7 +157,7 @@ func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, sende
}
// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt)
}
@ -164,7 +171,7 @@ func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddre
}
// SpendableCoins indicates an expected call of SpendableCoins.
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr)
}

View File

@ -8,8 +8,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
_ "cosmossdk.io/api/cosmos/crypto/secp256k1"
"cosmossdk.io/math"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/genutil/types/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/genutil/types/expected_keepers.go -package testutil -destination x/genutil/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -13,13 +18,14 @@ import (
codec "github.com/cosmos/cosmos-sdk/codec"
types "github.com/cosmos/cosmos-sdk/types"
module "github.com/cosmos/cosmos-sdk/types/module"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockStakingKeeper is a mock of StakingKeeper interface.
type MockStakingKeeper struct {
ctrl *gomock.Controller
recorder *MockStakingKeeperMockRecorder
isgomock struct{}
}
// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.
@ -49,7 +55,7 @@ func (m *MockStakingKeeper) ApplyAndReturnValidatorSetUpdates(arg0 context.Conte
}
// ApplyAndReturnValidatorSetUpdates indicates an expected call of ApplyAndReturnValidatorSetUpdates.
func (mr *MockStakingKeeperMockRecorder) ApplyAndReturnValidatorSetUpdates(arg0 interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) ApplyAndReturnValidatorSetUpdates(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyAndReturnValidatorSetUpdates", reflect.TypeOf((*MockStakingKeeper)(nil).ApplyAndReturnValidatorSetUpdates), arg0)
}
@ -58,6 +64,7 @@ func (mr *MockStakingKeeperMockRecorder) ApplyAndReturnValidatorSetUpdates(arg0
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -86,7 +93,7 @@ func (m *MockAccountKeeper) NewAccount(arg0 context.Context, arg1 types.AccountI
}
// NewAccount indicates an expected call of NewAccount.
func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccount", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccount), arg0, arg1)
}
@ -98,7 +105,7 @@ func (m *MockAccountKeeper) SetAccount(arg0 context.Context, arg1 types.AccountI
}
// SetAccount indicates an expected call of SetAccount.
func (mr *MockAccountKeeperMockRecorder) SetAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), arg0, arg1)
}
@ -107,6 +114,7 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(arg0, arg1 interface{}) *gom
type MockGenesisAccountsIterator struct {
ctrl *gomock.Controller
recorder *MockGenesisAccountsIteratorMockRecorder
isgomock struct{}
}
// MockGenesisAccountsIteratorMockRecorder is the mock recorder for MockGenesisAccountsIterator.
@ -133,7 +141,7 @@ func (m *MockGenesisAccountsIterator) IterateGenesisAccounts(cdc *codec.LegacyAm
}
// IterateGenesisAccounts indicates an expected call of IterateGenesisAccounts.
func (mr *MockGenesisAccountsIteratorMockRecorder) IterateGenesisAccounts(cdc, appGenesis, cb interface{}) *gomock.Call {
func (mr *MockGenesisAccountsIteratorMockRecorder) IterateGenesisAccounts(cdc, appGenesis, cb any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateGenesisAccounts", reflect.TypeOf((*MockGenesisAccountsIterator)(nil).IterateGenesisAccounts), cdc, appGenesis, cb)
}
@ -142,6 +150,7 @@ func (mr *MockGenesisAccountsIteratorMockRecorder) IterateGenesisAccounts(cdc, a
type MockGenesisBalancesIterator struct {
ctrl *gomock.Controller
recorder *MockGenesisBalancesIteratorMockRecorder
isgomock struct{}
}
// MockGenesisBalancesIteratorMockRecorder is the mock recorder for MockGenesisBalancesIterator.
@ -168,7 +177,7 @@ func (m *MockGenesisBalancesIterator) IterateGenesisBalances(cdc codec.JSONCodec
}
// IterateGenesisBalances indicates an expected call of IterateGenesisBalances.
func (mr *MockGenesisBalancesIteratorMockRecorder) IterateGenesisBalances(cdc, appGenesis, cb interface{}) *gomock.Call {
func (mr *MockGenesisBalancesIteratorMockRecorder) IterateGenesisBalances(cdc, appGenesis, cb any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateGenesisBalances", reflect.TypeOf((*MockGenesisBalancesIterator)(nil).IterateGenesisBalances), cdc, appGenesis, cb)
}

View File

@ -21,7 +21,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/manifoldco/promptui v0.9.0 // indirect
@ -174,6 +174,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require github.com/cockroachdb/apd/v3 v3.2.1 // indirect
replace github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-rc.1

View File

@ -6,8 +6,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"

View File

@ -4,9 +4,9 @@ import (
"context"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/collections"
sdkmath "cosmossdk.io/math"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/gov/testutil/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/gov/testutil/expected_keepers.go -package testutil -destination x/gov/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -11,13 +16,14 @@ import (
address "cosmossdk.io/core/address"
math "cosmossdk.io/math"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -60,7 +66,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddres
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr)
}
@ -74,7 +80,7 @@ func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, name string) t
}
// GetModuleAccount indicates an expected call of GetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, name)
}
@ -88,7 +94,7 @@ func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress {
}
// GetModuleAddress indicates an expected call of GetModuleAddress.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name)
}
@ -100,7 +106,7 @@ func (m *MockAccountKeeper) IterateAccounts(ctx context.Context, cb func(types.A
}
// IterateAccounts indicates an expected call of IterateAccounts.
func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, cb interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, cb any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAccounts", reflect.TypeOf((*MockAccountKeeper)(nil).IterateAccounts), ctx, cb)
}
@ -112,7 +118,7 @@ func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types.Mo
}
// SetModuleAccount indicates an expected call of SetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1)
}
@ -121,6 +127,7 @@ func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -149,7 +156,7 @@ func (m *MockBankKeeper) BurnCoins(ctx context.Context, address []byte, amt type
}
// BurnCoins indicates an expected call of BurnCoins.
func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, address, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, address, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BurnCoins", reflect.TypeOf((*MockBankKeeper)(nil).BurnCoins), ctx, address, amt)
}
@ -163,7 +170,7 @@ func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types.AccAddre
}
// GetAllBalances indicates an expected call of GetAllBalances.
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr)
}
@ -177,7 +184,7 @@ func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types.AccAddress,
}
// GetBalance indicates an expected call of GetBalance.
func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom)
}
@ -191,7 +198,7 @@ func (m *MockBankKeeper) LockedCoins(ctx context.Context, addr types.AccAddress)
}
// LockedCoins indicates an expected call of LockedCoins.
func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LockedCoins", reflect.TypeOf((*MockBankKeeper)(nil).LockedCoins), ctx, addr)
}
@ -205,7 +212,7 @@ func (m *MockBankKeeper) MintCoins(ctx context.Context, moduleName string, amt t
}
// MintCoins indicates an expected call of MintCoins.
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt)
}
@ -219,7 +226,7 @@ func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, sende
}
// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt)
}
@ -233,7 +240,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, sende
}
// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt)
}
@ -247,7 +254,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, sender
}
// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt)
}
@ -261,7 +268,7 @@ func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddre
}
// SpendableCoins indicates an expected call of SpendableCoins.
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr)
}
@ -270,6 +277,7 @@ func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gom
type MockPoolKeeper struct {
ctrl *gomock.Controller
recorder *MockPoolKeeperMockRecorder
isgomock struct{}
}
// MockPoolKeeperMockRecorder is the mock recorder for MockPoolKeeper.
@ -298,7 +306,7 @@ func (m *MockPoolKeeper) FundCommunityPool(ctx context.Context, amount types.Coi
}
// FundCommunityPool indicates an expected call of FundCommunityPool.
func (mr *MockPoolKeeperMockRecorder) FundCommunityPool(ctx, amount, sender interface{}) *gomock.Call {
func (mr *MockPoolKeeperMockRecorder) FundCommunityPool(ctx, amount, sender any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FundCommunityPool", reflect.TypeOf((*MockPoolKeeper)(nil).FundCommunityPool), ctx, amount, sender)
}
@ -307,6 +315,7 @@ func (mr *MockPoolKeeperMockRecorder) FundCommunityPool(ctx, amount, sender inte
type MockStakingKeeper struct {
ctrl *gomock.Controller
recorder *MockStakingKeeperMockRecorder
isgomock struct{}
}
// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.
@ -336,7 +345,7 @@ func (m *MockStakingKeeper) BondDenom(ctx context.Context) (string, error) {
}
// BondDenom indicates an expected call of BondDenom.
func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx)
}
@ -350,7 +359,7 @@ func (m *MockStakingKeeper) IterateBondedValidatorsByPower(arg0 context.Context,
}
// IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower.
func (mr *MockStakingKeeperMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateBondedValidatorsByPower", reflect.TypeOf((*MockStakingKeeper)(nil).IterateBondedValidatorsByPower), arg0, arg1)
}
@ -364,7 +373,7 @@ func (m *MockStakingKeeper) IterateDelegations(ctx context.Context, delegator ty
}
// IterateDelegations indicates an expected call of IterateDelegations.
func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) IterateDelegations(ctx, delegator, fn any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateDelegations", reflect.TypeOf((*MockStakingKeeper)(nil).IterateDelegations), ctx, delegator, fn)
}
@ -378,7 +387,7 @@ func (m *MockStakingKeeper) TokensFromConsensusPower(ctx context.Context, power
}
// TokensFromConsensusPower indicates an expected call of TokensFromConsensusPower.
func (mr *MockStakingKeeperMockRecorder) TokensFromConsensusPower(ctx, power interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) TokensFromConsensusPower(ctx, power any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TokensFromConsensusPower", reflect.TypeOf((*MockStakingKeeper)(nil).TokensFromConsensusPower), ctx, power)
}
@ -393,7 +402,7 @@ func (m *MockStakingKeeper) TotalBondedTokens(arg0 context.Context) (math.Int, e
}
// TotalBondedTokens indicates an expected call of TotalBondedTokens.
func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(arg0 interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), arg0)
}

View File

@ -6,8 +6,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
coreaddress "cosmossdk.io/core/address"
"cosmossdk.io/log"

View File

@ -5,8 +5,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"

View File

@ -6,8 +6,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
coreaddress "cosmossdk.io/core/address"
"cosmossdk.io/core/header"

View File

@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
banktypes "cosmossdk.io/x/bank/types"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/group/testutil/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/group/testutil/expected_keepers.go -package testutil -destination x/group/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -11,13 +16,14 @@ import (
address "cosmossdk.io/core/address"
types "cosmossdk.io/x/bank/types"
types0 "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -60,7 +66,7 @@ func (m *MockAccountKeeper) GetAccount(arg0 context.Context, arg1 types0.AccAddr
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), arg0, arg1)
}
@ -74,7 +80,7 @@ func (m *MockAccountKeeper) NewAccount(arg0 context.Context, arg1 types0.Account
}
// NewAccount indicates an expected call of NewAccount.
func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) NewAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccount", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccount), arg0, arg1)
}
@ -86,7 +92,7 @@ func (m *MockAccountKeeper) RemoveAccount(ctx context.Context, acc types0.Accoun
}
// RemoveAccount indicates an expected call of RemoveAccount.
func (mr *MockAccountKeeperMockRecorder) RemoveAccount(ctx, acc interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) RemoveAccount(ctx, acc any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccount", reflect.TypeOf((*MockAccountKeeper)(nil).RemoveAccount), ctx, acc)
}
@ -98,7 +104,7 @@ func (m *MockAccountKeeper) SetAccount(arg0 context.Context, arg1 types0.Account
}
// SetAccount indicates an expected call of SetAccount.
func (mr *MockAccountKeeperMockRecorder) SetAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), arg0, arg1)
}
@ -107,6 +113,7 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(arg0, arg1 interface{}) *gom
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -136,7 +143,7 @@ func (m *MockBankKeeper) Burn(arg0 context.Context, arg1 *types.MsgBurn) (*types
}
// Burn indicates an expected call of Burn.
func (mr *MockBankKeeperMockRecorder) Burn(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) Burn(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Burn", reflect.TypeOf((*MockBankKeeper)(nil).Burn), arg0, arg1)
}
@ -150,7 +157,7 @@ func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types0.AccAddr
}
// GetAllBalances indicates an expected call of GetAllBalances.
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr)
}
@ -164,7 +171,7 @@ func (m *MockBankKeeper) MintCoins(ctx context.Context, moduleName string, amt t
}
// MintCoins indicates an expected call of MintCoins.
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, moduleName, amt)
}
@ -179,7 +186,7 @@ func (m *MockBankKeeper) MultiSend(arg0 context.Context, arg1 *types.MsgMultiSen
}
// MultiSend indicates an expected call of MultiSend.
func (mr *MockBankKeeperMockRecorder) MultiSend(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) MultiSend(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MultiSend", reflect.TypeOf((*MockBankKeeper)(nil).MultiSend), arg0, arg1)
}
@ -194,7 +201,7 @@ func (m *MockBankKeeper) Send(arg0 context.Context, arg1 *types.MsgSend) (*types
}
// Send indicates an expected call of Send.
func (mr *MockBankKeeperMockRecorder) Send(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) Send(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockBankKeeper)(nil).Send), arg0, arg1)
}
@ -208,7 +215,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, sende
}
// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt)
}
@ -222,7 +229,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, sender
}
// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt)
}
@ -237,7 +244,7 @@ func (m *MockBankKeeper) SetSendEnabled(arg0 context.Context, arg1 *types.MsgSet
}
// SetSendEnabled indicates an expected call of SetSendEnabled.
func (mr *MockBankKeeperMockRecorder) SetSendEnabled(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SetSendEnabled(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSendEnabled", reflect.TypeOf((*MockBankKeeper)(nil).SetSendEnabled), arg0, arg1)
}
@ -251,7 +258,7 @@ func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types0.AccAddr
}
// SpendableCoins indicates an expected call of SpendableCoins.
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr)
}
@ -266,7 +273,7 @@ func (m *MockBankKeeper) UpdateParams(arg0 context.Context, arg1 *types.MsgUpdat
}
// UpdateParams indicates an expected call of UpdateParams.
func (mr *MockBankKeeperMockRecorder) UpdateParams(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) UpdateParams(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateParams", reflect.TypeOf((*MockBankKeeper)(nil).UpdateParams), arg0, arg1)
}
@ -275,6 +282,7 @@ func (mr *MockBankKeeperMockRecorder) UpdateParams(arg0, arg1 interface{}) *gomo
type MockStakingKeeper struct {
ctrl *gomock.Controller
recorder *MockStakingKeeperMockRecorder
isgomock struct{}
}
// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.
@ -304,7 +312,7 @@ func (m *MockStakingKeeper) BondDenom(ctx context.Context) (string, error) {
}
// BondDenom indicates an expected call of BondDenom.
func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondDenom", reflect.TypeOf((*MockStakingKeeper)(nil).BondDenom), ctx)
}

View File

@ -17,7 +17,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/stretchr/testify v1.10.0
@ -159,6 +159,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require (
github.com/bytedance/sonic v1.12.6 // indirect
github.com/bytedance/sonic/loader v0.2.1 // indirect

View File

@ -4,8 +4,8 @@ import (
"context"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/collections"
"cosmossdk.io/core/appmodule"

View File

@ -4,8 +4,8 @@ import (
gocontext "context"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"

View File

@ -4,8 +4,8 @@ import (
"context"
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/appmodule"
coretesting "cosmossdk.io/core/testing"

View File

@ -3,8 +3,8 @@ package mint_test
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/log"
"cosmossdk.io/math"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/mint/types/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/mint/types/expected_keepers.go -package testutil -destination x/mint/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -11,13 +16,14 @@ import (
address "cosmossdk.io/core/address"
math "cosmossdk.io/math"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockStakingKeeper is a mock of StakingKeeper interface.
type MockStakingKeeper struct {
ctrl *gomock.Controller
recorder *MockStakingKeeperMockRecorder
isgomock struct{}
}
// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.
@ -47,7 +53,7 @@ func (m *MockStakingKeeper) BondedRatio(ctx context.Context) (math.LegacyDec, er
}
// BondedRatio indicates an expected call of BondedRatio.
func (mr *MockStakingKeeperMockRecorder) BondedRatio(ctx interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) BondedRatio(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BondedRatio", reflect.TypeOf((*MockStakingKeeper)(nil).BondedRatio), ctx)
}
@ -62,7 +68,7 @@ func (m *MockStakingKeeper) StakingTokenSupply(ctx context.Context) (math.Int, e
}
// StakingTokenSupply indicates an expected call of StakingTokenSupply.
func (mr *MockStakingKeeperMockRecorder) StakingTokenSupply(ctx interface{}) *gomock.Call {
func (mr *MockStakingKeeperMockRecorder) StakingTokenSupply(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StakingTokenSupply", reflect.TypeOf((*MockStakingKeeper)(nil).StakingTokenSupply), ctx)
}
@ -71,6 +77,7 @@ func (mr *MockStakingKeeperMockRecorder) StakingTokenSupply(ctx interface{}) *go
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -113,7 +120,7 @@ func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName str
}
// GetModuleAccount indicates an expected call of GetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName)
}
@ -127,7 +134,7 @@ func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress {
}
// GetModuleAddress indicates an expected call of GetModuleAddress.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name)
}
@ -139,7 +146,7 @@ func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types.Mo
}
// SetModuleAccount indicates an expected call of SetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1)
}
@ -148,6 +155,7 @@ func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -176,7 +184,7 @@ func (m *MockBankKeeper) GetSupply(ctx context.Context, denom string) types.Coin
}
// GetSupply indicates an expected call of GetSupply.
func (mr *MockBankKeeperMockRecorder) GetSupply(ctx, denom interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetSupply(ctx, denom any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSupply", reflect.TypeOf((*MockBankKeeper)(nil).GetSupply), ctx, denom)
}
@ -190,7 +198,7 @@ func (m *MockBankKeeper) MintCoins(ctx context.Context, name string, amt types.C
}
// MintCoins indicates an expected call of MintCoins.
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, name, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, name, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintCoins", reflect.TypeOf((*MockBankKeeper)(nil).MintCoins), ctx, name, amt)
}
@ -204,7 +212,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, sende
}
// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt)
}
@ -218,7 +226,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, sender
}
// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt)
}

View File

@ -13,7 +13,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/stretchr/testify v1.10.0
@ -170,6 +170,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require github.com/cockroachdb/apd/v3 v3.2.1 // indirect
replace github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-rc.1

View File

@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/header"
"cosmossdk.io/log"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/nft/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/nft/expected_keepers.go -package testutil -destination x/nft/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -10,13 +15,14 @@ import (
address "cosmossdk.io/core/address"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockBankKeeper is a mock of BankKeeper interface.
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -45,7 +51,7 @@ func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddre
}
// SpendableCoins indicates an expected call of SpendableCoins.
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr)
}
@ -54,6 +60,7 @@ func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gom
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -96,7 +103,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddres
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr)
}
@ -110,7 +117,7 @@ func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress {
}
// GetModuleAddress indicates an expected call of GetModuleAddress.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name)
}

View File

@ -16,7 +16,6 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/spf13/cobra v1.8.1
@ -163,6 +162,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require github.com/cockroachdb/apd/v3 v3.2.1 // indirect
replace github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-rc.1

View File

@ -485,7 +485,6 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v1.0.0 h1:BvNoksIyRqyQTW78rIZP9A44WwAminKiomQa7jXp9EI=
@ -535,7 +534,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -568,7 +566,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -629,7 +626,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@ -8,7 +8,7 @@ import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockStakingKeeper is a mock of StakingKeeper interface.

View File

@ -14,7 +14,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.52.0
github.com/cosmos/gogoproto v1.7.0
github.com/golang/mock v1.6.0
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/stretchr/testify v1.10.0
@ -170,6 +170,8 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)
require go.uber.org/mock v0.5.0
require github.com/cockroachdb/apd/v3 v3.2.1 // indirect
replace github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-rc.1

View File

@ -3,7 +3,7 @@ package keeper_test
import (
"time"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"cosmossdk.io/math"
"cosmossdk.io/x/protocolpool/types"

View File

@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"cosmossdk.io/core/appmodule"
"cosmossdk.io/core/header"

View File

@ -3,7 +3,7 @@ package keeper_test
import (
"time"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"cosmossdk.io/collections"
"cosmossdk.io/core/header"

View File

@ -1,5 +1,10 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: x/protocolpool/types/expected_keepers.go
//
// Generated by this command:
//
// mockgen -source=x/protocolpool/types/expected_keepers.go -package testutil -destination x/protocolpool/testutil/expected_keepers_mocks.go
//
// Package testutil is a generated GoMock package.
package testutil
@ -10,13 +15,14 @@ import (
address "cosmossdk.io/core/address"
types "github.com/cosmos/cosmos-sdk/types"
gomock "github.com/golang/mock/gomock"
gomock "go.uber.org/mock/gomock"
)
// MockAccountKeeper is a mock of AccountKeeper interface.
type MockAccountKeeper struct {
ctrl *gomock.Controller
recorder *MockAccountKeeperMockRecorder
isgomock struct{}
}
// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
@ -59,7 +65,7 @@ func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddres
}
// GetAccount indicates an expected call of GetAccount.
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr)
}
@ -73,7 +79,7 @@ func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, name string) t
}
// GetModuleAccount indicates an expected call of GetModuleAccount.
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, name)
}
@ -87,7 +93,7 @@ func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress {
}
// GetModuleAddress indicates an expected call of GetModuleAddress.
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call {
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name)
}
@ -96,6 +102,7 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gom
type MockBankKeeper struct {
ctrl *gomock.Controller
recorder *MockBankKeeperMockRecorder
isgomock struct{}
}
// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
@ -124,7 +131,7 @@ func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types.AccAddre
}
// GetAllBalances indicates an expected call of GetAllBalances.
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr)
}
@ -138,7 +145,7 @@ func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types.AccAddress,
}
// GetBalance indicates an expected call of GetBalance.
func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom)
}
@ -152,7 +159,7 @@ func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, sende
}
// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt)
}
@ -166,7 +173,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, sende
}
// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt)
}
@ -180,7 +187,7 @@ func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, sender
}
// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule.
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt)
}
@ -194,7 +201,7 @@ func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddre
}
// SpendableCoins indicates an expected call of SpendableCoins.
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr)
}

Some files were not shown because too many files have changed in this diff Show More