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

chore!: v22 Namespace & Upgrade Handler #993

Merged
merged 10 commits into from
Apr 21, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ name: build
on:
push:
paths:
- '**.go'
- 'go.sum'
- "**.go"
- "go.sum"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GO_VERSION: 1.21.0
GO_VERSION: 1.22.0

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.21.0
GO_VERSION: 1.22.0

jobs:
analyze:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master
- main
pull_request:

permissions:
contents: read

Expand All @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.21.0
GO_VERSION: 1.22.0

jobs:
golangci:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/interchaintest-E2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
packages: write

env:
GO_VERSION: 1.21.0
GO_VERSION: 1.22.0
TAR_PATH: /tmp/juno-docker-image.tar
IMAGE_NAME: juno-docker-image

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ heighliner*
# emacs editor config
\#*\#
.\#*

.DS_Store
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build . -t cosmoscontracts/juno:latest
# docker run --rm -it cosmoscontracts/juno:latest /bin/sh
FROM golang:1.21-alpine AS go-builder
FROM golang:1.22-alpine AS go-builder

# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
Expand All @@ -18,12 +18,12 @@ WORKDIR /code
# Download dependencies and CosmWasm libwasmvm if found.
ADD go.mod go.sum ./
RUN set -eux; \
export ARCH=$(uname -m); \
WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm | awk '{print $2}'); \
if [ ! -z "${WASM_VERSION}" ]; then \
wget -O /lib/libwasmvm_muslc.a https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/libwasmvm_muslc.${ARCH}.a; \
fi; \
go mod download;
export ARCH=$(uname -m); \
WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm | awk '{print $2}'); \
if [ ! -z "${WASM_VERSION}" ]; then \
wget -O /lib/libwasmvm_muslc.a https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/libwasmvm_muslc.${ARCH}.a; \
fi; \
go mod download;

# Copy over code
COPY . /code/
Expand Down
14 changes: 7 additions & 7 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

decorators "github.com/CosmosContracts/juno/v21/app/decorators"
feepayante "github.com/CosmosContracts/juno/v21/x/feepay/ante"
feepaykeeper "github.com/CosmosContracts/juno/v21/x/feepay/keeper"
feeshareante "github.com/CosmosContracts/juno/v21/x/feeshare/ante"
feesharekeeper "github.com/CosmosContracts/juno/v21/x/feeshare/keeper"
globalfeeante "github.com/CosmosContracts/juno/v21/x/globalfee/ante"
globalfeekeeper "github.com/CosmosContracts/juno/v21/x/globalfee/keeper"
decorators "github.com/CosmosContracts/juno/v22/app/decorators"
feepayante "github.com/CosmosContracts/juno/v22/x/feepay/ante"
feepaykeeper "github.com/CosmosContracts/juno/v22/x/feepay/keeper"
feeshareante "github.com/CosmosContracts/juno/v22/x/feeshare/ante"
feesharekeeper "github.com/CosmosContracts/juno/v22/x/feeshare/keeper"
globalfeeante "github.com/CosmosContracts/juno/v22/x/globalfee/ante"
globalfeekeeper "github.com/CosmosContracts/juno/v22/x/globalfee/keeper"
)

