Skip to content

Commit

Permalink
Revert "dragonberry"
Browse files Browse the repository at this point in the history
  • Loading branch information
BitCanna authored Oct 24, 2022
1 parent bf3577b commit 2aa1dd6
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
10 changes: 5 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"path/filepath"

bcnaappparams "github.com/BitCannaGlobal/bcna/app/params"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
Expand Down Expand Up @@ -182,6 +181,7 @@ var (
)

var (
_ cosmoscmd.App = (*App)(nil)
_ servertypes.Application = (*App)(nil)
_ simapp.App = (*App)(nil)
)
Expand Down Expand Up @@ -259,11 +259,11 @@ func New(
skipUpgradeHeights map[int64]bool,
homePath string,
invCheckPeriod uint,
encodingConfig bcnaappparams.EncodingConfig,
encodingConfig cosmoscmd.EncodingConfig,
appOpts servertypes.AppOptions,
baseAppOptions ...func(*baseapp.BaseApp),
) cosmoscmd.App {
appCodec := encodingConfig.Codec
appCodec := encodingConfig.Marshaler
cdc := encodingConfig.Amino
interfaceRegistry := encodingConfig.InterfaceRegistry

Expand Down Expand Up @@ -445,7 +445,7 @@ func New(
// this line is used by starport scaffolding # stargate/app/keeperDefinition

// Create static IBC router, add transfer route, then set and seal it
ibcRouter := ibcporttypes.NewRouter() // rbg gaiad is different
ibcRouter := ibcporttypes.NewRouter() //rbg gaiad is different
ibcRouter.
AddRoute(icahosttypes.SubModuleName, icaHostIBCModule).
AddRoute(ibctransfertypes.ModuleName, transferIBCModule)
Expand Down Expand Up @@ -592,7 +592,7 @@ func New(
params.NewAppModule(app.ParamsKeeper),
evidence.NewAppModule(app.EvidenceKeeper),
ibc.NewAppModule(app.IBCKeeper),
// ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
//ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
transferModule,
bcnaModule,
// this line is used by starport scaffolding # stargate/app/appModule
Expand Down
3 changes: 1 addition & 2 deletions app/simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"time"

"github.com/BitCannaGlobal/bcna/app"
bcnaappparams "github.com/BitCannaGlobal/bcna/app/params"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/simapp"
Expand Down Expand Up @@ -74,7 +73,7 @@ func BenchmarkSimulation(b *testing.B) {
require.NoError(b, err)
})

encoding := bcnaappparams.MakeTestEncodingConfig()
encoding := cosmoscmd.MakeEncodingConfig(app.ModuleBasics)

app := app.New(
logger,
Expand Down
2 changes: 1 addition & 1 deletion cmd/bcnad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (ac appCreator) appExport(
loadLatest = true
}

bcnaApp := bcna.New(
bcnaApp := bcna.NewbcnaApp(
logger,
db,
traceStore,
Expand Down
25 changes: 12 additions & 13 deletions cmd/bcnad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@ package main
import (
"os"

"github.com/cosmos/cosmos-sdk/server"
"github.com/BitCannaGlobal/bcna/app"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/BitCannaGlobal/bcna/app"
"github.com/BitCannaGlobal/bcna/cmd/bcnad/cmd"
"github.com/ignite/cli/ignite/pkg/cosmoscmd"
)

func main() {
rootCmd, _ := cmd.NewRootCmd()

rootCmd, _ := cosmoscmd.NewRootCmd(
app.Name,
app.AccountAddressPrefix,
app.DefaultNodeHome,
app.Name,
app.ModuleBasics,
app.New,
// this line is used by starport scaffolding # root/arguments
)
if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil {
switch e := err.(type) {
case server.ErrorCode:
os.Exit(e.Code)

default:
os.Exit(1)
}
os.Exit(1)
}
}
8 changes: 4 additions & 4 deletions testutil/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"testing"
"time"

bcnaappparams "github.com/BitCannaGlobal/bcna/app/params"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
Expand All @@ -15,6 +14,7 @@ import (
"github.com/cosmos/cosmos-sdk/testutil/network"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/ignite/cli/ignite/pkg/cosmoscmd"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmdb "github.com/tendermint/tm-db"

Expand Down Expand Up @@ -46,9 +46,9 @@ func New(t *testing.T, configs ...network.Config) *network.Network {
// DefaultConfig will initialize config for the network with custom application,
// genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig
func DefaultConfig() network.Config {
encoding := bcnaappparams.MakeTestEncodingConfig()
encoding := cosmoscmd.MakeEncodingConfig(app.ModuleBasics)
return network.Config{
Codec: encoding.Codec,
Codec: encoding.Marshaler,
TxConfig: encoding.TxConfig,
LegacyAmino: encoding.Amino,
InterfaceRegistry: encoding.InterfaceRegistry,
Expand All @@ -62,7 +62,7 @@ func DefaultConfig() network.Config {
baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices),
)
},
GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Codec),
GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Marshaler),
TimeoutCommit: 2 * time.Second,
ChainID: "chain-" + tmrand.NewRand().Str(6),
NumValidators: 1,
Expand Down

0 comments on commit 2aa1dd6

Please sign in to comment.