Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "SDK v.0.44.3 & Tendrmint v0.34.14 & IBC v.1.2.3" #3

Merged
merged 1 commit into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
654 changes: 0 additions & 654 deletions app.go

This file was deleted.

50 changes: 7 additions & 43 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ import (
"github.com/cosmos/cosmos-sdk/server/api"
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/simapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
Expand Down Expand Up @@ -161,9 +159,8 @@ var (
)

var (
_ cosmoscmd.App = (*App)(nil)
_ cosmoscmd.CosmosApp = (*App)(nil)
_ servertypes.Application = (*App)(nil)
_ simapp.App = (*App)(nil)
)

func init() {
Expand Down Expand Up @@ -216,14 +213,11 @@ type App struct {
BcnaKeeper bcnamodulekeeper.Keeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration

// mm is the module manager
// the module manager
mm *module.Manager

// sm is the simulation manager
sm *module.SimulationManager
}

// New returns a reference to an initialized blockchain app
// New returns a reference to an initialized Gaia.
func New(
logger log.Logger,
db dbm.DB,
Expand Down Expand Up @@ -322,14 +316,13 @@ func New(
)

// register the proposal types
//AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))
govRouter := govtypes.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
Expand All @@ -354,9 +347,8 @@ func New(
appCodec,
keys[bcnamoduletypes.StoreKey],
keys[bcnamoduletypes.MemStoreKey],
app.GetSubspace(bcnamoduletypes.ModuleName),
)
bcnaModule := bcnamodule.NewAppModule(appCodec, app.BcnaKeeper, app.AccountKeeper, app.BankKeeper)
bcnaModule := bcnamodule.NewAppModule(appCodec, app.BcnaKeeper)

// this line is used by starport scaffolding # stargate/app/keeperDefinition

Expand Down Expand Up @@ -439,26 +431,6 @@ func New(
app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino)
app.mm.RegisterServices(module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()))

// create the simulation manager and define the order of the modules for deterministic simulations
app.sm = module.NewSimulationManager(
auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper),
capability.NewAppModule(appCodec, *app.CapabilityKeeper),
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper),
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper),
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
params.NewAppModule(app.ParamsKeeper),
evidence.NewAppModule(app.EvidenceKeeper),
ibc.NewAppModule(app.IBCKeeper),
transferModule,
bcnaModule,
// this line is used by starport scaffolding # stargate/app/appModule
)
app.sm.RegisterStoreDecoders()

// initialize stores
app.MountKVStores(keys)
app.MountTransientStores(tkeys)
Expand Down Expand Up @@ -500,9 +472,6 @@ func New(
// Name returns the name of the App
func (app *App) Name() string { return app.BaseApp.Name() }

// GetBaseApp returns the base app of the application
func (app App) GetBaseApp() *baseapp.BaseApp { return app.BaseApp }

// BeginBlocker application updates every begin block
func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock {
return app.mm.BeginBlock(ctx, req)
Expand Down Expand Up @@ -546,15 +515,15 @@ func (app *App) LegacyAmino() *codec.LegacyAmino {
return app.cdc
}

// AppCodec returns an app codec.
// AppCodec returns Gaia's 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
}

// InterfaceRegistry returns an InterfaceRegistry
// InterfaceRegistry returns Gaia's InterfaceRegistry
func (app *App) InterfaceRegistry() types.InterfaceRegistry {
return app.interfaceRegistry
}
Expand Down Expand Up @@ -647,8 +616,3 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino

return paramsKeeper
}

// SimulationManager implements the SimulationApp interface
func (app *App) SimulationManager() *module.SimulationManager {
return app.sm
}
112 changes: 0 additions & 112 deletions app/simulation_test.go

This file was deleted.

24 changes: 0 additions & 24 deletions bcnad/main.go

This file was deleted.

46 changes: 0 additions & 46 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,42 +177,6 @@ paths:
format: uint64
tags:
- Query
/BitCannaGlobal/bcna/bcna/params:
get:
summary: Parameters queries the parameters of the module.
operationId: BitCannaGlobalBcnaBcnaParams
responses:
'200':
description: A successful response.
schema:
type: object
properties:
params:
description: params holds all the parameters of this module.
type: object
description: >-
QueryParamsResponse is response type for the Query/Params RPC
method.
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
tags:
- Query
/BitCannaGlobal/bcna/bcna/supplychain:
get:
summary: Queries a list of supplychain items.
Expand Down Expand Up @@ -12920,9 +12884,6 @@ definitions:
type: object
BitCannaGlobal.bcna.bcna.MsgUpdateSupplychainResponse:
type: object
BitCannaGlobal.bcna.bcna.Params:
type: object
description: Params defines the parameters for the module.
BitCannaGlobal.bcna.bcna.QueryAllBitcannaidResponse:
type: object
properties:
Expand Down Expand Up @@ -13041,13 +13002,6 @@ definitions:
type: string
creator:
type: string
BitCannaGlobal.bcna.bcna.QueryParamsResponse:
type: object
properties:
params:
description: params holds all the parameters of this module.
type: object
description: QueryParamsResponse is response type for the Query/Params RPC method.
BitCannaGlobal.bcna.bcna.Supplychain:
type: object
properties:
Expand Down
Loading