-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
91 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/client" | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" | ||
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" | ||
ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" | ||
) | ||
|
||
// GetKey returns the KVStoreKey for the provided store key. | ||
// | ||
// NOTE: This is solely to be used for testing purposes. | ||
func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey { | ||
return app.keys[storeKey] | ||
} | ||
|
||
// GetTKey returns the TransientStoreKey for the provided store key. | ||
// | ||
// NOTE: This is solely to be used for testing purposes. | ||
func (app *App) GetTKey(storeKey string) *storetypes.TransientStoreKey { | ||
return app.tkeys[storeKey] | ||
} | ||
|
||
// GetMemKey returns the MemStoreKey for the provided mem key. | ||
// | ||
// NOTE: This is solely used for testing purposes. | ||
func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { | ||
return app.memKeys[storeKey] | ||
} | ||
|
||
// GetSubspace returns a param subspace for a given module name. | ||
// | ||
// NOTE: This is solely to be used for testing purposes. | ||
func (app *App) GetSubspace(moduleName string) paramstypes.Subspace { | ||
subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) | ||
return subspace | ||
} | ||
|
||
// IBC Testing | ||
func (app *App) GetStakingKeeper() ibctestingtypes.StakingKeeper { | ||
return app.StakingKeeper | ||
} | ||
|
||
func (app *App) GetIBCKeeper() *ibckeeper.Keeper { | ||
return app.IBCKeeper | ||
} | ||
|
||
func (app *App) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { | ||
return app.ScopedIBCKeeper | ||
} | ||
|
||
func (app *App) GetTxConfig() client.TxConfig { | ||
return app.txConfig | ||
} | ||
|
||
// LegacyAmino returns SimApp's amino codec. | ||
// | ||
// NOTE: This is solely to be used for testing purposes as it may be desirable | ||
// for modules to register their own custom testing types. | ||
func (app *App) LegacyAmino() *codec.LegacyAmino { | ||
return app.cdc | ||
} | ||
|
||
// AppCodec returns an app codec. | ||
// | ||
// NOTE: This is solely to be used for testing purposes as it may be desirable | ||
// for modules to register their own custom testing types. | ||
func (app *App) AppCodec() codec.Codec { | ||
return app.appCodec | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.53.3 golangci-lint run -v | ||
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.56.2 golangci-lint run -v |