Skip to content

Commit

Permalink
Merge pull request #958 from public-awesome/feature/sdk-v050
Browse files Browse the repository at this point in the history
v50 upgrade
  • Loading branch information
jhernandezb authored Mar 21, 2024
2 parents 8689452 + 1c33a86 commit 87d65d3
Show file tree
Hide file tree
Showing 195 changed files with 6,618 additions and 2,891 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- feature/*

release:
types: published
Expand Down Expand Up @@ -101,10 +102,17 @@ jobs:
with:
test-cmd: 'test-chain-upgrade'

run_chain_conformance:
name: conformance 🤝
needs: [build_sg_image]
uses: ./.github/workflows/interchaintest_custom_runner.yml
with:
test-cmd: 'test-chain-conformance'


cleanup:
name: Delete artifacts 🗑️
needs: [run_gaia_interchaintest,run_osmosis_interchaintest,run_pfm_interchaintest,run_chain_upgrade_interchaintest,run_ica_interchaintest]
needs: [run_gaia_interchaintest,run_osmosis_interchaintest,run_pfm_interchaintest,run_chain_upgrade_interchaintest,run_ica_interchaintest,run_chain_conformance]
runs-on: ubuntu-latest

steps:
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ docker-test: build-linux


test:
go test -v -race github.com/public-awesome/stargaze/v13/x/...
go test -v -race github.com/public-awesome/stargaze/v14/x/...

test-pfm:
cd e2e && go test -v -race -run TestPacketForwardMiddleware .
Expand All @@ -138,6 +138,9 @@ test-chain-upgrade:
test-ica:
cd e2e && go test -v -race -run TestInterchainAccounts .

test-chain-conformance:
cd e2e && go test -v -race -run TestStargazeConformance .

.PHONY: test test-e2e build-linux docker-test lint build install format

format:
Expand Down Expand Up @@ -178,7 +181,7 @@ proto-swagger-gen:
@$(protoImage) sh ./scripts/protoc-swagger-gen.sh

proto-format:
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;
@$(protoImage) buf format --write proto/

proto-lint:
@$(protoImage) buf lint --error-format=json
33 changes: 18 additions & 15 deletions app/ante.go
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
package app

import (
corestoretypes "cosmossdk.io/core/store"
errorsmod "cosmossdk.io/errors"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"

govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
globalfeeante "github.com/public-awesome/stargaze/v13/x/globalfee/ante"
globalfeekeeper "github.com/public-awesome/stargaze/v13/x/globalfee/keeper"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibcore "github.com/cosmos/ibc-go/v8/modules/core/keeper"

sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
globalfeeante "github.com/public-awesome/stargaze/v14/x/globalfee/ante"
globalfeekeeper "github.com/public-awesome/stargaze/v14/x/globalfee/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
// channel keeper.
type HandlerOptions struct {
ante.HandlerOptions
keeper *ibckeeper.Keeper
govKeeper govkeeper.Keeper
globalfeeKeeper globalfeekeeper.Keeper
stakingKeeper *stakingkeeper.Keeper
WasmConfig *wasmTypes.WasmConfig
TXCounterStoreKey storetypes.StoreKey
Codec codec.BinaryCodec
keeper *ibcore.Keeper
govKeeper govkeeper.Keeper
globalfeeKeeper globalfeekeeper.Keeper
stakingKeeper *stakingkeeper.Keeper
WasmConfig *wasmTypes.WasmConfig
TXCounterStoreService corestoretypes.KVStoreService
Codec codec.BinaryCodec
}

// NewAnteHandler returns an AnteHandler that checks and increments sequence
Expand All @@ -50,7 +53,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder")
}

if options.TXCounterStoreKey == nil {
if options.TXCounterStoreService == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "tx counter key is required for ante builder")
}

Expand All @@ -64,7 +67,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
// limit simulation gas
wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit),
globalfeeante.NewFeeDecorator(options.Codec, options.globalfeeKeeper, options.stakingKeeper),
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreKey),
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreService),
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
Expand Down
Loading

0 comments on commit 87d65d3

Please sign in to comment.