// Lower back to 1 mil after https://github.com/cosmos/relayer/issues/1255
Expand Down
46 changes: 25 additions & 21 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,28 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v21/app/keepers"
"github.com/CosmosContracts/juno/v21/app/openapiconsole"
upgrades "github.com/CosmosContracts/juno/v21/app/upgrades"
testnetV18alpha2 "github.com/CosmosContracts/juno/v21/app/upgrades/testnet/v18.0.0-alpha.2"
testnetV18alpha3 "github.com/CosmosContracts/juno/v21/app/upgrades/testnet/v18.0.0-alpha.3"
testnetV18alpha4 "github.com/CosmosContracts/juno/v21/app/upgrades/testnet/v18.0.0-alpha.4"
testnetV19alpha3 "github.com/CosmosContracts/juno/v21/app/upgrades/testnet/v19.0.0-alpha.3"
testnetV21alpha1 "github.com/CosmosContracts/juno/v21/app/upgrades/testnet/v21.0.0-alpha.1"
v10 "github.com/CosmosContracts/juno/v21/app/upgrades/v10"
v11 "github.com/CosmosContracts/juno/v21/app/upgrades/v11"
v12 "github.com/CosmosContracts/juno/v21/app/upgrades/v12"
v13 "github.com/CosmosContracts/juno/v21/app/upgrades/v13"
v14 "github.com/CosmosContracts/juno/v21/app/upgrades/v14"
v15 "github.com/CosmosContracts/juno/v21/app/upgrades/v15"
v16 "github.com/CosmosContracts/juno/v21/app/upgrades/v16"
v17 "github.com/CosmosContracts/juno/v21/app/upgrades/v17"
v18 "github.com/CosmosContracts/juno/v21/app/upgrades/v18"
v19 "github.com/CosmosContracts/juno/v21/app/upgrades/v19"
v21 "github.com/CosmosContracts/juno/v21/app/upgrades/v21"
"github.com/CosmosContracts/juno/v21/docs"
"github.com/CosmosContracts/juno/v22/app/keepers"
"github.com/CosmosContracts/juno/v22/app/openapiconsole"
upgrades "github.com/CosmosContracts/juno/v22/app/upgrades"
testnetV18alpha2 "github.com/CosmosContracts/juno/v22/app/upgrades/testnet/v18.0.0-alpha.2"
testnetV18alpha3 "github.com/CosmosContracts/juno/v22/app/upgrades/testnet/v18.0.0-alpha.3"
testnetV18alpha4 "github.com/CosmosContracts/juno/v22/app/upgrades/testnet/v18.0.0-alpha.4"
testnetV19alpha3 "github.com/CosmosContracts/juno/v22/app/upgrades/testnet/v19.0.0-alpha.3"
testnetV21alpha1 "github.com/CosmosContracts/juno/v22/app/upgrades/testnet/v21.0.0-alpha.1"
testnetV22alpha1 "github.com/CosmosContracts/juno/v22/app/upgrades/testnet/v22.0.0-alpha.1"
v10 "github.com/CosmosContracts/juno/v22/app/upgrades/v10"
v11 "github.com/CosmosContracts/juno/v22/app/upgrades/v11"
v12 "github.com/CosmosContracts/juno/v22/app/upgrades/v12"
v13 "github.com/CosmosContracts/juno/v22/app/upgrades/v13"
v14 "github.com/CosmosContracts/juno/v22/app/upgrades/v14"
v15 "github.com/CosmosContracts/juno/v22/app/upgrades/v15"
v16 "github.com/CosmosContracts/juno/v22/app/upgrades/v16"
v17 "github.com/CosmosContracts/juno/v22/app/upgrades/v17"
v18 "github.com/CosmosContracts/juno/v22/app/upgrades/v18"
v19 "github.com/CosmosContracts/juno/v22/app/upgrades/v19"
v21 "github.com/CosmosContracts/juno/v22/app/upgrades/v21"
v22 "github.com/CosmosContracts/juno/v22/app/upgrades/v22"
"github.com/CosmosContracts/juno/v22/docs"
)

const (
Expand Down Expand Up @@ -111,7 +113,8 @@ var (
testnetV18alpha4.Upgrade,
testnetV19alpha3.Upgrade,
testnetV21alpha1.Upgrade,

testnetV22alpha1.Upgrade,

v10.Upgrade,
v11.Upgrade,
v12.Upgrade,
Expand All @@ -123,6 +126,7 @@ var (
v18.Upgrade,
v19.Upgrade,
v21.Upgrade,
v22.Upgrade,
}
)

Expand Down
4 changes: 2 additions & 2 deletions app/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmosContracts/juno/v21/app"
appparams "github.com/CosmosContracts/juno/v21/app/params"
"github.com/CosmosContracts/juno/v22/app"
appparams "github.com/CosmosContracts/juno/v22/app/params"
)

type KeeperTestHelper struct {
Expand Down
6 changes: 3 additions & 3 deletions app/decorators/change_rate_decorator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/CosmosContracts/juno/v21/app"
decorators "github.com/CosmosContracts/juno/v21/app/decorators"
appparams "github.com/CosmosContracts/juno/v21/app/params"
"github.com/CosmosContracts/juno/v22/app"
decorators "github.com/CosmosContracts/juno/v22/app/decorators"
appparams "github.com/CosmosContracts/juno/v22/app/params"
)

// Define an empty ante handle
Expand Down
2 changes: 1 addition & 1 deletion app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app
import (
"github.com/cosmos/cosmos-sdk/std"

"github.com/CosmosContracts/juno/v21/app/params"
"github.com/CosmosContracts/juno/v22/app/params"
)

