-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into refactor/plugins-config-file
- Loading branch information
Showing
14 changed files
with
364 additions
and
13 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
60 changes: 60 additions & 0 deletions
60
ignite/pkg/cosmosanalysis/app/testdata/modules/runtime_api_routes/app.go
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,60 @@ | ||
package app | ||
|
||
import ( | ||
"cosmossdk.io/api/tendermint/abci" | ||
"cosmossdk.io/client/v2/autocli" | ||
"github.com/cosmos/cosmos-sdk/client" | ||
codectypes "github.com/cosmos/cosmos-sdk/codec/types" | ||
"github.com/cosmos/cosmos-sdk/runtime" | ||
"github.com/cosmos/cosmos-sdk/server/api" | ||
"github.com/cosmos/cosmos-sdk/server/config" | ||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
"github.com/cosmos/cosmos-sdk/x/auth" | ||
"github.com/cosmos/cosmos-sdk/x/bank" | ||
"github.com/cosmos/cosmos-sdk/x/gov" | ||
govclient "github.com/cosmos/cosmos-sdk/x/gov/client" | ||
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" | ||
"github.com/cosmos/cosmos-sdk/x/staking" | ||
foomodule "github.com/username/test/x/foo" | ||
) | ||
|
||
// App modules are defined as NewBasicManager arguments | ||
var ModuleBasics = module.NewBasicManager( | ||
auth.AppModuleBasic{}, | ||
bank.AppModuleBasic{}, | ||
staking.AppModuleBasic{}, | ||
gov.NewAppModuleBasic([]govclient.ProposalHandler{ | ||
paramsclient.ProposalHandler, | ||
}), | ||
foomodule.AppModuleBasic{}, | ||
) | ||
|
||
type Foo struct { | ||
*runtime.App | ||
} | ||
|
||
func (Foo) Name() string { return "foo" } | ||
func (Foo) InterfaceRegistry() codectypes.InterfaceRegistry { return nil } | ||
func (Foo) TxConfig() client.TxConfig { return nil } | ||
func (Foo) AutoCliOpts() autocli.AppOptions { return autocli.AppOptions{} } | ||
|
||
func (Foo) BeginBlocker(sdk.Context, abci.RequestBeginBlock) abci.ResponseBeginBlock { | ||
return abci.ResponseBeginBlock{} | ||
} | ||
|
||
func (Foo) EndBlocker(sdk.Context, abci.RequestEndBlock) abci.ResponseEndBlock { | ||
return abci.ResponseEndBlock{} | ||
} | ||
|
||
func (app *Foo) RegisterAPIRoutes(s *api.Server, cfg config.APIConfig) { | ||
// This module should be discovered | ||
foomodule.RegisterGRPCGatewayRoutes(s.ClientCtx, s.GRPCGatewayRouter) | ||
// Runtime app modules for the current Cosmos SDK should be discovered too | ||
app.App.RegisterAPIRoutes(apiSvr, apiConfig) | ||
} | ||
|
||
func (Foo) GetKey(storeKey string) *storetypes.KVStoreKey { return nil } | ||
|
||
func (Foo) TxConfig() client.TxConfig { return nil } |
37 changes: 37 additions & 0 deletions
37
ignite/pkg/cosmosanalysis/app/testdata/modules/runtime_api_routes/go.mod
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,37 @@ | ||
module app | ||
|
||
go 1.20 | ||
|
||
require ( | ||
cosmossdk.io/api v0.3.1 | ||
cosmossdk.io/core v0.5.1 | ||
cosmossdk.io/depinject v1.0.0-alpha.3 | ||
cosmossdk.io/errors v1.0.0-beta.7 | ||
cosmossdk.io/math v1.0.1 | ||
github.com/bufbuild/buf v1.23.1 | ||
github.com/cometbft/cometbft v0.37.2 | ||
github.com/cometbft/cometbft-db v0.8.0 | ||
github.com/cosmos/cosmos-proto v1.0.0-beta.2 | ||
github.com/cosmos/cosmos-sdk v0.47.3 | ||
github.com/cosmos/gogoproto v1.4.10 | ||
github.com/cosmos/ibc-go/v7 v7.2.0 | ||
github.com/golang/protobuf v1.5.3 | ||
github.com/gorilla/mux v1.8.0 | ||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 | ||
github.com/spf13/cast v1.5.1 | ||
github.com/spf13/cobra v1.7.0 | ||
github.com/spf13/pflag v1.0.5 | ||
github.com/stretchr/testify v1.8.4 | ||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 | ||
google.golang.org/grpc v1.55.0 | ||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 | ||
google.golang.org/protobuf v1.31.0 | ||
) | ||
|
||
replace ( | ||
// use cosmos fork of keyring | ||
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 | ||
// replace broken goleveldb | ||
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 | ||
) |
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
Oops, something went wrong.