Skip to content

Commit

Permalink
Merge branch 'next' into sdk-50
Browse files Browse the repository at this point in the history
  • Loading branch information
codehans committed Mar 14, 2024
2 parents 5ad7ea9 + a7fc109 commit 369ce39
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 89 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
#### Command List ####

check-go-version:
@if ! go version | grep -Eq "go1.21.[1-3]"; then \
echo "\033[0;31mERROR:\033[0m Go version 1.21.1 through 1.21.3 is required for compiling kujirad. Installed version:" "$(shell go version)"; \
@if ! go version | grep -Eq "go1.21.8"; then \
echo "\033[0;31mERROR:\033[0m Go version 1.21.8 is required for compiling kujirad. Installed version:" "$(shell go version)"; \
exit 1; \
fi

Expand Down
63 changes: 1 addition & 62 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ import (
"github.com/cosmos/ibc-go/modules/capability"
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types"

"github.com/cosmos/cosmos-sdk/x/upgrade"
bank "github.com/terra-money/alliance/custom/bank"
bankkeeper "github.com/terra-money/alliance/custom/bank/keeper"
alliancemodule "github.com/terra-money/alliance/x/alliance"
Expand Down Expand Up @@ -1299,22 +1299,6 @@ func (app *App) ModuleAccountAddrs() map[string]bool {
return modAccAddrs
}

// 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.legacyAmino
}

// 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
}

// InterfaceRegistry returns an InterfaceRegistry
func (app *App) InterfaceRegistry() types.InterfaceRegistry {
return app.interfaceRegistry
Expand Down Expand Up @@ -1351,51 +1335,6 @@ func (app *App) DefaultGenesis() map[string]json.RawMessage {
return app.BasicModuleManager.DefaultGenesis(app.appCodec)
}

// 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
}

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
}

// RegisterAPIRoutes registers all application module routes with the provided
// API server.
func (app *App) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig) {
Expand Down
73 changes: 73 additions & 0 deletions app/testing.go
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
}
5 changes: 5 additions & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (

storetypes "cosmossdk.io/store/types"
upgradetypes "cosmossdk.io/x/upgrade/types"
batchtypes "github.com/Team-Kujira/core/x/batch/types"
cwicatypes "github.com/Team-Kujira/core/x/cw-ica/types"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
"github.com/cosmos/cosmos-sdk/types/module"

ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
Expand All @@ -22,6 +25,8 @@ func (app App) RegisterUpgradeHandlers() {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{
ibcwasmtypes.ModuleName,
batchtypes.ModuleName,
cwicatypes.ModuleName,
},
}

Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
cosmossdk.io/errors v1.0.1
cosmossdk.io/math v1.2.0
cosmossdk.io/store v1.0.2
cosmossdk.io/tools/rosetta v0.50.4
github.com/CosmWasm/wasmd v0.50.0
github.com/CosmWasm/wasmvm v1.5.2
github.com/cometbft/cometbft v0.38.5
Expand Down Expand Up @@ -43,6 +42,7 @@ require (
github.com/cosmos/cosmos-db v1.0.0
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.1.1-0.20231213092650-57fcdb9a9a9d
github.com/cosmos/rosetta v0.50.4
github.com/hashicorp/go-metrics v0.5.3
)

Expand Down Expand Up @@ -76,12 +76,14 @@ require (
github.com/cockroachdb/pebble v1.1.0 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v1.0.1 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
github.com/creachadair/atomicfile v0.3.1 // indirect
github.com/creachadair/tomledit v0.0.24 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA=
github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c=
github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU=
github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg=
github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M=
Expand Down Expand Up @@ -386,6 +388,10 @@ github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM=
github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8=
github.com/cosmos/rosetta v0.50.4 h1:CbdzULUyHRkSbvUGDGnaL8vUxiA6vte/hZW2GF2aRWY=
github.com/cosmos/rosetta v0.50.4/go.mod h1:jsYdk/QwwxhZHGAFHhlRNaTqASK9pi6jqNs9+NClGso=
github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM=
github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
Expand Down
23 changes: 0 additions & 23 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,3 @@
**kujira** is a blockchain built using Cosmos SDK and Tendermint and created with [Ignite CLI](https://ignite.com/cli).

Please refer to [docs.kujira.app](https://docs.kujira.app/) and join our [Discord](https://t.co/kur923FTZk) for guidance in getting set up.

## Get started

Ensure your ignite version is 0.26.1

```
ignite version
```

If not, you can download the latest. See [the docs](https://docs.ignite.com/welcome/install#verify-your-ignite-cli-version) for more info

```
curl https://get.ignite.com/cli | bash
sudo mv ignite /usr/local/bin/
```

Then start the chain

```
ignite chain serve
```

`serve` command installs dependencies, builds, initializes, and starts your blockchain in development.
2 changes: 1 addition & 1 deletion scripts/lint.sh
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

0 comments on commit 369ce39

Please sign in to comment.