// MakeEncodingConfig creates an EncodingConfig for testing
Expand Down
40 changes: 20 additions & 20 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,25 @@ import (
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

junoburn "github.com/CosmosContracts/juno/v21/x/burn"
clockkeeper "github.com/CosmosContracts/juno/v21/x/clock/keeper"
clocktypes "github.com/CosmosContracts/juno/v21/x/clock/types"
cwhookskeeper "github.com/CosmosContracts/juno/v21/x/cw-hooks/keeper"
cwhookstypes "github.com/CosmosContracts/juno/v21/x/cw-hooks/types"
dripkeeper "github.com/CosmosContracts/juno/v21/x/drip/keeper"
driptypes "github.com/CosmosContracts/juno/v21/x/drip/types"
feepaykeeper "github.com/CosmosContracts/juno/v21/x/feepay/keeper"
feepaytypes "github.com/CosmosContracts/juno/v21/x/feepay/types"
feesharekeeper "github.com/CosmosContracts/juno/v21/x/feeshare/keeper"
feesharetypes "github.com/CosmosContracts/juno/v21/x/feeshare/types"
"github.com/CosmosContracts/juno/v21/x/globalfee"
globalfeekeeper "github.com/CosmosContracts/juno/v21/x/globalfee/keeper"
globalfeetypes "github.com/CosmosContracts/juno/v21/x/globalfee/types"
mintkeeper "github.com/CosmosContracts/juno/v21/x/mint/keeper"
minttypes "github.com/CosmosContracts/juno/v21/x/mint/types"
"github.com/CosmosContracts/juno/v21/x/tokenfactory/bindings"
tokenfactorykeeper "github.com/CosmosContracts/juno/v21/x/tokenfactory/keeper"
tokenfactorytypes "github.com/CosmosContracts/juno/v21/x/tokenfactory/types"
junoburn "github.com/CosmosContracts/juno/v22/x/burn"
clockkeeper "github.com/CosmosContracts/juno/v22/x/clock/keeper"
clocktypes "github.com/CosmosContracts/juno/v22/x/clock/types"
cwhookskeeper "github.com/CosmosContracts/juno/v22/x/cw-hooks/keeper"
cwhookstypes "github.com/CosmosContracts/juno/v22/x/cw-hooks/types"
dripkeeper "github.com/CosmosContracts/juno/v22/x/drip/keeper"
driptypes "github.com/CosmosContracts/juno/v22/x/drip/types"
feepaykeeper "github.com/CosmosContracts/juno/v22/x/feepay/keeper"
feepaytypes "github.com/CosmosContracts/juno/v22/x/feepay/types"
feesharekeeper "github.com/CosmosContracts/juno/v22/x/feeshare/keeper"
feesharetypes "github.com/CosmosContracts/juno/v22/x/feeshare/types"
"github.com/CosmosContracts/juno/v22/x/globalfee"
globalfeekeeper "github.com/CosmosContracts/juno/v22/x/globalfee/keeper"
globalfeetypes "github.com/CosmosContracts/juno/v22/x/globalfee/types"
mintkeeper "github.com/CosmosContracts/juno/v22/x/mint/keeper"
minttypes "github.com/CosmosContracts/juno/v22/x/mint/types"
"github.com/CosmosContracts/juno/v22/x/tokenfactory/bindings"
tokenfactorykeeper "github.com/CosmosContracts/juno/v22/x/tokenfactory/keeper"
tokenfactorytypes "github.com/CosmosContracts/juno/v22/x/tokenfactory/types"
)

var (
Expand Down Expand Up @@ -409,7 +409,6 @@ func NewAppKeepers(
govModAddress,
)


// Create Transfer Keepers
appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec,
Expand Down Expand Up @@ -469,6 +468,7 @@ func NewAppKeepers(
appKeepers.TokenFactoryKeeper = tokenfactorykeeper.NewKeeper(
appCodec,
appKeepers.keys[tokenfactorytypes.StoreKey],
maccPerms,
appKeepers.AccountKeeper,
appKeepers.BankKeeper,
appKeepers.DistrKeeper,
Expand Down
16 changes: 8 additions & 8 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

clocktypes "github.com/CosmosContracts/juno/v21/x/clock/types"
cwhookstypes "github.com/CosmosContracts/juno/v21/x/cw-hooks/types"
driptypes "github.com/CosmosContracts/juno/v21/x/drip/types"
feepaytypes "github.com/CosmosContracts/juno/v21/x/feepay/types"
feesharetypes "github.com/CosmosContracts/juno/v21/x/feeshare/types"
globalfeetypes "github.com/CosmosContracts/juno/v21/x/globalfee/types"
minttypes "github.com/CosmosContracts/juno/v21/x/mint/types"
tokenfactorytypes "github.com/CosmosContracts/juno/v21/x/tokenfactory/types"
clocktypes "github.com/CosmosContracts/juno/v22/x/clock/types"
cwhookstypes "github.com/CosmosContracts/juno/v22/x/cw-hooks/types"
driptypes "github.com/CosmosContracts/juno/v22/x/drip/types"
feepaytypes "github.com/CosmosContracts/juno/v22/x/feepay/types"
feesharetypes "github.com/CosmosContracts/juno/v22/x/feeshare/types"
globalfeetypes "github.com/CosmosContracts/juno/v22/x/globalfee/types"
minttypes "github.com/CosmosContracts/juno/v22/x/mint/types"
tokenfactorytypes "github.com/CosmosContracts/juno/v22/x/tokenfactory/types"
)

func (appKeepers *AppKeepers) GenerateKeys() {
Expand Down
30 changes: 15 additions & 15 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ import (
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

encparams "github.com/CosmosContracts/juno/v21/app/params"
"github.com/CosmosContracts/juno/v21/x/clock"
clocktypes "github.com/CosmosContracts/juno/v21/x/clock/types"
cwhooks "github.com/CosmosContracts/juno/v21/x/cw-hooks"
"github.com/CosmosContracts/juno/v21/x/drip"
driptypes "github.com/CosmosContracts/juno/v21/x/drip/types"
feepay "github.com/CosmosContracts/juno/v21/x/feepay"
feepaytypes "github.com/CosmosContracts/juno/v21/x/feepay/types"
feeshare "github.com/CosmosContracts/juno/v21/x/feeshare"
feesharetypes "github.com/CosmosContracts/juno/v21/x/feeshare/types"
"github.com/CosmosContracts/juno/v21/x/globalfee"
"github.com/CosmosContracts/juno/v21/x/mint"
minttypes "github.com/CosmosContracts/juno/v21/x/mint/types"
"github.com/CosmosContracts/juno/v21/x/tokenfactory"
tokenfactorytypes "github.com/CosmosContracts/juno/v21/x/tokenfactory/types"
encparams "github.com/CosmosContracts/juno/v22/app/params"
"github.com/CosmosContracts/juno/v22/x/clock"
clocktypes "github.com/CosmosContracts/juno/v22/x/clock/types"
cwhooks "github.com/CosmosContracts/juno/v22/x/cw-hooks"
"github.com/CosmosContracts/juno/v22/x/drip"
driptypes "github.com/CosmosContracts/juno/v22/x/drip/types"
feepay "github.com/CosmosContracts/juno/v22/x/feepay"
feepaytypes "github.com/CosmosContracts/juno/v22/x/feepay/types"
feeshare "github.com/CosmosContracts/juno/v22/x/feeshare"
feesharetypes "github.com/CosmosContracts/juno/v22/x/feeshare/types"
"github.com/CosmosContracts/juno/v22/x/globalfee"
"github.com/CosmosContracts/juno/v22/x/mint"
minttypes "github.com/CosmosContracts/juno/v22/x/mint/types"
"github.com/CosmosContracts/juno/v22/x/tokenfactory"
tokenfactorytypes "github.com/CosmosContracts/juno/v22/x/tokenfactory/types"
)

// ModuleBasics defines the module BasicManager is in charge of setting up basic,
Expand Down
4 changes: 2 additions & 2 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

apphelpers "github.com/CosmosContracts/juno/v21/app/helpers"
appparams "github.com/CosmosContracts/juno/v21/app/params"
apphelpers "github.com/CosmosContracts/juno/v22/app/helpers"
appparams "github.com/CosmosContracts/juno/v22/app/params"
)

// SimAppChainID hardcoded chainID for simulation
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/testnet/v18.0.0-alpha.2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v18
import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v21/app/upgrades"
"github.com/CosmosContracts/juno/v22/app/upgrades"
)

// UpgradeName defines the on-chain upgrade name for the upgrade.
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/testnet/v18.0.0-alpha.2/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/stretchr/testify/suite"

"github.com/CosmosContracts/juno/v21/app/apptesting"
v18alpha2 "github.com/CosmosContracts/juno/v21/app/upgrades/testnet/v18.0.0-alpha.2"
"github.com/CosmosContracts/juno/v22/app/apptesting"
v18alpha2 "github.com/CosmosContracts/juno/v22/app/upgrades/testnet/v18.0.0-alpha.2"
)

type UpgradeTestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/testnet/v18.0.0-alpha.3/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v18
import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v21/app/upgrades"
"github.com/CosmosContracts/juno/v22/app/upgrades"
)

// UpgradeName defines the on-chain upgrade name for the upgrade.
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/testnet/v18.0.0-alpha.3/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/stretchr/testify/suite"

"github.com/CosmosContracts/juno/v21/app/apptesting"
v18alpha3 "github.com/CosmosContracts/juno/v21/app/upgrades/testnet/v18.0.0-alpha.3"
"github.com/CosmosContracts/juno/v22/app/apptesting"
v18alpha3 "github.com/CosmosContracts/juno/v22/app/upgrades/testnet/v18.0.0-alpha.3"
)

type UpgradeTestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/testnet/v18.0.0-alpha.4/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v18
import (
store "github.com/cosmos/cosmos-sdk/store/types"

"github.com/CosmosContracts/juno/v21/app/upgrades"
"github.com/CosmosContracts/juno/v22/app/upgrades"
)

// UpgradeName defines the on-chain upgrade name for the upgrade.
Expand Down
Loading
Loading