diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6f4bac4f..62d26905c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - name: Setup go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - run: go build ./... tidy: @@ -34,7 +34,7 @@ jobs: - name: Setup go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - run: | go mod tidy CHANGES_IN_REPO=$(git status --porcelain) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1a631167a..d2cca4a11 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/interchaintest.yml b/.github/workflows/interchaintest.yml index 4529d0fed..80d1377bb 100644 --- a/.github/workflows/interchaintest.yml +++ b/.github/workflows/interchaintest.yml @@ -41,7 +41,7 @@ jobs: - name: Set up Go 1.19 uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: checkout code uses: actions/checkout@v3 @@ -57,7 +57,7 @@ jobs: - name: Set up Go 1.19 uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: checkout code uses: actions/checkout@v3 @@ -73,7 +73,7 @@ jobs: - name: Set up Go 1.19 uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: checkout code uses: actions/checkout@v3 @@ -89,7 +89,7 @@ jobs: - name: Set up Go 1.19 uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: checkout code uses: actions/checkout@v3 @@ -105,7 +105,7 @@ jobs: # - name: Set up Go 1.19 # uses: actions/setup-go@v3 # with: - # go-version: 1.19 + # go-version: 1.21 # - name: checkout code # uses: actions/checkout@v3 @@ -121,7 +121,7 @@ jobs: # - name: Set up Go 1.19 # uses: actions/setup-go@v3 # with: - # go-version: 1.19 + # go-version: 1.21 # - name: checkout code # uses: actions/checkout@v3 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3188ae602..3539c2663 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b78394d8b..d09c3c6b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: - name: Install Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: Checkout code uses: actions/checkout@v3 - name: Test diff --git a/.golangci.yml b/.golangci.yml index c0844c760..869a3c9a6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,15 +1,13 @@ run: tests: true timeout: 10m - sort-results: true - allow-parallel-runners: true - exclude-dir: testutil/testdata linters: disable-all: true enable: - - dogsled - exportloopref + - errcheck + - gci - goconst - gocritic - gofumpt @@ -19,51 +17,115 @@ linters: - ineffassign - misspell - nakedret - - nolintlint - staticcheck - - stylecheck - thelper - typecheck + - stylecheck + - revive + - typecheck + - tenv - unconvert + # Prefer unparam over revive's unused param. It is more thorough in its checking. + - unparam - unused + - misspell issues: exclude-rules: - - text: "Use of weak random number generator" - linters: - - gosec - - text: "ST1003:" + - text: 'should not use underscores in package names' linters: - stylecheck - # FIXME: Disabled until golangci-lint updates stylecheck with this fix: - # https://github.com/dominikh/go-tools/issues/389 - - text: "ST1016:" + - text: 'use an underscore in package name' linters: + - revive - stylecheck - - path: "migrations" - text: "SA1019:" + - text: 'differs only by capitalization to method' linters: - - staticcheck - - text: "leading space" + - revive + - text: 'Use of weak random number generator' linters: - - nolintlint + - gosec + - linters: + - staticcheck + text: "SA1019:" # silence errors on usage of deprecated funcs max-issues-per-linter: 10000 max-same-issues: 10000 linters-settings: - gofumpt: - # Choose whether to use the extra rules. - module-path: github.com/notional-labs/composable-centauri - # Default: false - extra-rules: true - dogsled: - max-blank-identifiers: 3 - maligned: - # print struct with more effective memory layout or not, false by default - suggest-new: true - nolintlint: - allow-unused: false - allow-leading-space: true - require-explanation: false - require-specific: false + gci: + sections: + - standard # Standard section: captures all standard packages. + - default # Default section: contains all imports that could not be matched to another section type. + - blank # blank imports + - dot # dot imports + - prefix(cosmossdk.io) + - prefix(github.com/cosmos/cosmos-sdk) + - prefix(github.com/cometbft/cometbft) + - prefix(github.com/cosmos/ibc-go) + - prefix(github.com/notional-labs/composable) + custom-order: true + revive: + enable-all-rules: true + # Do NOT whine about the following, full explanation found in: + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#description-of-available-rules + rules: + - name: use-any + disabled: true + - name: if-return + disabled: true + - name: max-public-structs + disabled: true + - name: cognitive-complexity + disabled: true + - name: argument-limit + disabled: true + - name: cyclomatic + disabled: true + - name: file-header + disabled: true + - name: function-length + disabled: true + - name: function-result-limit + disabled: true + - name: line-length-limit + disabled: true + - name: flag-parameter + disabled: true + - name: add-constant + disabled: true + - name: empty-lines + disabled: true + - name: banned-characters + disabled: true + - name: deep-exit + disabled: true + - name: confusing-results + disabled: true + - name: unused-parameter + disabled: true + - name: modifies-value-receiver + disabled: true + - name: early-return + disabled: true + - name: confusing-naming + disabled: true + - name: defer + disabled: true + - name: unused-parameter + disabled: true + - name: unhandled-error + disabled: true + arguments: + - 'buffer.WriteString' + - 'fmt.Printf' + - 'fmt.Print' + - 'fmt.Println' + - name: import-shadowing + disabled: true + - name: get-return + disabled: true + - name: redundant-import-alias + disabled: true + - name: unchecked-type-assertion + disabled: true diff --git a/Dockerfile b/Dockerfile index db1742944..77171371c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION="1.19" +ARG GO_VERSION="1.21" ARG RUNNER_IMAGE="gcr.io/distroless/static-debian11" # -------------------------------------------------------- diff --git a/Dockerfile.dev b/Dockerfile.dev index 48d8bdff1..16696f1b5 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION="1.19" -ARG RUNNER_IMAGE="alpine:3.16" +ARG GO_VERSION="1.21" +ARG RUNNER_IMAGE="alpine:3.18" # -------------------------------------------------------- # Builder diff --git a/app/ante/ante.go b/app/ante/ante.go index 747a0f0c6..6b0a212d6 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -1,16 +1,17 @@ package ante import ( - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - "github.com/cosmos/cosmos-sdk/codec" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" - ante "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" + + ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + + tfmwkeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) // Link to default ante handler used by cosmos sdk: @@ -24,7 +25,7 @@ func NewAnteHandler( sigGasConsumer ante.SignatureVerificationGasConsumer, signModeHandler signing.SignModeHandler, channelKeeper *ibckeeper.Keeper, - tfmwKeeper tfmwKeeper.Keeper, + tfmwKeeper tfmwkeeper.Keeper, codec codec.BinaryCodec, ) sdk.AnteHandler { return sdk.ChainAnteDecorators( diff --git a/app/ante/ibc_ante.go b/app/ante/ibc_ante.go index bab820df4..b99fc498f 100644 --- a/app/ante/ibc_ante.go +++ b/app/ante/ibc_ante.go @@ -4,21 +4,22 @@ import ( "fmt" errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/authz" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" + tfmwkeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) type IBCPermissionDecorator struct { cdc codec.BinaryCodec - tfmwKeeper tfmwKeeper.Keeper + tfmwKeeper tfmwkeeper.Keeper } -func NewIBCPermissionDecorator(cdc codec.BinaryCodec, keeper tfmwKeeper.Keeper) IBCPermissionDecorator { +func NewIBCPermissionDecorator(cdc codec.BinaryCodec, keeper tfmwkeeper.Keeper) IBCPermissionDecorator { return IBCPermissionDecorator{ cdc: cdc, tfmwKeeper: keeper, diff --git a/app/app.go b/app/app.go index 37e064616..828f3e09a 100644 --- a/app/app.go +++ b/app/app.go @@ -7,19 +7,18 @@ import ( "path/filepath" "strings" - nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" - authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" - "github.com/cosmos/cosmos-sdk/x/authz" - "github.com/cosmos/cosmos-sdk/x/consensus" - tendermint "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - wasm08 "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm" - wasm08keeper "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" - - wasm08types "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" + "github.com/CosmWasm/wasmd/x/wasm" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + router "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward" + routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" + "github.com/spf13/cast" + icq "github.com/strangelove-ventures/async-icq/v7" + icqtypes "github.com/strangelove-ventures/async-icq/v7/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" @@ -29,25 +28,21 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + 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" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/cosmos/cosmos-sdk/x/bank" - - "github.com/notional-labs/composable/v6/app/keepers" - "github.com/notional-labs/composable/v6/app/prepare" - v4 "github.com/notional-labs/composable/v6/app/upgrades/v4" - v5 "github.com/notional-labs/composable/v6/app/upgrades/v5" - v6 "github.com/notional-labs/composable/v6/app/upgrades/v6" - - // bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - + "github.com/cosmos/cosmos-sdk/x/authz" authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" + "github.com/cosmos/cosmos-sdk/x/bank" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/capability" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + "github.com/cosmos/cosmos-sdk/x/consensus" + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/crisis" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distr "github.com/cosmos/cosmos-sdk/x/distribution" @@ -61,15 +56,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/group" groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" - - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/libs/log" - tmos "github.com/cometbft/cometbft/libs/os" "github.com/cosmos/cosmos-sdk/x/params" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -80,6 +68,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade" upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + tmjson "github.com/cometbft/cometbft/libs/json" + "github.com/cometbft/cometbft/libs/log" + tmos "github.com/cometbft/cometbft/libs/os" + ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" "github.com/cosmos/ibc-go/v7/modules/apps/transfer" @@ -89,40 +84,30 @@ import ( ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" ibchost "github.com/cosmos/ibc-go/v7/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - "github.com/spf13/cast" - icq "github.com/strangelove-ventures/async-icq/v7" - icqtypes "github.com/strangelove-ventures/async-icq/v7/types" - - router "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward" - routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - - custombankmodule "github.com/notional-labs/composable/v6/custom/bank" + tendermint "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + wasm08 "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm" + wasm08keeper "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" + wasm08types "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" + ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" "github.com/notional-labs/composable/v6/app/ante" - transfermiddleware "github.com/notional-labs/composable/v6/x/transfermiddleware" - transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types" - - txBoundary "github.com/notional-labs/composable/v6/x/tx-boundary" - txBoundaryTypes "github.com/notional-labs/composable/v6/x/tx-boundary/types" - - ratelimitmodule "github.com/notional-labs/composable/v6/x/ratelimit" - ratelimitmoduletypes "github.com/notional-labs/composable/v6/x/ratelimit/types" - - consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - + "github.com/notional-labs/composable/v6/app/keepers" + "github.com/notional-labs/composable/v6/app/prepare" + "github.com/notional-labs/composable/v6/app/upgrades" + v4 "github.com/notional-labs/composable/v6/app/upgrades/v4" + v5 "github.com/notional-labs/composable/v6/app/upgrades/v5" + v6 "github.com/notional-labs/composable/v6/app/upgrades/v6" + custombankmodule "github.com/notional-labs/composable/v6/custom/bank" + ibchooks "github.com/notional-labs/composable/v6/x/ibc-hooks" + ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types" "github.com/notional-labs/composable/v6/x/mint" minttypes "github.com/notional-labs/composable/v6/x/mint/types" - - ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" - - ibc_hooks "github.com/notional-labs/composable/v6/x/ibc-hooks" - ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types" - - "github.com/CosmWasm/wasmd/x/wasm" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - - upgrades "github.com/notional-labs/composable/v6/app/upgrades" + ratelimitmodule "github.com/notional-labs/composable/v6/x/ratelimit" + ratelimitmoduletypes "github.com/notional-labs/composable/v6/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware" + transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types" + txboundary "github.com/notional-labs/composable/v6/x/tx-boundary" + txboundarytypes "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) const ( @@ -212,9 +197,9 @@ var ( wasm.AppModuleBasic{}, router.AppModuleBasic{}, ica.AppModuleBasic{}, - ibc_hooks.AppModuleBasic{}, + ibchooks.AppModuleBasic{}, transfermiddleware.AppModuleBasic{}, - txBoundary.AppModuleBasic{}, + txboundary.AppModuleBasic{}, ratelimitmodule.AppModuleBasic{}, consensus.AppModuleBasic{}, // this line is used by starport scaffolding # stargate/app/moduleBasic @@ -326,12 +311,12 @@ func NewComposableApp( transferModule := transfer.NewAppModule(app.TransferKeeper) routerModule := router.NewAppModule(app.RouterKeeper) transfermiddlewareModule := transfermiddleware.NewAppModule(&app.TransferMiddlewareKeeper) - txBoundaryModule := txBoundary.NewAppModule(appCodec, app.TxBoundaryKeepper) + txBoundaryModule := txboundary.NewAppModule(appCodec, app.TxBoundaryKeepper) ratelimitModule := ratelimitmodule.NewAppModule(&app.RatelimitKeeper) icqModule := icq.NewAppModule(app.ICQKeeper) - ibcHooksModule := ibc_hooks.NewAppModule() + ibcHooksModule := ibchooks.NewAppModule() icaModule := ica.NewAppModule(nil, &app.ICAHostKeeper) // Only ICA Host - /**** Module Options ****/ + // **** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment // we prefer to be more strict in what arguments the modules expect. @@ -393,7 +378,7 @@ func NewComposableApp( ibctransfertypes.ModuleName, routertypes.ModuleName, transfermiddlewaretypes.ModuleName, - txBoundaryTypes.ModuleName, + txboundarytypes.ModuleName, ratelimitmoduletypes.ModuleName, ibchookstypes.ModuleName, icqtypes.ModuleName, @@ -434,7 +419,7 @@ func NewComposableApp( ibchost.ModuleName, routertypes.ModuleName, transfermiddlewaretypes.ModuleName, - txBoundaryTypes.ModuleName, + txboundarytypes.ModuleName, ratelimitmoduletypes.ModuleName, ibchookstypes.ModuleName, ibctransfertypes.ModuleName, @@ -471,7 +456,7 @@ func NewComposableApp( icqtypes.ModuleName, routertypes.ModuleName, transfermiddlewaretypes.ModuleName, - txBoundaryTypes.ModuleName, + txboundarytypes.ModuleName, ratelimitmoduletypes.ModuleName, ibchookstypes.ModuleName, feegrant.ModuleName, @@ -538,7 +523,7 @@ func NewComposableApp( app.SetEndBlocker(app.EndBlocker) app.SetPrepareProposal( - prepare.PrepareProposalHandler( + prepare.ProposalHandler( encodingConfig.TxConfig, appCodec, app.TxBoundaryKeepper, @@ -591,7 +576,7 @@ func (app *ComposableApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { } // GetTxConfig implements the TestingApp interface. -func (app *ComposableApp) GetTxConfig() client.TxConfig { +func (*ComposableApp) GetTxConfig() client.TxConfig { cfg := MakeEncodingConfig() return cfg.TxConfig } @@ -623,7 +608,7 @@ func (app *ComposableApp) LoadHeight(height int64) error { } // ModuleAccountAddrs returns all the app's module account addresses. -func (app *ComposableApp) ModuleAccountAddrs() map[string]bool { +func (*ComposableApp) ModuleAccountAddrs() map[string]bool { modAccAddrs := make(map[string]bool) // DO NOT REMOVE: StringMapKeys fixes non-deterministic map iteration for acc := range maccPerms { @@ -656,7 +641,7 @@ func (app *ComposableApp) InterfaceRegistry() types.InterfaceRegistry { // RegisterAPIRoutes registers all application module routes with the provided // API server. -func (app *ComposableApp) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig) { +func (*ComposableApp) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig) { clientCtx := apiSvr.ClientCtx // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) @@ -722,7 +707,7 @@ func (app *ComposableApp) setupUpgradeStoreLoaders() { } } -func (app *ComposableApp) customPreUpgradeHandler(_ upgradetypes.Plan) { +func (*ComposableApp) customPreUpgradeHandler(_ upgradetypes.Plan) { // switch upgradeInfo.Name { // default: // } diff --git a/app/export.go b/app/export.go index 282f4ff5f..69bbd2df5 100644 --- a/app/export.go +++ b/app/export.go @@ -4,13 +4,13 @@ import ( "encoding/json" "log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis diff --git a/app/helpers/test_helpers.go b/app/helpers/test_helpers.go index 1646262fa..613b926cb 100644 --- a/app/helpers/test_helpers.go +++ b/app/helpers/test_helpers.go @@ -6,15 +6,12 @@ import ( "testing" "time" - "cosmossdk.io/math" "github.com/CosmWasm/wasmd/x/wasm" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmrand "github.com/cometbft/cometbft/libs/rand" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - tmtypes "github.com/cometbft/cometbft/types" + "github.com/stretchr/testify/require" + + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/baseapp" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -24,8 +21,15 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmrand "github.com/cometbft/cometbft/libs/rand" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" + "github.com/cosmos/ibc-go/v7/testing/mock" - "github.com/stretchr/testify/require" composable "github.com/notional-labs/composable/v6/app" ) diff --git a/app/ibctesting/chain.go b/app/ibctesting/chain.go index c2082b7b6..16f193451 100644 --- a/app/ibctesting/chain.go +++ b/app/ibctesting/chain.go @@ -8,15 +8,14 @@ import ( "testing" "time" - ratelimitmodulekeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" + "github.com/CosmWasm/wasmd/x/wasm" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "cosmossdk.io/errors" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/crypto/tmhash" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - tmprotoversion "github.com/cometbft/cometbft/proto/tendermint/version" - tmtypes "github.com/cometbft/cometbft/types" - tmversion "github.com/cometbft/cometbft/version" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -24,21 +23,25 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - - "github.com/CosmWasm/wasmd/x/wasm" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" teststaking "github.com/cosmos/cosmos-sdk/x/staking/testutil" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto/tmhash" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmprotoversion "github.com/cometbft/cometbft/proto/tendermint/version" + tmtypes "github.com/cometbft/cometbft/types" + tmversion "github.com/cometbft/cometbft/version" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" @@ -51,12 +54,11 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/cosmos/ibc-go/v7/testing/mock" ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" composable "github.com/notional-labs/composable/v6/app" "github.com/notional-labs/composable/v6/app/ibctesting/simapp" - routerKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" + ratelimitmodulekeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" + routerkeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) // TestChain is a testing struct that wraps a simapp with the last TM Header, the current ABCI @@ -615,7 +617,7 @@ func (chain *TestChain) GetChannelCapability(portID, channelID string) *capabili return capability } -func (chain *TestChain) TransferMiddleware() routerKeeper.Keeper { +func (chain *TestChain) TransferMiddleware() routerkeeper.Keeper { return chain.GetTestSupport().TransferMiddleware() } @@ -681,17 +683,17 @@ func mustSubmitAndExecuteLegacyProposal(t *testing.T, ctx sdk.Context, content v contentMsg, err := submitLegacyProposal(t, ctx.WithEventManager(sdk.NewEventManager()), content, myActorAddress, authority, msgServer) require.NoError(t, err) - _, err = msgServer.ExecLegacyContent(sdk.WrapSDKContext(ctx), v1.NewMsgExecLegacyContent(contentMsg.Content, authority)) + _, err = msgServer.ExecLegacyContent(sdk.WrapSDKContext(ctx), govv1.NewMsgExecLegacyContent(contentMsg.Content, authority)) require.NoError(t, err) } // does not fail on submit proposal -func submitLegacyProposal(t *testing.T, ctx sdk.Context, content v1beta1.Content, myActorAddress, govAuthority string, msgServer v1.MsgServer) (*v1.MsgExecLegacyContent, error) { +func submitLegacyProposal(t *testing.T, ctx sdk.Context, content v1beta1.Content, myActorAddress, govAuthority string, msgServer govv1.MsgServer) (*govv1.MsgExecLegacyContent, error) { t.Helper() - contentMsg, err := v1.NewLegacyContent(content, govAuthority) + contentMsg, err := govv1.NewLegacyContent(content, govAuthority) require.NoError(t, err) - proposal, err := v1.NewMsgSubmitProposal( + proposal, err := govv1.NewMsgSubmitProposal( []sdk.Msg{contentMsg}, sdk.Coins{}, myActorAddress, diff --git a/app/ibctesting/coordinator.go b/app/ibctesting/coordinator.go index 4e6bebb29..3c3fca372 100644 --- a/app/ibctesting/coordinator.go +++ b/app/ibctesting/coordinator.go @@ -6,11 +6,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + abci "github.com/cometbft/cometbft/abci/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" ibctesting "github.com/cosmos/ibc-go/v7/testing" - "github.com/stretchr/testify/require" ) const ChainIDPrefix = "testchain" @@ -205,7 +207,7 @@ func (coord *Coordinator) CommitNBlocks(chain *TestChain, n uint64) { // ConnOpenInitOnBothChains initializes a connection on both endpoints with the state INIT // using the OpenInit handshake call. -func (coord *Coordinator) ConnOpenInitOnBothChains(path *Path) error { +func (*Coordinator) ConnOpenInitOnBothChains(path *Path) error { err := path.EndpointA.ConnOpenInit() if err != nil { return err @@ -230,7 +232,7 @@ func (coord *Coordinator) ConnOpenInitOnBothChains(path *Path) error { // ChanOpenInitOnBothChains initializes a channel on the source chain and counterparty chain // with the state INIT using the OpenInit handshake call. -func (coord *Coordinator) ChanOpenInitOnBothChains(path *Path) error { +func (*Coordinator) ChanOpenInitOnBothChains(path *Path) error { // NOTE: only creation of a capability for a transfer or mock port is supported // Other applications must bind to the port in InitGenesis or modify this code. diff --git a/app/ibctesting/endpoint.go b/app/ibctesting/endpoint.go index 633dc7b2a..44d01c8fe 100644 --- a/app/ibctesting/endpoint.go +++ b/app/ibctesting/endpoint.go @@ -261,7 +261,7 @@ func (endpoint *Endpoint) QueryConnectionHandshakeProof() ( connectionKey := host.ConnectionKey(endpoint.Counterparty.ConnectionID) proofConnection, _ = endpoint.Counterparty.QueryProofAtHeight(connectionKey, proofHeight.GetRevisionHeight()) - return + return clientState, proofClient, proofConsensus, consensusHeight, proofConnection, proofHeight } // ChanOpenInit will construct and execute a MsgChannelOpenInit on the associated endpoint. diff --git a/app/ibctesting/event_utils.go b/app/ibctesting/event_utils.go index 8b6ed2981..1f0237eac 100644 --- a/app/ibctesting/event_utils.go +++ b/app/ibctesting/event_utils.go @@ -5,8 +5,10 @@ import ( "strconv" "strings" - abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" + + abci "github.com/cometbft/cometbft/abci/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ) @@ -43,7 +45,7 @@ func getAckPackets(evts []abci.Event) []PacketAck { // for _, attr := range evt.Attributes { // fmt.Printf(" %s = %s\n", string(attr.Key), string(attr.Value)) // } -//} +// } func parsePacketFromEvent(evt abci.Event) channeltypes.Packet { return channeltypes.Packet{ diff --git a/app/ibctesting/simapp/ante_handler.go b/app/ibctesting/simapp/ante_handler.go index 44569e2e3..dc68ea4cd 100644 --- a/app/ibctesting/simapp/ante_handler.go +++ b/app/ibctesting/simapp/ante_handler.go @@ -2,6 +2,7 @@ package simapp import ( "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" diff --git a/app/ibctesting/simapp/app.go b/app/ibctesting/simapp/app.go index 53a0e7165..e408d13c9 100644 --- a/app/ibctesting/simapp/app.go +++ b/app/ibctesting/simapp/app.go @@ -8,15 +8,17 @@ import ( "os" "path/filepath" + "github.com/gorilla/mux" + "github.com/rakyll/statik/fs" + "github.com/spf13/cast" + + _ "github.com/cosmos/cosmos-sdk/client/docs/statik" // this is used for serving docs + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmos "github.com/cometbft/cometbft/libs/os" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" // this is used for serving docs nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" @@ -87,15 +89,11 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/gorilla/mux" - - // TODO: mint module not complete yet, - "github.com/notional-labs/composable/v6/x/mint" - mintkeeper "github.com/notional-labs/composable/v6/x/mint/keeper" - minttypes "github.com/notional-labs/composable/v6/x/mint/types" - "github.com/rakyll/statik/fs" - "github.com/spf13/cast" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmos "github.com/cometbft/cometbft/libs/os" ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" icacontroller "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller" @@ -128,7 +126,11 @@ import ( simappupgrades "github.com/notional-labs/composable/v6/app/ibctesting/simapp/upgrades" v6 "github.com/notional-labs/composable/v6/app/ibctesting/simapp/upgrades/v6" v7 "github.com/notional-labs/composable/v6/app/ibctesting/simapp/upgrades/v7" - transfermiddleware "github.com/notional-labs/composable/v6/x/transfermiddleware" + // TODO: mint module not complete yet, + "github.com/notional-labs/composable/v6/x/mint" + mintkeeper "github.com/notional-labs/composable/v6/x/mint/keeper" + minttypes "github.com/notional-labs/composable/v6/x/mint/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware" transfermiddlewarekeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) @@ -555,7 +557,7 @@ func NewSimApp( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper - /**** Module Options ****/ + // **** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment // we prefer to be more strict in what arguments the modules expect. @@ -745,7 +747,7 @@ func (app *SimApp) LoadHeight(height int64) error { } // ModuleAccountAddrs returns all the app's module account addresses. -func (app *SimApp) ModuleAccountAddrs() map[string]bool { +func (*SimApp) ModuleAccountAddrs() map[string]bool { modAccAddrs := make(map[string]bool) for acc := range maccPerms { // do not add the following modules to blocked addresses @@ -855,7 +857,7 @@ func (app *SimApp) SimulationManager() *module.SimulationManager { // RegisterAPIRoutes registers all application module routes with the provided // API server. -func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { +func (*SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { clientCtx := apiSvr.ClientCtx // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) diff --git a/app/ibctesting/simapp/export.go b/app/ibctesting/simapp/export.go index 8515cc0f4..f11be7003 100644 --- a/app/ibctesting/simapp/export.go +++ b/app/ibctesting/simapp/export.go @@ -4,12 +4,13 @@ import ( "encoding/json" "log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis diff --git a/app/ibctesting/simapp/genesis_account_test.go b/app/ibctesting/simapp/genesis_account_test.go index be7675536..c4488bb28 100644 --- a/app/ibctesting/simapp/genesis_account_test.go +++ b/app/ibctesting/simapp/genesis_account_test.go @@ -4,11 +4,13 @@ import ( "testing" "time" - "github.com/cometbft/cometbft/crypto" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/stretchr/testify/require" + + "github.com/cometbft/cometbft/crypto" "github.com/cosmos/ibc-go/v7/testing/simapp" ) diff --git a/app/ibctesting/simapp/sim_bench_test.go b/app/ibctesting/simapp/sim_bench_test.go index d3689d353..988e3f35b 100644 --- a/app/ibctesting/simapp/sim_bench_test.go +++ b/app/ibctesting/simapp/sim_bench_test.go @@ -5,10 +5,11 @@ import ( "os" "testing" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ) // Profile with: diff --git a/app/ibctesting/simapp/sim_test.go b/app/ibctesting/simapp/sim_test.go index 32d602b0c..0a0da5fe7 100644 --- a/app/ibctesting/simapp/sim_test.go +++ b/app/ibctesting/simapp/sim_test.go @@ -7,10 +7,8 @@ import ( "os" "testing" - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -28,12 +26,16 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/stretchr/testify/require" - minttypes "github.com/notional-labs/composable/v6/x/mint/types" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + + minttypes "github.com/notional-labs/composable/v6/x/mint/types" ) // Get flags every time the simulator is run diff --git a/app/ibctesting/simapp/simd/cmd/genaccounts.go b/app/ibctesting/simapp/simd/cmd/genaccounts.go index 0b25662d0..97275a41f 100644 --- a/app/ibctesting/simapp/simd/cmd/genaccounts.go +++ b/app/ibctesting/simapp/simd/cmd/genaccounts.go @@ -6,6 +6,8 @@ import ( "errors" "fmt" + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -16,7 +18,6 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/spf13/cobra" ) const ( diff --git a/app/ibctesting/simapp/simd/cmd/genaccounts_test.go b/app/ibctesting/simapp/simd/cmd/genaccounts_test.go index 97b549c90..313bfaa07 100644 --- a/app/ibctesting/simapp/simd/cmd/genaccounts_test.go +++ b/app/ibctesting/simapp/simd/cmd/genaccounts_test.go @@ -5,7 +5,9 @@ import ( "fmt" "testing" - "github.com/cometbft/cometbft/libs/log" + "github.com/spf13/viper" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" @@ -13,8 +15,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" - "github.com/spf13/viper" - "github.com/stretchr/testify/require" + + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/ibc-go/v7/testing/simapp" simcmd "github.com/cosmos/ibc-go/v7/testing/simapp/simd/cmd" diff --git a/app/ibctesting/simapp/simd/cmd/root.go b/app/ibctesting/simapp/simd/cmd/root.go index 8eaeafdec..b517d39e9 100644 --- a/app/ibctesting/simapp/simd/cmd/root.go +++ b/app/ibctesting/simapp/simd/cmd/root.go @@ -6,12 +6,12 @@ import ( "os" "path/filepath" + "github.com/spf13/cast" + "github.com/spf13/cobra" + sdkcmd "cosmossdk.io/simapp/simd/cmd" - rosettaCmd "cosmossdk.io/tools/rosetta/cmd" - dbm "github.com/cometbft/cometbft-db" - tmcfg "github.com/cometbft/cometbft/config" - tmcli "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" + rosettacmd "cosmossdk.io/tools/rosetta/cmd" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -33,8 +33,11 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/spf13/cast" - "github.com/spf13/cobra" + + dbm "github.com/cometbft/cometbft-db" + tmcfg "github.com/cometbft/cometbft/config" + tmcli "github.com/cometbft/cometbft/libs/cli" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/ibc-go/v7/testing/simapp" "github.com/cosmos/ibc-go/v7/testing/simapp/params" @@ -186,7 +189,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { ) // add rosetta - rootCmd.AddCommand(rosettaCmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler)) + rootCmd.AddCommand(rosettacmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Marshaler)) } func addModuleInitFlags(startCmd *cobra.Command) { diff --git a/app/ibctesting/simapp/state.go b/app/ibctesting/simapp/state.go index 29fa19550..ea714727a 100644 --- a/app/ibctesting/simapp/state.go +++ b/app/ibctesting/simapp/state.go @@ -9,8 +9,7 @@ import ( "time" "cosmossdk.io/math" - tmjson "github.com/cometbft/cometbft/libs/json" - tmtypes "github.com/cometbft/cometbft/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" @@ -20,6 +19,9 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + tmjson "github.com/cometbft/cometbft/libs/json" + tmtypes "github.com/cometbft/cometbft/types" + simappparams "github.com/cosmos/ibc-go/v7/testing/simapp/params" ) diff --git a/app/ibctesting/simapp/test_helpers.go b/app/ibctesting/simapp/test_helpers.go index 332fbee01..1e08cb543 100644 --- a/app/ibctesting/simapp/test_helpers.go +++ b/app/ibctesting/simapp/test_helpers.go @@ -6,11 +6,8 @@ import ( "testing" "time" - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - tmtypes "github.com/cometbft/cometbft/types" + "github.com/stretchr/testify/require" + bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -22,7 +19,12 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/stretchr/testify/require" + + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/ibc-go/v7/testing/mock" ) diff --git a/app/ibctesting/simapp/types.go b/app/ibctesting/simapp/types.go index ae07721f2..09c381c42 100644 --- a/app/ibctesting/simapp/types.go +++ b/app/ibctesting/simapp/types.go @@ -1,11 +1,12 @@ package simapp import ( - abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + + abci "github.com/cometbft/cometbft/abci/types" ) // App implements the common methods for a Cosmos SDK-based application diff --git a/app/ibctesting/simapp/utils.go b/app/ibctesting/simapp/utils.go index 70b354e17..32b45da81 100644 --- a/app/ibctesting/simapp/utils.go +++ b/app/ibctesting/simapp/utils.go @@ -5,13 +5,14 @@ import ( "fmt" "os" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + + dbm "github.com/cometbft/cometbft-db" + "github.com/cometbft/cometbft/libs/log" ) // SetupSimulation creates the config, db (levelDB), temporary directory and logger for diff --git a/app/ibctesting/simapp/utils_test.go b/app/ibctesting/simapp/utils_test.go index 7389c3a23..0240c482a 100644 --- a/app/ibctesting/simapp/utils_test.go +++ b/app/ibctesting/simapp/utils_test.go @@ -4,13 +4,14 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/std" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/stretchr/testify/require" ) func makeCodec(bm module.BasicManager) *codec.LegacyAmino { diff --git a/app/ibctesting/wasm.go b/app/ibctesting/wasm.go index 55e567049..02a2d2371 100644 --- a/app/ibctesting/wasm.go +++ b/app/ibctesting/wasm.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" tmtypes "github.com/cometbft/cometbft/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" wasmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" ) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index b1a36db04..f94da5f3f 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -5,54 +5,53 @@ import ( "path/filepath" "strings" + "github.com/CosmWasm/wasmd/x/wasm" + router "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward" + routerkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper" + routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" + icq "github.com/strangelove-ventures/async-icq/v7" + icqkeeper "github.com/strangelove-ventures/async-icq/v7/keeper" + icqtypes "github.com/strangelove-ventures/async-icq/v7/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + servertypes "github.com/cosmos/cosmos-sdk/server/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - + authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/cosmos-sdk/x/group" groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" - "github.com/cosmos/cosmos-sdk/x/params" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host" icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" @@ -61,44 +60,26 @@ import ( ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ibchost "github.com/cosmos/ibc-go/v7/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - icq "github.com/strangelove-ventures/async-icq/v7" - icqkeeper "github.com/strangelove-ventures/async-icq/v7/keeper" - icqtypes "github.com/strangelove-ventures/async-icq/v7/types" + wasmclientkeeper "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" + wasmclienttypes "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" custombankkeeper "github.com/notional-labs/composable/v6/custom/bank/keeper" - - router "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward" - routerkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper" - routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - - transfermiddleware "github.com/notional-labs/composable/v6/x/transfermiddleware" - transfermiddlewarekeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" - transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types" - - txBoundaryKeeper "github.com/notional-labs/composable/v6/x/tx-boundary/keeper" - txBoundaryTypes "github.com/notional-labs/composable/v6/x/tx-boundary/types" - + ibchooks "github.com/notional-labs/composable/v6/x/ibc-hooks" + ibchookskeeper "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper" + ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types" + mintkeeper "github.com/notional-labs/composable/v6/x/mint/keeper" + minttypes "github.com/notional-labs/composable/v6/x/mint/types" ratelimitmodule "github.com/notional-labs/composable/v6/x/ratelimit" ratelimitmodulekeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" ratelimitmoduletypes "github.com/notional-labs/composable/v6/x/ratelimit/types" - - consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" - consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - - mintkeeper "github.com/notional-labs/composable/v6/x/mint/keeper" - minttypes "github.com/notional-labs/composable/v6/x/mint/types" - - "github.com/CosmWasm/wasmd/x/wasm" - servertypes "github.com/cosmos/cosmos-sdk/server/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - wasm08Keeper "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" - wasmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" - - ibc_hooks "github.com/notional-labs/composable/v6/x/ibc-hooks" - ibchookskeeper "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper" - ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware" + transfermiddlewarekeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" + transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types" + txboundarykeeper "github.com/notional-labs/composable/v6/x/tx-boundary/keeper" + txboundarytypes "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) const ( @@ -131,11 +112,11 @@ type AppKeepers struct { FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.Keeper GroupKeeper groupkeeper.Keeper - Wasm08Keeper wasm08Keeper.Keeper // TODO: use this name ? + Wasm08Keeper wasmclientkeeper.Keeper WasmKeeper wasm.Keeper IBCHooksKeeper *ibchookskeeper.Keeper - Ics20WasmHooks *ibc_hooks.WasmHooks - HooksICS4Wrapper ibc_hooks.ICS4Middleware + Ics20WasmHooks *ibchooks.WasmHooks + HooksICS4Wrapper ibchooks.ICS4Middleware // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper @@ -145,7 +126,7 @@ type AppKeepers struct { ConsensusParamsKeeper consensusparamkeeper.Keeper // this line is used by starport scaffolding # stargate/app/keeperDeclaration TransferMiddlewareKeeper transfermiddlewarekeeper.Keeper - TxBoundaryKeepper txBoundaryKeeper.Keeper + TxBoundaryKeepper txboundarykeeper.Keeper RouterKeeper *routerkeeper.Keeper RatelimitKeeper ratelimitmodulekeeper.Keeper } @@ -232,7 +213,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( govModuleAuthority := authtypes.NewModuleAddress(govtypes.ModuleName).String() - appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper(appCodec, appKeepers.keys[wasmtypes.StoreKey], govModuleAuthority, homePath, &appKeepers.IBCKeeper.ClientKeeper) + appKeepers.Wasm08Keeper = wasmclientkeeper.NewKeeper(appCodec, appKeepers.keys[wasmclienttypes.StoreKey], govModuleAuthority, homePath, &appKeepers.IBCKeeper.ClientKeeper) // ICA Host keeper appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper( @@ -256,9 +237,9 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.IBCHooksKeeper = &hooksKeeper composablePrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() - wasmHooks := ibc_hooks.NewWasmHooks(&hooksKeeper, nil, composablePrefix) // The contract keeper needs to be set later + wasmHooks := ibchooks.NewWasmHooks(&hooksKeeper, nil, composablePrefix) // The contract keeper needs to be set later appKeepers.Ics20WasmHooks = &wasmHooks - appKeepers.HooksICS4Wrapper = ibc_hooks.NewICS4Middleware( + appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( appKeepers.IBCKeeper.ChannelKeeper, appKeepers.Ics20WasmHooks, ) @@ -273,9 +254,9 @@ func (appKeepers *AppKeepers) InitNormalKeepers( govModuleAuthority, ) - appKeepers.TxBoundaryKeepper = txBoundaryKeeper.NewKeeper( + appKeepers.TxBoundaryKeepper = txboundarykeeper.NewKeeper( appCodec, - appKeepers.keys[txBoundaryTypes.StoreKey], + appKeepers.keys[txboundarytypes.StoreKey], govModuleAuthority, ) @@ -337,7 +318,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( routerkeeper.DefaultRefundTransferPacketTimeoutTimestamp, ) ratelimitMiddlewareStack := ratelimitmodule.NewIBCMiddleware(appKeepers.RatelimitKeeper, ibcMiddlewareStack) - hooksTransferMiddleware := ibc_hooks.NewIBCMiddleware(ratelimitMiddlewareStack, &appKeepers.HooksICS4Wrapper) + hooksTransferMiddleware := ibchooks.NewIBCMiddleware(ratelimitMiddlewareStack, &appKeepers.HooksICS4Wrapper) // Create evidence Keeper for to register the IBC light client misbehaviour evidence route evidenceKeeper := evidencekeeper.NewKeeper( @@ -442,7 +423,7 @@ func (appKeepers *AppKeepers) InitSpecialKeepers( } // initParamsKeeper init params keeper and its subspaces -func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { +func (*AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) paramsKeeper.Subspace(authtypes.ModuleName) @@ -466,7 +447,7 @@ func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legac } // ModuleAccountAddrs returns all the app's module account addresses. -func (appKeepers *AppKeepers) BlacklistedModuleAccountAddrs(maccPerms map[string][]string) map[string]bool { +func (*AppKeepers) BlacklistedModuleAccountAddrs(maccPerms map[string][]string) map[string]bool { modAccAddrs := make(map[string]bool) // DO NOT REMOVE: StringMapKeys fixes non-deterministic map iteration for acc := range maccPerms { diff --git a/app/keepers/keys.go b/app/keepers/keys.go index 605a40955..9fd57cf9f 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -1,46 +1,38 @@ package keepers import ( + "github.com/CosmWasm/wasmd/x/wasm" + routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" + icqtypes "github.com/strangelove-ventures/async-icq/v7/types" + + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - - // bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/group" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibchost "github.com/cosmos/ibc-go/v7/modules/core/exported" - icqtypes "github.com/strangelove-ventures/async-icq/v7/types" - - routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" + wasm08types "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types" + minttypes "github.com/notional-labs/composable/v6/x/mint/types" ratelimitmoduletypes "github.com/notional-labs/composable/v6/x/ratelimit/types" transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types" - txBoundaryTypes "github.com/notional-labs/composable/v6/x/tx-boundary/types" - - consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - - storetypes "github.com/cosmos/cosmos-sdk/store/types" - - minttypes "github.com/notional-labs/composable/v6/x/mint/types" - - "github.com/CosmWasm/wasmd/x/wasm" - wasm08types "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" + txboundarytypes "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) // GenerateKeys generates new keys (KV Store, Transient store, and memory store). @@ -51,7 +43,7 @@ func (appKeepers *AppKeepers) GenerateKeys() { authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, icqtypes.StoreKey, capabilitytypes.StoreKey, consensusparamtypes.StoreKey, wasm08types.StoreKey, - crisistypes.StoreKey, routertypes.StoreKey, transfermiddlewaretypes.StoreKey, group.StoreKey, minttypes.StoreKey, wasm.StoreKey, ibchookstypes.StoreKey, icahosttypes.StoreKey, ratelimitmoduletypes.StoreKey, txBoundaryTypes.StoreKey, + crisistypes.StoreKey, routertypes.StoreKey, transfermiddlewaretypes.StoreKey, group.StoreKey, minttypes.StoreKey, wasm.StoreKey, ibchookstypes.StoreKey, icahosttypes.StoreKey, ratelimitmoduletypes.StoreKey, txboundarytypes.StoreKey, authzkeeper.StoreKey, ) diff --git a/app/prepare/prepare.go b/app/prepare/prepare.go index 948921834..8351d0e72 100644 --- a/app/prepare/prepare.go +++ b/app/prepare/prepare.go @@ -1,14 +1,16 @@ package prepare import ( - abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + + abci "github.com/cometbft/cometbft/abci/types" + txboundarykeeper "github.com/notional-labs/composable/v6/x/tx-boundary/keeper" ) -func PrepareProposalHandler( +func ProposalHandler( txConfig client.TxConfig, cdc codec.BinaryCodec, txboundaryKeeper txboundarykeeper.Keeper, diff --git a/app/test_access.go b/app/test_access.go index 78a65b7d2..2ab34e687 100644 --- a/app/test_access.go +++ b/app/test_access.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/CosmWasm/wasmd/x/wasm" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -12,12 +13,13 @@ import ( capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" wasm08 "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" ratelimitkeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" - tfmdKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" + tfmdkeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) type TestSupport struct { @@ -82,7 +84,7 @@ func (s TestSupport) GetTxConfig() client.TxConfig { return s.app.GetTxConfig() } -func (s TestSupport) TransferMiddleware() tfmdKeeper.Keeper { +func (s TestSupport) TransferMiddleware() tfmdkeeper.Keeper { return s.app.TransferMiddlewareKeeper } diff --git a/app/test_helpers.go b/app/test_helpers.go index 97f5df118..d6e27f10b 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -11,13 +11,16 @@ import ( "testing" "time" + "github.com/CosmWasm/wasmd/x/wasm" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/stretchr/testify/require" + "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -26,20 +29,18 @@ import ( helpers "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/stretchr/testify/require" - - dbm "github.com/cometbft/cometbft-db" - tmtypes "github.com/cometbft/cometbft/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - minttypes "github.com/notional-labs/composable/v6/x/mint/types" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" - "github.com/CosmWasm/wasmd/x/wasm" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + minttypes "github.com/notional-labs/composable/v6/x/mint/types" ) // DefaultConsensusParams defines the default Tendermint consensus params used in @@ -472,7 +473,7 @@ func NewPubKeyFromHex(pk string) (res cryptotypes.PubKey) { type EmptyBaseAppOptions struct{} // Get implements AppOptions -func (ao EmptyBaseAppOptions) Get(_ string) interface{} { +func (EmptyBaseAppOptions) Get(_ string) interface{} { return nil } diff --git a/app/upgrades/centauri/upgrade.go b/app/upgrades/centauri/upgrade.go index 4dbd5b88b..631b4913b 100644 --- a/app/upgrades/centauri/upgrade.go +++ b/app/upgrades/centauri/upgrade.go @@ -2,20 +2,19 @@ package centauri import ( "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - bech32authmigration "github.com/notional-labs/composable/v6/bech32-migration/auth" bech32govmigration "github.com/notional-labs/composable/v6/bech32-migration/gov" bech32slashingmigration "github.com/notional-labs/composable/v6/bech32-migration/slashing" @@ -40,12 +39,12 @@ func CreateUpgradeHandler( // Slashing params change newParamsSet := slashingKeeper.GetParams(ctx) newParamsSet.SlashFractionDowntime = math.LegacyNewDecWithPrec(1, 5) - slashingKeeper.SetParams(ctx, newParamsSet) + slashingKeeper.SetParams(ctx, newParamsSet) //nolint:errcheck // Gov params change: minium deposit newGovParamsSet := govkeeper.GetParams(ctx) newGovParamsSet.MinInitialDepositRatio = sdk.NewDecWithPrec(1, 2).String() // this is 1% - govkeeper.SetParams(ctx, newGovParamsSet) + govkeeper.SetParams(ctx, newGovParamsSet) //nolint:errcheck return mm.RunMigrations(ctx, configurator, vm) } diff --git a/app/upgrades/types.go b/app/upgrades/types.go index 10551b005..e3d107906 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -1,13 +1,14 @@ package upgrades import ( - types "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + types "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/notional-labs/composable/v6/app/keepers" ) diff --git a/app/upgrades/v4/constants.go b/app/upgrades/v4/constants.go index 91e150e0a..ba6dbd7c0 100644 --- a/app/upgrades/v4/constants.go +++ b/app/upgrades/v4/constants.go @@ -2,7 +2,9 @@ package v4 import ( wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + store "github.com/cosmos/cosmos-sdk/store/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" "github.com/notional-labs/composable/v6/app/upgrades" diff --git a/app/upgrades/v4/upgrade.go b/app/upgrades/v4/upgrade.go index b26fee2a9..0e06441c2 100644 --- a/app/upgrades/v4/upgrade.go +++ b/app/upgrades/v4/upgrade.go @@ -2,11 +2,12 @@ package v4 import ( wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/cosmos-sdk/codec" "github.com/notional-labs/composable/v6/app/keepers" "github.com/notional-labs/composable/v6/app/upgrades" tfmdtypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types" @@ -28,7 +29,7 @@ func CreateUpgradeHandler( var wasmdParams wasmtypes.Params wasmdParams.CodeUploadAccess = wasmtypes.AccessConfig{Permission: wasmtypes.AccessTypeNobody} wasmdParams.InstantiateDefaultPermission = wasmtypes.AccessTypeNobody - keepers.WasmKeeper.SetParams(ctx, wasmdParams) + keepers.WasmKeeper.SetParams(ctx, wasmdParams) //nolint:errcheck return mm.RunMigrations(ctx, configurator, vm) } diff --git a/app/upgrades/v4_5/fork.go b/app/upgrades/v4_5/fork.go index b913f3024..d963f25d3 100644 --- a/app/upgrades/v4_5/fork.go +++ b/app/upgrades/v4_5/fork.go @@ -9,6 +9,7 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" diff --git a/app/upgrades/v4_5_1/fork.go b/app/upgrades/v4_5_1/fork.go index fc413b7ae..92de3da20 100644 --- a/app/upgrades/v4_5_1/fork.go +++ b/app/upgrades/v4_5_1/fork.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/notional-labs/composable/v6/app/keepers" - rateLimitKeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" + ratelimitkeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" ) func RunForkLogic(ctx sdk.Context, keepers *keepers.AppKeepers) { @@ -15,7 +15,7 @@ func RunForkLogic(ctx sdk.Context, keepers *keepers.AppKeepers) { RemoveRateLimit(ctx, &keepers.RatelimitKeeper) } -func RemoveRateLimit(ctx sdk.Context, rlKeeper *rateLimitKeeper.Keeper) { +func RemoveRateLimit(ctx sdk.Context, rlKeeper *ratelimitkeeper.Keeper) { // Get all current rate limit rateLimits := rlKeeper.GetAllRateLimits(ctx) // Remove Rate limit diff --git a/app/upgrades/v5/constants.go b/app/upgrades/v5/constants.go index 69946b0cb..34c8486b8 100644 --- a/app/upgrades/v5/constants.go +++ b/app/upgrades/v5/constants.go @@ -2,6 +2,7 @@ package v5 import ( store "github.com/cosmos/cosmos-sdk/store/types" + "github.com/notional-labs/composable/v6/app/upgrades" txboundary "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) diff --git a/app/upgrades/v5/upgrade.go b/app/upgrades/v5/upgrade.go index 90fc487e2..4c7cc0bd9 100644 --- a/app/upgrades/v5/upgrade.go +++ b/app/upgrades/v5/upgrade.go @@ -2,10 +2,12 @@ package v5 import ( "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/notional-labs/composable/v6/app/keepers" "github.com/notional-labs/composable/v6/app/upgrades" "github.com/notional-labs/composable/v6/x/ratelimit/types" diff --git a/app/upgrades/v5_1_0/fork.go b/app/upgrades/v5_1_0/fork.go index 771d3c696..afaf04c51 100644 --- a/app/upgrades/v5_1_0/fork.go +++ b/app/upgrades/v5_1_0/fork.go @@ -2,10 +2,11 @@ package v5_1_0 import ( "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/notional-labs/composable/v6/app/keepers" - rateLimitKeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" + ratelimitkeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" "github.com/notional-labs/composable/v6/x/ratelimit/types" ) @@ -19,7 +20,7 @@ func RunForkLogic(ctx sdk.Context, keepers *keepers.AppKeepers) { FixRateLimit(ctx, &keepers.RatelimitKeeper) } -func FixRateLimit(ctx sdk.Context, rlKeeper *rateLimitKeeper.Keeper) { +func FixRateLimit(ctx sdk.Context, rlKeeper *ratelimitkeeper.Keeper) { uosmoRateLimit, found := rlKeeper.GetRateLimit(ctx, uosmo, "channel-2") if !found { channelValue := rlKeeper.GetChannelValue(ctx, uosmo) diff --git a/app/upgrades/v6/constants.go b/app/upgrades/v6/constants.go index 06444b580..ac820b46c 100644 --- a/app/upgrades/v6/constants.go +++ b/app/upgrades/v6/constants.go @@ -3,6 +3,7 @@ package v6 import ( store "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/x/authz" + "github.com/notional-labs/composable/v6/app/upgrades" ) diff --git a/app/upgrades/v6/upgrade.go b/app/upgrades/v6/upgrade.go index a614235b2..a4216beab 100644 --- a/app/upgrades/v6/upgrade.go +++ b/app/upgrades/v6/upgrade.go @@ -1,9 +1,8 @@ package v6 import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" diff --git a/bech32-migration/auth/auth.go b/bech32-migration/auth/auth.go index 1bb3f829f..0d0882253 100644 --- a/bech32-migration/auth/auth.go +++ b/bech32-migration/auth/auth.go @@ -2,9 +2,8 @@ package auth import ( "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" diff --git a/bech32-migration/gov/gov.go b/bech32-migration/gov/gov.go index f141d1c0b..d6078d12c 100644 --- a/bech32-migration/gov/gov.go +++ b/bech32-migration/gov/gov.go @@ -4,9 +4,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/gov/types" - v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/notional-labs/composable/v6/bech32-migration/utils" @@ -19,7 +18,7 @@ func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc cod vote := v1beta1.Vote{} err := cdc.Unmarshal(bz, &vote) if err != nil { - vote := v1.Vote{} + vote := govv1.Vote{} cdc.MustUnmarshal(bz, &vote) vote.Voter = utils.ConvertAccAddr(vote.Voter) voteCount++ @@ -34,7 +33,7 @@ func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc cod deposit := v1beta1.Deposit{} err := cdc.Unmarshal(bz, &deposit) if err != nil { - vote := v1.Deposit{} + vote := govv1.Deposit{} cdc.MustUnmarshal(bz, &vote) deposit.Depositor = utils.ConvertAccAddr(deposit.Depositor) depositCount++ diff --git a/cmd/centaurid/cmd/bech32_convert.go b/cmd/centaurid/cmd/bech32_convert.go index 336f70fc3..ffd2e780a 100644 --- a/cmd/centaurid/cmd/bech32_convert.go +++ b/cmd/centaurid/cmd/bech32_convert.go @@ -1,9 +1,9 @@ package cmd import ( - "github.com/cosmos/cosmos-sdk/types/bech32" - "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/types/bech32" ) var flagBech32Prefix = "prefix" diff --git a/cmd/centaurid/cmd/genaccounts.go b/cmd/centaurid/cmd/genaccounts.go index df42303d7..04f9033af 100644 --- a/cmd/centaurid/cmd/genaccounts.go +++ b/cmd/centaurid/cmd/genaccounts.go @@ -8,8 +8,6 @@ import ( "github.com/spf13/cobra" - "github.com/notional-labs/composable/v6/bech32-migration/utils" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -20,6 +18,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + + "github.com/notional-labs/composable/v6/bech32-migration/utils" ) // TODO this is heavily inspired from https://github.com/cosmos/interchain-accounts-demo/blob/7419a89e98b3da1a39c8ccfeb80ae2b5b1bf1783/cmd/icad/cmd/root.go#L154 diff --git a/cmd/centaurid/cmd/root.go b/cmd/centaurid/cmd/root.go index 007663989..83ec1c291 100644 --- a/cmd/centaurid/cmd/root.go +++ b/cmd/centaurid/cmd/root.go @@ -6,14 +6,11 @@ import ( "os" "github.com/CosmWasm/wasmd/x/wasm" - dbm "github.com/cometbft/cometbft-db" - tmcli "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" - config "github.com/cosmos/cosmos-sdk/client/config" + "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" @@ -28,14 +25,15 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" "github.com/cosmos/cosmos-sdk/x/genutil" - - tmcfg "github.com/cometbft/cometbft/config" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + dbm "github.com/cometbft/cometbft-db" + tmcfg "github.com/cometbft/cometbft/config" + tmcli "github.com/cometbft/cometbft/libs/cli" + "github.com/cometbft/cometbft/libs/log" + "github.com/notional-labs/composable/v6/app" - // "github.com/notional-labs/composable/v6/app/params" - // this line is used by starport scaffolding # stargate/root/import ) var ChainID string diff --git a/cmd/centaurid/config/config.go b/cmd/centaurid/config/config.go index 38aaf57d3..eca1052b5 100644 --- a/cmd/centaurid/config/config.go +++ b/cmd/centaurid/config/config.go @@ -1,10 +1,10 @@ package types import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - - errorsmod "cosmossdk.io/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/version" ) diff --git a/cmd/centaurid/main.go b/cmd/centaurid/main.go index bad5e27a4..445561bb3 100644 --- a/cmd/centaurid/main.go +++ b/cmd/centaurid/main.go @@ -6,7 +6,7 @@ import ( svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/notional-labs/composable/v6/app" - cmd "github.com/notional-labs/composable/v6/cmd/centaurid/cmd" + "github.com/notional-labs/composable/v6/cmd/centaurid/cmd" cmdcfg "github.com/notional-labs/composable/v6/cmd/centaurid/config" ) diff --git a/custom/bank/bank_test.go b/custom/bank/bank_test.go index ffbaa63f2..c1e0b966e 100644 --- a/custom/bank/bank_test.go +++ b/custom/bank/bank_test.go @@ -3,11 +3,13 @@ package bank_test import ( "testing" + "github.com/stretchr/testify/suite" + sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - "github.com/stretchr/testify/suite" customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) diff --git a/custom/bank/keeper/keeper.go b/custom/bank/keeper/keeper.go index 222ce1a3b..44b34797f 100644 --- a/custom/bank/keeper/keeper.go +++ b/custom/bank/keeper/keeper.go @@ -3,6 +3,9 @@ package keeper import ( "context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -10,11 +13,8 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" banktypes "github.com/notional-labs/composable/v6/custom/bank/types" - transfermiddlewarekeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) diff --git a/go.mod b/go.mod index 3a2ff703b..805b0688a 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,18 @@ module github.com/notional-labs/composable/v6 -go 1.19 +go 1.21 + +toolchain go1.21.5 require ( - cosmossdk.io/math v1.1.2 + cosmossdk.io/math v1.2.0 cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d github.com/CosmWasm/wasmd v0.40.1 github.com/client9/misspell v0.3.4 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 github.com/cosmos/cosmos-proto v1.0.0-beta.2 - github.com/cosmos/cosmos-sdk v0.47.5 + github.com/cosmos/cosmos-sdk v0.47.6 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0 github.com/cosmos/ibc-go/v7 v7.3.1 @@ -24,8 +26,8 @@ require ( github.com/strangelove-ventures/async-icq/v7 v7.0.0-20230413165143-a3b65ccdc897 github.com/stretchr/testify v1.8.4 golang.org/x/tools v0.6.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 - google.golang.org/grpc v1.56.2 + google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 + google.golang.org/grpc v1.58.3 gotest.tools/v3 v3.5.0 mvdan.cc/gofumpt v0.4.0 ) @@ -163,9 +165,9 @@ require ( go.uber.org/zap v1.23.0 // indirect golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect golang.org/x/mod v0.11.0 // indirect - golang.org/x/sync v0.2.0 // indirect - google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + golang.org/x/sync v0.3.0 // indirect + google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect honnef.co/go/tools v0.3.3 // indirect mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect @@ -173,10 +175,10 @@ require ( ) require ( - cloud.google.com/go v0.110.4 // indirect - cloud.google.com/go/compute v1.20.1 // indirect + cloud.google.com/go v0.110.8 // indirect + cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/iam v1.1.2 // indirect cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/log v1.2.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect; indirect // safe because we're using permissioned cosmwasm @@ -190,8 +192,8 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.11.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect @@ -207,9 +209,9 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.11 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.126.0 // indirect + google.golang.org/api v0.128.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) @@ -234,8 +236,8 @@ require ( 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 v0.20.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect + github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect @@ -254,7 +256,7 @@ require ( github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.1.2 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect @@ -275,7 +277,7 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect - github.com/klauspost/compress v1.16.3 // indirect + github.com/klauspost/compress v1.16.7 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect @@ -307,12 +309,12 @@ require ( github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.7 // indirect - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect google.golang.org/protobuf v1.31.0 gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -334,6 +336,7 @@ replace ( github.com/cosmos/ledger-cosmos-go => github.com/cosmos/ledger-cosmos-go v0.12.4 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 + github.com/terra-money/alliance => github.com/notional-labs/alliance v1.0.1-0.20231106184124-5cc1ff759647 github.com/zondax/ledger-go => github.com/zondax/ledger-go v0.14.3 ) diff --git a/go.sum b/go.sum index d108453da..e85b4f337 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= -cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -72,8 +72,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -113,8 +113,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iam v1.1.2 h1:gacbrBdWcoVmGLozRuStX45YKvJtzIjJdAolzUs1sm4= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -199,8 +199,8 @@ cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= -cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= -cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= +cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d/go.mod h1:xbjky3L3DJEylaho6gXplkrMvJ5sFgv+qNX+Nn47bzY= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= @@ -215,6 +215,7 @@ github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0S github.com/Antonboom/nilnil v0.1.1 h1:PHhrh5ANKFWRBh7TdYmyyq2gyT2lotnvFvvFbylF81Q= github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= @@ -234,7 +235,9 @@ github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= @@ -244,6 +247,7 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -275,6 +279,7 @@ github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -297,8 +302,11 @@ github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92 github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= @@ -361,6 +369,7 @@ github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3Hf github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -371,8 +380,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.5 h1:n1+WjP/VM/gAEOx3TqU2/Ny734rj/MX1kpUnn7zVJP8= -github.com/cosmos/cosmos-sdk v0.47.5/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= +github.com/cosmos/cosmos-sdk v0.47.6 h1:uyo/eg9NMB66aQZIZUv/LeOPTdSnsU23wZkgFYpjikQ= +github.com/cosmos/cosmos-sdk v0.47.6/go.mod h1:xTc1chW8HyUWCfrgGbjS5jNu9RzlPVrBNfbL9RmZUio= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -381,8 +390,8 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= @@ -410,6 +419,7 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= @@ -428,7 +438,9 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUn github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -466,9 +478,11 @@ github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -482,9 +496,11 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-critic/go-critic v0.6.5 h1:fDaR/5GWURljXwF8Eh31T2GZNz9X4jeboS912mWF8Uo= github.com/go-critic/go-critic v0.6.5/go.mod h1:ezfP/Lh7MA6dBNn4c6ab5ALv3sKnZVLx37tr00uuaOY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -504,10 +520,13 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= @@ -539,6 +558,7 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -555,8 +575,8 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -647,6 +667,7 @@ github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIG github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -674,8 +695,8 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.4 h1:uGy6JWR/uMIILU8wbf+OkstIrNiMjGpEIyhx8f6W7s4= +github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -685,8 +706,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -718,6 +739,7 @@ github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3 github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -798,6 +820,7 @@ github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= @@ -842,8 +865,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= -github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -867,6 +890,7 @@ github.com/ldez/tagliatelle v0.3.1 h1:3BqVVlReVUZwafJUwQ+oxbx2BEX2vUG4Yu/NOfMiKi github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leonklingele/grouper v1.1.0 h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg= github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -974,6 +998,7 @@ github.com/notional-labs/ibc-go/v7 v7.2.1-0.20231010040541-6cf43006971f h1:Uw35V github.com/notional-labs/ibc-go/v7 v7.2.1-0.20231010040541-6cf43006971f/go.mod h1:hjcl3RPLSDf0LSXrFyk2iTQCCFs5pfLbJb8h/5gJ2Vg= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -984,16 +1009,21 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1003,6 +1033,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -1026,6 +1057,7 @@ github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7 github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1233,6 +1265,7 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1286,7 +1319,9 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU= +go.uber.org/mock v0.2.0/go.mod h1:J0y0rp9L3xiff1+ZBfKxlC1fz2+aO16tw0tsDOixfuM= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= @@ -1311,8 +1346,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1422,8 +1457,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1449,8 +1484,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1465,8 +1500,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1573,13 +1608,13 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1591,8 +1626,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1748,8 +1783,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.128.0 h1:RjPESny5CnQRn9V6siglged+DZCgfu9l6mO9dkX9VOg= +google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1867,12 +1902,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a h1:fwgW9j3vHirt4ObdHoYNwuO24BEZjSzbh+zPaNWoiY8= +google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1914,8 +1949,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1941,6 +1976,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/x/ibc-hooks/client/cli/query.go b/x/ibc-hooks/client/cli/query.go index 7b8cc8baa..b69c2fce5 100644 --- a/x/ibc-hooks/client/cli/query.go +++ b/x/ibc-hooks/client/cli/query.go @@ -4,13 +4,13 @@ import ( "fmt" "strings" + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/spf13/cobra" "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper" - "github.com/notional-labs/composable/v6/x/ibc-hooks/types" ) diff --git a/x/ibc-hooks/ibc_module.go b/x/ibc-hooks/ibc_module.go index e21558919..383870763 100644 --- a/x/ibc-hooks/ibc_module.go +++ b/x/ibc-hooks/ibc_module.go @@ -1,8 +1,6 @@ package ibchooks import ( - // external libraries - sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" diff --git a/x/ibc-hooks/ics4_middleware.go b/x/ibc-hooks/ics4_middleware.go index e9ddedd82..1476f89fa 100644 --- a/x/ibc-hooks/ics4_middleware.go +++ b/x/ibc-hooks/ics4_middleware.go @@ -1,8 +1,6 @@ package ibchooks import ( - // external libraries - sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" diff --git a/x/ibc-hooks/keeper/keeper.go b/x/ibc-hooks/keeper/keeper.go index 2462a130f..ec1955db1 100644 --- a/x/ibc-hooks/keeper/keeper.go +++ b/x/ibc-hooks/keeper/keeper.go @@ -3,11 +3,12 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" + "github.com/cometbft/cometbft/libs/log" + "github.com/notional-labs/composable/v6/x/ibc-hooks/types" ) @@ -27,7 +28,7 @@ func NewKeeper( } // Logger returns a logger for the x/tokenfactory module -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } diff --git a/x/ibc-hooks/module.go b/x/ibc-hooks/module.go index 779f67846..5607e7ed4 100644 --- a/x/ibc-hooks/module.go +++ b/x/ibc-hooks/module.go @@ -3,20 +3,20 @@ package ibchooks import ( "encoding/json" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/types/module" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/notional-labs/composable/v6/x/ibc-hooks/client/cli" - "github.com/notional-labs/composable/v6/x/ibc-hooks/types" - + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" abci "github.com/cometbft/cometbft/abci/types" - sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/notional-labs/composable/v6/x/ibc-hooks/client/cli" + "github.com/notional-labs/composable/v6/x/ibc-hooks/types" ) var ( @@ -38,7 +38,7 @@ func (AppModuleBasic) Name() string { func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {} // RegisterInterfaces registers the module's interface types. -func (b AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry) {} +func (AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry) {} // DefaultGenesis returns default genesis state as raw bytes for the // module. @@ -86,7 +86,7 @@ func (AppModule) Name() string { } // RegisterInvariants registers the ibc-hooks module invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} +func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // QuerierRoute returns the module's querier route name. func (AppModule) QuerierRoute() string { @@ -95,21 +95,21 @@ func (AppModule) QuerierRoute() string { // RegisterServices registers a gRPC query service to respond to the // module-specific gRPC queries. -func (am AppModule) RegisterServices(_ module.Configurator) { +func (AppModule) RegisterServices(_ module.Configurator) { } // InitGenesis performs genesis initialization for the ibc-hooks module. It returns // no validator updates. -func (am AppModule) InitGenesis(_ sdk.Context, _ codec.JSONCodec, _ json.RawMessage) []abci.ValidatorUpdate { +func (AppModule) InitGenesis(_ sdk.Context, _ codec.JSONCodec, _ json.RawMessage) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } -func (am AppModule) ExportGenesis(_ sdk.Context, _ codec.JSONCodec) json.RawMessage { +func (AppModule) ExportGenesis(_ sdk.Context, _ codec.JSONCodec) json.RawMessage { return json.RawMessage([]byte("{}")) } // BeginBlock returns the begin blocker for the ibc-hooks module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { +func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { } // EndBlock returns the end blocker for the ibc-hooks module. It returns no validator diff --git a/x/ibc-hooks/relay_test.go b/x/ibc-hooks/relay_test.go index 338ed6603..ffde63fb4 100644 --- a/x/ibc-hooks/relay_test.go +++ b/x/ibc-hooks/relay_test.go @@ -5,10 +5,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + sdk "github.com/cosmos/cosmos-sdk/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - "github.com/stretchr/testify/suite" customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ibchookskeeper "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper" diff --git a/x/ibc-hooks/utils.go b/x/ibc-hooks/utils.go index 38865fccf..f1d458a56 100644 --- a/x/ibc-hooks/utils.go +++ b/x/ibc-hooks/utils.go @@ -5,6 +5,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" diff --git a/x/ibc-hooks/wasm_hook.go b/x/ibc-hooks/wasm_hook.go index bc239f02c..d14cb49a4 100644 --- a/x/ibc-hooks/wasm_hook.go +++ b/x/ibc-hooks/wasm_hook.go @@ -6,6 +6,12 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" @@ -13,10 +19,6 @@ import ( "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper" "github.com/notional-labs/composable/v6/x/ibc-hooks/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" ) type ContractAck struct { @@ -132,12 +134,12 @@ func (h WasmHooks) SendPacketOverride( timeoutTimestamp uint64, data []byte, ) (sequence uint64, err error) { - isIcs20, Ics20PacketData := isIcs20Packet(data) + isIcs20, ics20PacketData := isIcs20Packet(data) if !isIcs20 { return i.channel.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) // continue } - isCallbackRouted, metadata := jsonStringHasKey(Ics20PacketData.GetMemo(), types.IBCCallbackKey) + isCallbackRouted, metadata := jsonStringHasKey(ics20PacketData.GetMemo(), types.IBCCallbackKey) if !isCallbackRouted { return i.channel.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) // continue } @@ -156,11 +158,11 @@ func (h WasmHooks) SendPacketOverride( } stringMetadata := string(bzMetadata) if stringMetadata == "{}" { - Ics20PacketData.Memo = "" + ics20PacketData.Memo = "" } else { - Ics20PacketData.Memo = stringMetadata + ics20PacketData.Memo = stringMetadata } - dataBytes, err := json.Marshal(Ics20PacketData) + dataBytes, err := json.Marshal(ics20PacketData) if err != nil { return 0, errorsmod.Wrap(err, "Send packet with callback error") } diff --git a/x/mint/client/cli/query_test.go b/x/mint/client/cli/query_test.go index abf592e43..78803c5c2 100644 --- a/x/mint/client/cli/query_test.go +++ b/x/mint/client/cli/query_test.go @@ -7,18 +7,18 @@ import ( "strings" "testing" - rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/crypto/keyring" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - - "github.com/cosmos/cosmos-sdk/crypto/keyring" testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/mint" mintcli "github.com/cosmos/cosmos-sdk/x/mint/client/cli" + + rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock" ) func TestGetCmdQueryParams(t *testing.T) { diff --git a/x/mint/client/cli/tx.go b/x/mint/client/cli/tx.go index 3fb5b9dc7..5f8c7fc6e 100644 --- a/x/mint/client/cli/tx.go +++ b/x/mint/client/cli/tx.go @@ -1,11 +1,12 @@ package cli import ( + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/spf13/cobra" "github.com/notional-labs/composable/v6/x/mint/types" ) diff --git a/x/mint/keeper/genesis.go b/x/mint/keeper/genesis.go index 570ebecb3..0fbfee107 100644 --- a/x/mint/keeper/genesis.go +++ b/x/mint/keeper/genesis.go @@ -7,15 +7,15 @@ import ( ) // InitGenesis new mint genesis -func (keeper Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data *types.GenesisState) { - keeper.SetMinter(ctx, data.Minter) +func (k Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data *types.GenesisState) { + k.SetMinter(ctx, data.Minter) - if err := keeper.SetParams(ctx, data.Params); err != nil { + if err := k.SetParams(ctx, data.Params); err != nil { panic(err) } newCoins := sdk.NewCoins(data.IncentivesSupply) - if err := keeper.MintCoins(ctx, newCoins); err != nil { + if err := k.MintCoins(ctx, newCoins); err != nil { panic(err) } @@ -23,10 +23,10 @@ func (keeper Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data * } // ExportGenesis returns a GenesisState for a given context and keeper. -func (keeper Keeper) ExportGenesis(ctx sdk.Context, authKeeper types.AccountKeeper) *types.GenesisState { - minter := keeper.GetMinter(ctx) - params := keeper.GetParams(ctx) +func (k Keeper) ExportGenesis(ctx sdk.Context, authKeeper types.AccountKeeper) *types.GenesisState { + minter := k.GetMinter(ctx) + params := k.GetParams(ctx) - remIncentives := keeper.bankKeeper.GetBalance(ctx, authKeeper.GetModuleAddress(types.ModuleName), params.MintDenom) + remIncentives := k.bankKeeper.GetBalance(ctx, authKeeper.GetModuleAddress(types.ModuleName), params.MintDenom) return types.NewGenesisState(minter, params, remIncentives) } diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index 70ff6ddf3..b547a3700 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -4,12 +4,13 @@ import ( "fmt" "cosmossdk.io/math" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cometbft/cometbft/libs/log" + "github.com/notional-labs/composable/v6/x/mint/types" ) @@ -63,7 +64,7 @@ func (k Keeper) GetAuthority() string { } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) } @@ -76,7 +77,7 @@ func (k Keeper) GetMinter(ctx sdk.Context) (minter types.Minter) { } k.cdc.MustUnmarshal(bz, &minter) - return + return minter } // SetMinter sets the minter. diff --git a/x/mint/keeper/msg_server.go b/x/mint/keeper/msg_server.go index 4feafae33..45c5b0f35 100644 --- a/x/mint/keeper/msg_server.go +++ b/x/mint/keeper/msg_server.go @@ -4,8 +4,8 @@ import ( "context" errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/notional-labs/composable/v6/x/mint/types" diff --git a/x/mint/module.go b/x/mint/module.go index 5205a408d..014103d49 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -16,6 +15,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/notional-labs/composable/v6/x/mint/client/cli" "github.com/notional-labs/composable/v6/x/mint/keeper" "github.com/notional-labs/composable/v6/x/mint/simulation" @@ -46,7 +47,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the module interface -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { +func (AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } @@ -115,7 +116,7 @@ func (AppModule) Name() string { } // RegisterInvariants registers the mint module invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} +func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // RegisterServices registers a gRPC query service to respond to the // module-specific gRPC queries. diff --git a/x/mint/simulation/genesis.go b/x/mint/simulation/genesis.go index f63d39818..2ffd90448 100644 --- a/x/mint/simulation/genesis.go +++ b/x/mint/simulation/genesis.go @@ -4,6 +4,7 @@ import ( "math/rand" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/mint/simulation/genesis_test.go b/x/mint/simulation/genesis_test.go index 57700280a..262ad8ab7 100644 --- a/x/mint/simulation/genesis_test.go +++ b/x/mint/simulation/genesis_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/mint/simulation/proposals_test.go b/x/mint/simulation/proposals_test.go index 69aca951a..31d5f6461 100644 --- a/x/mint/simulation/proposals_test.go +++ b/x/mint/simulation/proposals_test.go @@ -4,13 +4,14 @@ import ( "math/rand" "testing" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/notional-labs/composable/v6/x/mint/simulation" "github.com/notional-labs/composable/v6/x/mint/types" ) diff --git a/x/mint/types/expected_keepers.go b/x/mint/types/expected_keepers.go index bba9291a6..303b70a60 100644 --- a/x/mint/types/expected_keepers.go +++ b/x/mint/types/expected_keepers.go @@ -2,6 +2,7 @@ package types // noalias import ( "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" ) diff --git a/x/mint/types/genesis.go b/x/mint/types/genesis.go index ea420ef57..7f32e7d8f 100644 --- a/x/mint/types/genesis.go +++ b/x/mint/types/genesis.go @@ -2,6 +2,7 @@ package types import ( "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) diff --git a/x/mint/types/minter.go b/x/mint/types/minter.go index 10b38f5d3..38def06fb 100644 --- a/x/mint/types/minter.go +++ b/x/mint/types/minter.go @@ -4,6 +4,7 @@ import ( "fmt" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/types/minter_test.go b/x/mint/types/minter_test.go index 6289e0875..e970f1a7d 100644 --- a/x/mint/types/minter_test.go +++ b/x/mint/types/minter_test.go @@ -4,8 +4,9 @@ import ( "math/rand" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" ) // func TestNextInflation(t *testing.T) { diff --git a/x/mint/types/msg.go b/x/mint/types/msg.go index 4e81a18be..fc6d34bf7 100644 --- a/x/mint/types/msg.go +++ b/x/mint/types/msg.go @@ -2,6 +2,7 @@ package types import ( errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec/legacy" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/types/msgs.go b/x/mint/types/msgs.go index a9cf7c3a6..717a2daaa 100644 --- a/x/mint/types/msgs.go +++ b/x/mint/types/msgs.go @@ -2,6 +2,7 @@ package types import ( errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/types/params.go b/x/mint/types/params.go index c56ade10f..d744d03b2 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -8,6 +8,7 @@ import ( "sigs.k8s.io/yaml" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) diff --git a/x/ratelimit/ibc_middleware.go b/x/ratelimit/ibc_middleware.go index f22829935..24b93c6c4 100644 --- a/x/ratelimit/ibc_middleware.go +++ b/x/ratelimit/ibc_middleware.go @@ -3,15 +3,15 @@ package ratelimit import ( "fmt" - "github.com/notional-labs/composable/v6/x/ratelimit/keeper" - sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" + + "github.com/notional-labs/composable/v6/x/ratelimit/keeper" ) var _ porttypes.Middleware = &IBCMiddleware{} diff --git a/x/ratelimit/keeper/epoch.go b/x/ratelimit/keeper/epoch.go index 0039c067a..6e306ee13 100644 --- a/x/ratelimit/keeper/epoch.go +++ b/x/ratelimit/keeper/epoch.go @@ -6,9 +6,9 @@ import ( "github.com/gogo/protobuf/proto" - "github.com/notional-labs/composable/v6/x/ratelimit/types" - sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) // HasEpochInfo return true if has epoch info diff --git a/x/ratelimit/keeper/grpc_query.go b/x/ratelimit/keeper/grpc_query.go index 2aee780d2..3c0acebd3 100644 --- a/x/ratelimit/keeper/grpc_query.go +++ b/x/ratelimit/keeper/grpc_query.go @@ -4,7 +4,9 @@ import ( "context" errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" diff --git a/x/ratelimit/keeper/keeper.go b/x/ratelimit/keeper/keeper.go index 243241ca4..987d35ebd 100644 --- a/x/ratelimit/keeper/keeper.go +++ b/x/ratelimit/keeper/keeper.go @@ -3,11 +3,13 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + + "github.com/cometbft/cometbft/libs/log" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/notional-labs/composable/v6/x/ratelimit/types" @@ -56,7 +58,7 @@ func NewKeeper( } } -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } diff --git a/x/ratelimit/keeper/msg_server.go b/x/ratelimit/keeper/msg_server.go index c2f91c744..f4cfd8d71 100644 --- a/x/ratelimit/keeper/msg_server.go +++ b/x/ratelimit/keeper/msg_server.go @@ -4,6 +4,7 @@ import ( "context" "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" diff --git a/x/ratelimit/keeper/packet.go b/x/ratelimit/keeper/packet.go index 85e8510ab..f3b2ae05a 100644 --- a/x/ratelimit/keeper/packet.go +++ b/x/ratelimit/keeper/packet.go @@ -6,9 +6,11 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" @@ -35,7 +37,7 @@ type RateLimitedPacketInfo struct { // // For NATIVE denoms, return as is (e.g. ustrd) // For NON-NATIVE denoms, take the ibc hash (e.g. hash "transfer/channel-2/usoms" into "ibc/...") -func (k Keeper) ParseDenomFromSendPacket(packet transfertypes.FungibleTokenPacketData) (denom string) { +func (Keeper) ParseDenomFromSendPacket(packet transfertypes.FungibleTokenPacketData) (denom string) { // Determine the denom by looking at the denom trace path denomTrace := transfertypes.ParseDenomTrace(packet.Denom) @@ -82,7 +84,7 @@ func (k Keeper) ParseDenomFromSendPacket(packet transfertypes.FungibleTokenPacke // Packet Denom: transfer/channel-X/transfer/channel-Z/ujuno // -> Remove Prefix: transfer/channel-Z/ujuno // -> Hash: ibc/... -func (k Keeper) ParseDenomFromRecvPacket(packet channeltypes.Packet, packetData transfertypes.FungibleTokenPacketData) (denom string) { +func (Keeper) ParseDenomFromRecvPacket(packet channeltypes.Packet, packetData transfertypes.FungibleTokenPacketData) (denom string) { // To determine the denom, first check whether Stride is acting as source if transfertypes.ReceiverChainIsSource(packet.GetSourcePort(), packet.GetSourceChannel(), packetData.Denom) { // Remove the source prefix (e.g. transfer/channel-X/transfer/channel-Z/ujuno -> transfer/channel-Z/ujuno) diff --git a/x/ratelimit/keeper/rate_limit.go b/x/ratelimit/keeper/rate_limit.go index 8ef5514d8..4cf54be5e 100644 --- a/x/ratelimit/keeper/rate_limit.go +++ b/x/ratelimit/keeper/rate_limit.go @@ -7,6 +7,7 @@ import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -42,7 +43,7 @@ func EmitTransferDeniedEvent(ctx sdk.Context, reason, denom, channelID string, d } // Adds an amount to the flow in either the SEND or RECV direction -func (k Keeper) UpdateFlow(_ sdk.Context, rateLimit types.RateLimit, direction types.PacketDirection, amount math.Int) error { +func (Keeper) UpdateFlow(_ sdk.Context, rateLimit types.RateLimit, direction types.PacketDirection, amount math.Int) error { switch direction { case types.PACKET_SEND: return rateLimit.Flow.AddOutflow(amount, *rateLimit.Quota, rateLimit.MinRateLimitAmount) diff --git a/x/ratelimit/module.go b/x/ratelimit/module.go index 70a96f533..29b9879e9 100644 --- a/x/ratelimit/module.go +++ b/x/ratelimit/module.go @@ -5,16 +5,18 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" + + abci "github.com/cometbft/cometbft/abci/types" "github.com/notional-labs/composable/v6/x/ratelimit/client/cli" "github.com/notional-labs/composable/v6/x/ratelimit/keeper" @@ -136,7 +138,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { } // EndBlock implements the AppModule interface -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -151,9 +153,9 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RegisterStoreDecoder registers a decoder for router module's types -func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} +func (AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} // WeightedOperations returns the all the router module operations with their respective weights. -func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { +func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil } diff --git a/x/ratelimit/relay_test.go b/x/ratelimit/relay_test.go index 1e2b090ce..e11e3797b 100644 --- a/x/ratelimit/relay_test.go +++ b/x/ratelimit/relay_test.go @@ -3,10 +3,12 @@ package ratelimit_test import ( "testing" + "github.com/stretchr/testify/suite" + sdk "github.com/cosmos/cosmos-sdk/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - "github.com/stretchr/testify/suite" customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ratelimittypes "github.com/notional-labs/composable/v6/x/ratelimit/types" diff --git a/x/ratelimit/types/codec.go b/x/ratelimit/types/codec.go index a9d5d4676..ca7b0b06f 100644 --- a/x/ratelimit/types/codec.go +++ b/x/ratelimit/types/codec.go @@ -5,12 +5,11 @@ import ( "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" groupcodec "github.com/cosmos/cosmos-sdk/x/group/codec" - - sdk "github.com/cosmos/cosmos-sdk/types" ) // RegisterLegacyAminoCodec registers the account interfaces and concrete types on the diff --git a/x/ratelimit/types/expected_keepers.go b/x/ratelimit/types/expected_keepers.go index 96e72013f..1385913f9 100644 --- a/x/ratelimit/types/expected_keepers.go +++ b/x/ratelimit/types/expected_keepers.go @@ -2,6 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" ) diff --git a/x/ratelimit/types/msg.go b/x/ratelimit/types/msg.go index 5a100c3e8..ca77f2eba 100644 --- a/x/ratelimit/types/msg.go +++ b/x/ratelimit/types/msg.go @@ -3,8 +3,10 @@ package types import ( errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" ) @@ -36,10 +38,10 @@ func NewMsgAddRateLimit( } // Route Implements Msg. -func (msg MsgAddRateLimit) Route() string { return RouterKey } +func (MsgAddRateLimit) Route() string { return RouterKey } // Type Implements Msg. -func (msg MsgAddRateLimit) Type() string { return TypeMsgAddRateLimit } +func (MsgAddRateLimit) Type() string { return TypeMsgAddRateLimit } // GetSignBytes implements the LegacyMsg interface. func (msg MsgAddRateLimit) GetSignBytes() []byte { @@ -108,10 +110,10 @@ func NewMsgUpdateRateLimit( } // Route Implements Msg. -func (msg MsgUpdateRateLimit) Route() string { return RouterKey } +func (MsgUpdateRateLimit) Route() string { return RouterKey } // Type Implements Msg. -func (msg MsgUpdateRateLimit) Type() string { return TypeMsgUpdateRateLimit } +func (MsgUpdateRateLimit) Type() string { return TypeMsgUpdateRateLimit } // GetSignBytes implements the LegacyMsg interface. func (msg MsgUpdateRateLimit) GetSignBytes() []byte { @@ -174,10 +176,10 @@ func NewMsgRemoveRateLimit( } // Route Implements Msg. -func (msg MsgRemoveRateLimit) Route() string { return RouterKey } +func (MsgRemoveRateLimit) Route() string { return RouterKey } // Type Implements Msg. -func (msg MsgRemoveRateLimit) Type() string { return TypeMsgRemoveRateLimit } +func (MsgRemoveRateLimit) Type() string { return TypeMsgRemoveRateLimit } // GetSignBytes implements the LegacyMsg interface. func (msg MsgRemoveRateLimit) GetSignBytes() []byte { @@ -218,10 +220,10 @@ func NewMsgResetRateLimit( } // Route Implements Msg. -func (msg MsgResetRateLimit) Route() string { return RouterKey } +func (MsgResetRateLimit) Route() string { return RouterKey } // Type Implements Msg. -func (msg MsgResetRateLimit) Type() string { return TypeMsgResetRateLimit } +func (MsgResetRateLimit) Type() string { return TypeMsgResetRateLimit } // GetSignBytes implements the LegacyMsg interface. func (msg MsgResetRateLimit) GetSignBytes() []byte { diff --git a/x/ratelimit/types/params.go b/x/ratelimit/types/params.go index 3e59a8f77..b7d06d228 100644 --- a/x/ratelimit/types/params.go +++ b/x/ratelimit/types/params.go @@ -22,11 +22,11 @@ func DefaultParams() Params { } // Implements params.ParamSet. -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { +func (*Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{} } // Validate validates the set of params -func (p Params) Validate() error { +func (Params) Validate() error { return nil } diff --git a/x/transfermiddleware/client/cli/query.go b/x/transfermiddleware/client/cli/query.go index 85d03f921..31a9c6a0d 100644 --- a/x/transfermiddleware/client/cli/query.go +++ b/x/transfermiddleware/client/cli/query.go @@ -3,10 +3,11 @@ package cli import ( "fmt" + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/version" - "github.com/spf13/cobra" "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) diff --git a/x/transfermiddleware/client/cli/tx.go b/x/transfermiddleware/client/cli/tx.go index 2bcccaec1..d5234b7a3 100644 --- a/x/transfermiddleware/client/cli/tx.go +++ b/x/transfermiddleware/client/cli/tx.go @@ -3,11 +3,12 @@ package cli import ( "fmt" + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/version" - "github.com/spf13/cobra" "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) diff --git a/x/transfermiddleware/ibc_ante_test.go b/x/transfermiddleware/ibc_ante_test.go index 0ba0b9c33..879720934 100644 --- a/x/transfermiddleware/ibc_ante_test.go +++ b/x/transfermiddleware/ibc_ante_test.go @@ -5,12 +5,14 @@ import ( "os" "testing" + "github.com/stretchr/testify/suite" + sdk "github.com/cosmos/cosmos-sdk/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" wasmkeeper "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/keeper" wasmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" - "github.com/stretchr/testify/suite" customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) diff --git a/x/transfermiddleware/ibc_middleware.go b/x/transfermiddleware/ibc_middleware.go index 4be08ca44..66dead403 100644 --- a/x/transfermiddleware/ibc_middleware.go +++ b/x/transfermiddleware/ibc_middleware.go @@ -2,9 +2,11 @@ package transfermiddleware import ( "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" diff --git a/x/transfermiddleware/keeper/abci.go b/x/transfermiddleware/keeper/abci.go index a3f0479d8..f453a1114 100644 --- a/x/transfermiddleware/keeper/abci.go +++ b/x/transfermiddleware/keeper/abci.go @@ -12,7 +12,10 @@ func (k Keeper) BeginBlocker(ctx sdk.Context) { k.IterateRemoveListInfo(ctx, func(removeList types.RemoveParachainIBCTokenInfo) (stop bool) { // If pass the duration, remove parachain token info if ctx.BlockTime().After(removeList.RemoveTime) { - k.RemoveParachainIBCInfo(ctx, removeList.NativeDenom) + err := k.RemoveParachainIBCInfo(ctx, removeList.NativeDenom) + if err != nil { + return true + } } return false }) diff --git a/x/transfermiddleware/keeper/genesis.go b/x/transfermiddleware/keeper/genesis.go index 6a4615b7e..65af81c68 100644 --- a/x/transfermiddleware/keeper/genesis.go +++ b/x/transfermiddleware/keeper/genesis.go @@ -10,7 +10,7 @@ import ( // InitGenesis initializes the transfermiddleware module's state from a provided genesis state. func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { for _, tokenInfo := range genState.TokenInfos { - k.AddParachainIBCInfo(ctx, tokenInfo.IbcDenom, tokenInfo.ChannelID, tokenInfo.NativeDenom, tokenInfo.AssetId) + k.AddParachainIBCInfo(ctx, tokenInfo.IbcDenom, tokenInfo.ChannelID, tokenInfo.NativeDenom, tokenInfo.AssetId) //nolint:errcheck } k.SetParams(ctx, genState.Params) } diff --git a/x/transfermiddleware/keeper/genesis_test.go b/x/transfermiddleware/keeper/genesis_test.go index ca352b56c..32f69349e 100644 --- a/x/transfermiddleware/keeper/genesis_test.go +++ b/x/transfermiddleware/keeper/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - helpers "github.com/notional-labs/composable/v6/app/helpers" + "github.com/notional-labs/composable/v6/app/helpers" "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) diff --git a/x/transfermiddleware/keeper/grpc_query.go b/x/transfermiddleware/keeper/grpc_query.go index dbf461a9b..654e3b3f4 100644 --- a/x/transfermiddleware/keeper/grpc_query.go +++ b/x/transfermiddleware/keeper/grpc_query.go @@ -6,7 +6,9 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkquery "github.com/cosmos/cosmos-sdk/types/query" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) @@ -22,7 +24,7 @@ func (k Keeper) ParaTokenInfo(c context.Context, req *types.QueryParaTokenInfoRe }, nil } -func (k Keeper) EscrowAddress(_ context.Context, req *types.QueryEscrowAddressRequest) (*types.QueryEscrowAddressResponse, error) { +func (Keeper) EscrowAddress(_ context.Context, req *types.QueryEscrowAddressRequest) (*types.QueryEscrowAddressResponse, error) { escrowAddress := transfertypes.GetEscrowAddress(transfertypes.PortID, req.ChannelID) return &types.QueryEscrowAddressResponse{ diff --git a/x/transfermiddleware/keeper/ics4wrapper.go b/x/transfermiddleware/keeper/ics4wrapper.go index 14dd2e898..5d53bda69 100644 --- a/x/transfermiddleware/keeper/ics4wrapper.go +++ b/x/transfermiddleware/keeper/ics4wrapper.go @@ -4,9 +4,11 @@ import ( "fmt" "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" @@ -15,12 +17,12 @@ import ( "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) -func (keeper Keeper) hasParachainIBCTokenInfo(ctx sdk.Context, nativeDenom string) bool { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) hasParachainIBCTokenInfo(ctx sdk.Context, nativeDenom string) bool { + store := ctx.KVStore(k.storeKey) return store.Has(types.GetKeyParachainIBCTokenInfoByNativeDenom(nativeDenom)) } -func (keeper Keeper) handleOverrideSendPacketTransferLogic( +func (k Keeper) handleOverrideSendPacketTransferLogic( ctx sdk.Context, _ *capabilitytypes.Capability, sourcePort, sourceChannel string, @@ -40,7 +42,7 @@ func (keeper Keeper) handleOverrideSendPacketTransferLogic( } // check if denom in fungibleTokenPacketData is native denom in parachain info and - parachainInfo := keeper.GetParachainIBCTokenInfoByNativeDenom(ctx, fungibleTokenPacketData.Denom) + parachainInfo := k.GetParachainIBCTokenInfoByNativeDenom(ctx, fungibleTokenPacketData.Denom) // burn native token in escrow address transferAmount, ok := sdk.NewIntFromString(fungibleTokenPacketData.Amount) @@ -53,17 +55,20 @@ func (keeper Keeper) handleOverrideSendPacketTransferLogic( ibcTransferToken := sdk.NewCoin(parachainInfo.IbcDenom, transferAmount) escrowAddress := transfertypes.GetEscrowAddress(sourcePort, sourceChannel) - err = keeper.bankKeeper.SendCoinsFromAccountToModule(ctx, escrowAddress, transfertypes.ModuleName, sdk.NewCoins(nativeTransferToken)) + err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, escrowAddress, transfertypes.ModuleName, sdk.NewCoins(nativeTransferToken)) if err != nil { return 0, err } // burn native token // Get Coin from excrow address - keeper.bankKeeper.BurnCoins(ctx, transfertypes.ModuleName, sdk.NewCoins(nativeTransferToken)) + err = k.bankKeeper.BurnCoins(ctx, transfertypes.ModuleName, sdk.NewCoins(nativeTransferToken)) + if err != nil { + return 0, err + } // release lock IBC token and send it to sender // TODO: should we use a module address for this ? - err = keeper.bankKeeper.SendCoins(ctx, escrowAddress, sender, sdk.NewCoins(ibcTransferToken)) + err = k.bankKeeper.SendCoins(ctx, escrowAddress, sender, sdk.NewCoins(ibcTransferToken)) if err != nil { return 0, err } @@ -79,7 +84,7 @@ func (keeper Keeper) handleOverrideSendPacketTransferLogic( TimeoutTimestamp: timeoutTimestamp, Memo: fungibleTokenPacketData.Memo, } - res, err := keeper.executeTransferMsg(ctx, &transferMsg) + res, err := k.executeTransferMsg(ctx, &transferMsg) if err != nil { return 0, err } @@ -87,15 +92,15 @@ func (keeper Keeper) handleOverrideSendPacketTransferLogic( return res.Sequence, nil } -func (keeper Keeper) executeTransferMsg(ctx sdk.Context, transferMsg *transfertypes.MsgTransfer) (*transfertypes.MsgTransferResponse, error) { +func (k Keeper) executeTransferMsg(ctx sdk.Context, transferMsg *transfertypes.MsgTransfer) (*transfertypes.MsgTransferResponse, error) { if err := transferMsg.ValidateBasic(); err != nil { return nil, fmt.Errorf("bad msg %v", err.Error()) } - return keeper.transferKeeper.Transfer(sdk.WrapSDKContext(ctx), transferMsg) + return k.transferKeeper.Transfer(sdk.WrapSDKContext(ctx), transferMsg) } // SendPacket wraps IBC ChannelKeeper's SendPacket function -func (keeper Keeper) SendPacket( +func (k Keeper) SendPacket( ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort, sourceChannel string, @@ -111,31 +116,31 @@ func (keeper Keeper) SendPacket( } // check if denom in fungibleTokenPacketData is native denom in parachain info and - parachainInfo := keeper.GetParachainIBCTokenInfoByNativeDenom(ctx, fungibleTokenPacketData.Denom) + parachainInfo := k.GetParachainIBCTokenInfoByNativeDenom(ctx, fungibleTokenPacketData.Denom) if parachainInfo.ChannelID != sourceChannel || parachainInfo.NativeDenom != fungibleTokenPacketData.Denom { - return keeper.ICS4Wrapper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) + return k.ICS4Wrapper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) } - return keeper.handleOverrideSendPacketTransferLogic(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) + return k.handleOverrideSendPacketTransferLogic(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) } // WriteAcknowledgement wraps IBC ICS4Wrapper WriteAcknowledgement function. // ICS29 WriteAcknowledgement is used for asynchronous acknowledgements. -func (keeper *Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, acknowledgement ibcexported.Acknowledgement) error { - return keeper.ICS4Wrapper.WriteAcknowledgement(ctx, chanCap, packet, acknowledgement) +func (k *Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, acknowledgement ibcexported.Acknowledgement) error { + return k.ICS4Wrapper.WriteAcknowledgement(ctx, chanCap, packet, acknowledgement) } // WriteAcknowledgement wraps IBC ICS4Wrapper GetAppVersion function. -func (keeper *Keeper) GetAppVersion( +func (k *Keeper) GetAppVersion( ctx sdk.Context, portID, channelID string, ) (string, bool) { - return keeper.ICS4Wrapper.GetAppVersion(ctx, portID, channelID) + return k.ICS4Wrapper.GetAppVersion(ctx, portID, channelID) } -func (keeper *Keeper) OnAcknowledgementPacket( +func (k *Keeper) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, @@ -152,7 +157,7 @@ func (keeper *Keeper) OnAcknowledgementPacket( switch ack.Response.(type) { case *channeltypes.Acknowledgement_Error: - return keeper.refundToken(ctx, packet, data) + return k.refundToken(ctx, packet, data) default: // the acknowledgement succeeded on the receiving chain so nothing // needs to be executed and no error needs to be returned @@ -160,7 +165,7 @@ func (keeper *Keeper) OnAcknowledgementPacket( } } -func (keeper Keeper) refundToken(ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData) error { +func (k Keeper) refundToken(ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData) error { // parse the denomination from the full denom path trace := transfertypes.ParseDenomTrace(data.Denom) // parse the transfer amount @@ -180,11 +185,11 @@ func (keeper Keeper) refundToken(ctx sdk.Context, packet channeltypes.Packet, da // This case should never happened return nil } - nativeDenom := keeper.GetNativeDenomByIBCDenomSecondaryIndex(ctx, trace.IBCDenom()) - paraTokenInfo := keeper.GetParachainIBCTokenInfoByNativeDenom(ctx, nativeDenom) + nativeDenom := k.GetNativeDenomByIBCDenomSecondaryIndex(ctx, trace.IBCDenom()) + paraTokenInfo := k.GetParachainIBCTokenInfoByNativeDenom(ctx, nativeDenom) // only trigger if source channel is from parachain. - if !keeper.hasParachainIBCTokenInfo(ctx, nativeDenom) { + if !k.hasParachainIBCTokenInfo(ctx, nativeDenom) { return nil } @@ -192,16 +197,16 @@ func (keeper Keeper) refundToken(ctx sdk.Context, packet channeltypes.Packet, da nativeToken := sdk.NewCoin(paraTokenInfo.NativeDenom, transferAmount) // send IBC token to escrow address ibc token escrowAddress := transfertypes.GetEscrowAddress(transfertypes.PortID, paraTokenInfo.ChannelID) - if err := keeper.bankKeeper.SendCoins(ctx, sender, escrowAddress, sdk.NewCoins(token)); err != nil { + if err := k.bankKeeper.SendCoins(ctx, sender, escrowAddress, sdk.NewCoins(token)); err != nil { panic(fmt.Sprintf("unable to send coins from account to module despite previously minting coins to module account: %v", err)) } // mint native token and send back to sender - if err := keeper.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(nativeToken)); err != nil { + if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(nativeToken)); err != nil { return err } - if err := keeper.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sender, sdk.NewCoins(nativeToken)); err != nil { + if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sender, sdk.NewCoins(nativeToken)); err != nil { panic(fmt.Sprintf("unable to send coins from module to account despite previously minting coins to module account: %v", err)) } } diff --git a/x/transfermiddleware/keeper/keeper.go b/x/transfermiddleware/keeper/keeper.go index 095f33dc0..2c4557d47 100644 --- a/x/transfermiddleware/keeper/keeper.go +++ b/x/transfermiddleware/keeper/keeper.go @@ -4,13 +4,16 @@ import ( "time" errorsmod "cosmossdk.io/errors" - "github.com/cometbft/cometbft/libs/log" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + + "github.com/cometbft/cometbft/libs/log" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" @@ -59,8 +62,8 @@ func NewKeeper( // TODO: testing // AddParachainIBCTokenInfo add new parachain token information token to chain state. -func (keeper Keeper) AddParachainIBCInfo(ctx sdk.Context, ibcDenom, channelID, nativeDenom, assetID string) error { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) AddParachainIBCInfo(ctx sdk.Context, ibcDenom, channelID, nativeDenom, assetID string) error { + store := ctx.KVStore(k.storeKey) if store.Has(types.GetKeyParachainIBCTokenInfoByAssetID(assetID)) { return errorsmod.Wrapf(types.ErrMultipleMapping, "duplicate assetID") } @@ -78,7 +81,7 @@ func (keeper Keeper) AddParachainIBCInfo(ctx sdk.Context, ibcDenom, channelID, n AssetId: assetID, } - bz, err := keeper.cdc.Marshal(&info) + bz, err := k.cdc.Marshal(&info) if err != nil { return err } @@ -91,9 +94,9 @@ func (keeper Keeper) AddParachainIBCInfo(ctx sdk.Context, ibcDenom, channelID, n // TODO: testing // AddParachainIBCInfoToRemoveList add parachain token information token to remove list. -func (keeper Keeper) AddParachainIBCInfoToRemoveList(ctx sdk.Context, nativeDenom string) (time.Time, error) { - params := keeper.GetParams(ctx) - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) AddParachainIBCInfoToRemoveList(ctx sdk.Context, nativeDenom string) (time.Time, error) { + params := k.GetParams(ctx) + store := ctx.KVStore(k.storeKey) if !store.Has(types.GetKeyParachainIBCTokenInfoByNativeDenom(nativeDenom)) { return time.Time{}, errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, "Token %v info not found", nativeDenom) } @@ -105,7 +108,7 @@ func (keeper Keeper) AddParachainIBCInfoToRemoveList(ctx sdk.Context, nativeDeno RemoveTime: removeTime, } - bz, err := keeper.cdc.Marshal(&removeToken) + bz, err := k.cdc.Marshal(&removeToken) if err != nil { return time.Time{}, err } @@ -116,14 +119,14 @@ func (keeper Keeper) AddParachainIBCInfoToRemoveList(ctx sdk.Context, nativeDeno // TODO: testing // IterateRemoveListInfo iterate all parachain token in remove list. -func (keeper Keeper) IterateRemoveListInfo(ctx sdk.Context, cb func(removeInfo types.RemoveParachainIBCTokenInfo) (stop bool)) { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) IterateRemoveListInfo(ctx sdk.Context, cb func(removeInfo types.RemoveParachainIBCTokenInfo) (stop bool)) { + store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.KeyParachainIBCTokenRemoveListByNativeDenom) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { var removeInfo types.RemoveParachainIBCTokenInfo - keeper.cdc.MustUnmarshal(iterator.Value(), &removeInfo) + k.cdc.MustUnmarshal(iterator.Value(), &removeInfo) if cb(removeInfo) { break } @@ -132,17 +135,17 @@ func (keeper Keeper) IterateRemoveListInfo(ctx sdk.Context, cb func(removeInfo t // TODO: testing // RemoveParachainIBCTokenInfo remove parachain token information from chain state. -func (keeper Keeper) RemoveParachainIBCInfo(ctx sdk.Context, nativeDenom string) error { - if !keeper.hasParachainIBCTokenInfo(ctx, nativeDenom) { +func (k Keeper) RemoveParachainIBCInfo(ctx sdk.Context, nativeDenom string) error { + if !k.hasParachainIBCTokenInfo(ctx, nativeDenom) { return types.NotRegisteredNativeDenom } // get the IBCdenom - tokenInfo := keeper.GetParachainIBCTokenInfoByNativeDenom(ctx, nativeDenom) + tokenInfo := k.GetParachainIBCTokenInfoByNativeDenom(ctx, nativeDenom) ibcDenom := tokenInfo.IbcDenom assetID := tokenInfo.AssetId - store := ctx.KVStore(keeper.storeKey) + store := ctx.KVStore(k.storeKey) store.Delete(types.GetKeyParachainIBCTokenInfoByNativeDenom(nativeDenom)) store.Delete(types.GetKeyParachainIBCTokenInfoByAssetID(assetID)) store.Delete(types.GetKeyNativeDenomAndIbcSecondaryIndex(ibcDenom)) @@ -150,18 +153,18 @@ func (keeper Keeper) RemoveParachainIBCInfo(ctx sdk.Context, nativeDenom string) return nil } -func (keeper Keeper) SetAllowRlyAddress(ctx sdk.Context, rlyAddress string) { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) SetAllowRlyAddress(ctx sdk.Context, rlyAddress string) { + store := ctx.KVStore(k.storeKey) store.Set(types.GetKeyByRlyAddress(rlyAddress), []byte{1}) } -func (keeper Keeper) DeleteAllowRlyAddress(ctx sdk.Context, rlyAddress string) { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) DeleteAllowRlyAddress(ctx sdk.Context, rlyAddress string) { + store := ctx.KVStore(k.storeKey) store.Delete(types.GetKeyByRlyAddress(rlyAddress)) } -func (keeper Keeper) HasAllowRlyAddress(ctx sdk.Context, rlyAddress string) bool { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) HasAllowRlyAddress(ctx sdk.Context, rlyAddress string) bool { + store := ctx.KVStore(k.storeKey) key := types.GetKeyByRlyAddress(rlyAddress) if store.Has(key) { @@ -176,8 +179,8 @@ func (keeper Keeper) HasAllowRlyAddress(ctx sdk.Context, rlyAddress string) bool return !iter.Valid() } -func (keeper Keeper) IterateAllowRlyAddress(ctx sdk.Context, cb func(rlyAddress string) (stop bool)) { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) IterateAllowRlyAddress(ctx sdk.Context, cb func(rlyAddress string) (stop bool)) { + store := ctx.KVStore(k.storeKey) prefixStore := prefix.NewStore(store, types.KeyRlyAddress) iterator := sdk.KVStorePrefixIterator(prefixStore, nil) @@ -190,15 +193,15 @@ func (keeper Keeper) IterateAllowRlyAddress(ctx sdk.Context, cb func(rlyAddress } } -func (keeper Keeper) HasParachainIBCTokenInfoByNativeDenom(ctx sdk.Context, nativeDenom string) bool { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) HasParachainIBCTokenInfoByNativeDenom(ctx sdk.Context, nativeDenom string) bool { + store := ctx.KVStore(k.storeKey) key := types.GetKeyParachainIBCTokenInfoByNativeDenom(nativeDenom) return store.Has(key) } -func (keeper Keeper) HasParachainIBCTokenInfoByAssetID(ctx sdk.Context, assetID string) bool { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) HasParachainIBCTokenInfoByAssetID(ctx sdk.Context, assetID string) bool { + store := ctx.KVStore(k.storeKey) key := types.GetKeyParachainIBCTokenInfoByAssetID(assetID) return store.Has(key) @@ -206,35 +209,35 @@ func (keeper Keeper) HasParachainIBCTokenInfoByAssetID(ctx sdk.Context, assetID // TODO: testing // GetParachainIBCTokenInfo add new information about parachain token to chain state. -func (keeper Keeper) GetParachainIBCTokenInfoByNativeDenom(ctx sdk.Context, nativeDenom string) (info types.ParachainIBCTokenInfo) { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) GetParachainIBCTokenInfoByNativeDenom(ctx sdk.Context, nativeDenom string) (info types.ParachainIBCTokenInfo) { + store := ctx.KVStore(k.storeKey) bz := store.Get(types.GetKeyParachainIBCTokenInfoByNativeDenom(nativeDenom)) - keeper.cdc.Unmarshal(bz, &info) + k.cdc.Unmarshal(bz, &info) // nolint:errcheck return info } -func (keeper Keeper) GetParachainIBCTokenInfoByAssetID(ctx sdk.Context, assetID string) (info types.ParachainIBCTokenInfo) { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) GetParachainIBCTokenInfoByAssetID(ctx sdk.Context, assetID string) (info types.ParachainIBCTokenInfo) { + store := ctx.KVStore(k.storeKey) bz := store.Get(types.GetKeyParachainIBCTokenInfoByAssetID(assetID)) - keeper.cdc.Unmarshal(bz, &info) + k.cdc.Unmarshal(bz, &info) // nolint:errcheck return info } -func (keeper Keeper) GetNativeDenomByIBCDenomSecondaryIndex(ctx sdk.Context, ibcDenom string) string { - store := ctx.KVStore(keeper.storeKey) +func (k Keeper) GetNativeDenomByIBCDenomSecondaryIndex(ctx sdk.Context, ibcDenom string) string { + store := ctx.KVStore(k.storeKey) bz := store.Get(types.GetKeyNativeDenomAndIbcSecondaryIndex(ibcDenom)) return string(bz) } -func (keeper Keeper) GetTotalEscrowedToken(ctx sdk.Context) (coins sdk.Coins) { - keeper.IterateParaTokenInfos(ctx, func(index int64, info types.ParachainIBCTokenInfo) (stop bool) { - escrowIbcCoin := keeper.bankKeeper.GetBalance(ctx, transfertypes.GetEscrowAddress(transfertypes.PortID, info.ChannelID), info.IbcDenom) - escrowNativeCoin := keeper.bankKeeper.GetBalance(ctx, transfertypes.GetEscrowAddress(transfertypes.PortID, info.ChannelID), info.NativeDenom) +func (k Keeper) GetTotalEscrowedToken(ctx sdk.Context) (coins sdk.Coins) { + k.IterateParaTokenInfos(ctx, func(index int64, info types.ParachainIBCTokenInfo) (stop bool) { + escrowIbcCoin := k.bankKeeper.GetBalance(ctx, transfertypes.GetEscrowAddress(transfertypes.PortID, info.ChannelID), info.IbcDenom) + escrowNativeCoin := k.bankKeeper.GetBalance(ctx, transfertypes.GetEscrowAddress(transfertypes.PortID, info.ChannelID), info.NativeDenom) coins = append(coins, escrowIbcCoin, escrowNativeCoin) return false }) @@ -242,6 +245,6 @@ func (keeper Keeper) GetTotalEscrowedToken(ctx sdk.Context) (coins sdk.Coins) { return coins } -func (keeper Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+exported.ModuleName+"-"+types.ModuleName) } diff --git a/x/transfermiddleware/keeper/msg_server.go b/x/transfermiddleware/keeper/msg_server.go index 9e303e4d7..2827ca1e6 100644 --- a/x/transfermiddleware/keeper/msg_server.go +++ b/x/transfermiddleware/keeper/msg_server.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/notional-labs/composable/v6/x/transfermiddleware/types" diff --git a/x/transfermiddleware/keeper/relay.go b/x/transfermiddleware/keeper/relay.go index 35cf2ed90..c36d61740 100644 --- a/x/transfermiddleware/keeper/relay.go +++ b/x/transfermiddleware/keeper/relay.go @@ -2,7 +2,9 @@ package keeper import ( errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" diff --git a/x/transfermiddleware/module.go b/x/transfermiddleware/module.go index 1f64a2b79..725041e51 100644 --- a/x/transfermiddleware/module.go +++ b/x/transfermiddleware/module.go @@ -5,16 +5,18 @@ import ( "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" + + abci "github.com/cometbft/cometbft/abci/types" "github.com/notional-labs/composable/v6/x/transfermiddleware/client/cli" "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" @@ -129,7 +131,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { } // EndBlock implements the AppModule interface -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -144,9 +146,9 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RegisterStoreDecoder registers a decoder for router module's types -func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} +func (AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} // WeightedOperations returns the all the router module operations with their respective weights. -func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { +func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil } diff --git a/x/transfermiddleware/pfm_test.go b/x/transfermiddleware/pfm_test.go index ce9eb675d..afcf1e469 100644 --- a/x/transfermiddleware/pfm_test.go +++ b/x/transfermiddleware/pfm_test.go @@ -6,12 +6,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/ed25519" - sdk "github.com/cosmos/cosmos-sdk/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - "github.com/stretchr/testify/suite" customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) diff --git a/x/transfermiddleware/relay_test.go b/x/transfermiddleware/relay_test.go index fdb27f02f..a1fed0881 100644 --- a/x/transfermiddleware/relay_test.go +++ b/x/transfermiddleware/relay_test.go @@ -5,10 +5,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + sdk "github.com/cosmos/cosmos-sdk/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - "github.com/stretchr/testify/suite" customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) diff --git a/x/transfermiddleware/types/codec.go b/x/transfermiddleware/types/codec.go index 523049256..4f99a7891 100644 --- a/x/transfermiddleware/types/codec.go +++ b/x/transfermiddleware/types/codec.go @@ -5,12 +5,11 @@ import ( "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" groupcodec "github.com/cosmos/cosmos-sdk/x/group/codec" - - sdk "github.com/cosmos/cosmos-sdk/types" ) // RegisterLegacyAminoCodec registers the account interfaces and concrete types on the diff --git a/x/transfermiddleware/types/events.go b/x/transfermiddleware/types/events.go index 61938b986..6d16e4720 100644 --- a/x/transfermiddleware/types/events.go +++ b/x/transfermiddleware/types/events.go @@ -4,7 +4,7 @@ package types const ( EventAddParachainIBCTokenInfo = "add-parachain-token-info" // #nosec G101 EventRemoveParachainIBCTokenInfo = "remove-parachain-token-info" // #nosec G101 - EventAddRlyToAllowList = "add-rly-to-allow-list" //#nosec G101 + EventAddRlyToAllowList = "add-rly-to-allow-list" // #nosec G101 AttributeKeyNativeDenom = "native-denom" AttributeKeyIbcDenom = "ibc-denom" diff --git a/x/transfermiddleware/types/excepted_keepers.go b/x/transfermiddleware/types/excepted_keepers.go index 098de2df4..4016ce87b 100644 --- a/x/transfermiddleware/types/excepted_keepers.go +++ b/x/transfermiddleware/types/excepted_keepers.go @@ -1,10 +1,12 @@ package types import ( - context "context" + "context" - tmbytes "github.com/cometbft/cometbft/libs/bytes" sdk "github.com/cosmos/cosmos-sdk/types" + + tmbytes "github.com/cometbft/cometbft/libs/bytes" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ) diff --git a/x/transfermiddleware/types/genesis.go b/x/transfermiddleware/types/genesis.go index d33a1a2f8..fbbe80601 100644 --- a/x/transfermiddleware/types/genesis.go +++ b/x/transfermiddleware/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - fmt "fmt" + "fmt" ) // DefaultGenesisState returns a GenesisState with "transfer" as the default PortID. diff --git a/x/transfermiddleware/types/info.go b/x/transfermiddleware/types/info.go index 38fa4b802..fbaf167ff 100644 --- a/x/transfermiddleware/types/info.go +++ b/x/transfermiddleware/types/info.go @@ -1,7 +1,7 @@ package types import ( - fmt "fmt" + "fmt" "strconv" ) diff --git a/x/transfermiddleware/types/msg.go b/x/transfermiddleware/types/msg.go index 9ad3ee9a5..ab4d283da 100644 --- a/x/transfermiddleware/types/msg.go +++ b/x/transfermiddleware/types/msg.go @@ -2,7 +2,9 @@ package types import ( sdkerrors "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" ) @@ -32,10 +34,10 @@ func NewMsgAddParachainIBCTokenInfo( } // Route Implements Msg. -func (msg MsgAddParachainIBCTokenInfo) Route() string { return RouterKey } +func (MsgAddParachainIBCTokenInfo) Route() string { return RouterKey } // Type Implements Msg. -func (msg MsgAddParachainIBCTokenInfo) Type() string { return TypeMsgAddParachainIBCTokenInfo } +func (MsgAddParachainIBCTokenInfo) Type() string { return TypeMsgAddParachainIBCTokenInfo } // GetSignBytes implements the LegacyMsg interface. func (msg MsgAddParachainIBCTokenInfo) GetSignBytes() []byte { @@ -82,10 +84,10 @@ func NewMsgRemoveParachainIBCTokenInfo( } // Route Implements Msg. -func (msg MsgRemoveParachainIBCTokenInfo) Route() string { return RouterKey } +func (MsgRemoveParachainIBCTokenInfo) Route() string { return RouterKey } // Type Implements Msg. -func (msg MsgRemoveParachainIBCTokenInfo) Type() string { return TypeMsgRemoveParachainIBCTokenInfo } +func (MsgRemoveParachainIBCTokenInfo) Type() string { return TypeMsgRemoveParachainIBCTokenInfo } // GetSignBytes implements the LegacyMsg interface. func (msg MsgRemoveParachainIBCTokenInfo) GetSignBytes() []byte { @@ -120,10 +122,10 @@ func NewMsgAddRlyAddress( } // Route Implements Msg. -func (msg MsgAddRlyAddress) Route() string { return RouterKey } +func (MsgAddRlyAddress) Route() string { return RouterKey } // Type Implements Msg. -func (msg MsgAddRlyAddress) Type() string { return TypeMsgAddRlyAddress } +func (MsgAddRlyAddress) Type() string { return TypeMsgAddRlyAddress } // GetSignBytes implements the LegacyMsg interface. func (msg MsgAddRlyAddress) GetSignBytes() []byte { diff --git a/x/transfermiddleware/types/params.go b/x/transfermiddleware/types/params.go index 5b252f053..7ba51b649 100644 --- a/x/transfermiddleware/types/params.go +++ b/x/transfermiddleware/types/params.go @@ -1,7 +1,7 @@ package types import ( - fmt "fmt" + "fmt" "time" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" diff --git a/x/tx-boundary/keeper/genensis.go b/x/tx-boundary/keeper/genensis.go index 04d89ebe0..4168ad623 100644 --- a/x/tx-boundary/keeper/genensis.go +++ b/x/tx-boundary/keeper/genensis.go @@ -9,16 +9,16 @@ import ( // InitGenesis initializes the capability module's state from a provided genesis // state. func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { - k.SetDelegateBoundary(ctx, genState.DelegateBoundary) - k.SetRedelegateBoundary(ctx, genState.RedelegateBoundary) + k.SetDelegateBoundary(ctx, genState.DelegateBoundary) // nolint:errcheck + k.SetRedelegateBoundary(ctx, genState.RedelegateBoundary) // nolint:errcheck } // ExportGenesis returns the capability module's exported genesis. func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { genesis := types.DefaultGenesisState() - genesis.DelegateBoundary = k.GetDelegateBoundary(ctx) - genesis.RedelegateBoundary = k.GetRedelegateBoundary(ctx) + genesis.DelegateBoundary = k.GetDelegateBoundary(ctx) // nolint:errcheck + genesis.RedelegateBoundary = k.GetRedelegateBoundary(ctx) // nolint:errcheck return genesis } diff --git a/x/tx-boundary/keeper/grpc_query.go b/x/tx-boundary/keeper/grpc_query.go index 3bd29b7ee..ea662cf28 100644 --- a/x/tx-boundary/keeper/grpc_query.go +++ b/x/tx-boundary/keeper/grpc_query.go @@ -4,6 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) diff --git a/x/tx-boundary/keeper/keeper.go b/x/tx-boundary/keeper/keeper.go index 145c62807..0fbebf7d7 100644 --- a/x/tx-boundary/keeper/keeper.go +++ b/x/tx-boundary/keeper/keeper.go @@ -3,12 +3,12 @@ package keeper import ( "fmt" - "github.com/cometbft/cometbft/libs/log" - "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cometbft/cometbft/libs/log" + "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) @@ -37,7 +37,7 @@ func (k Keeper) GetAuthority() string { } // Logger returns logger -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } @@ -61,7 +61,7 @@ func (k Keeper) GetDelegateBoundary(ctx sdk.Context) (boundary types.Boundary) { } k.cdc.MustUnmarshal(bz, &boundary) - return + return boundary } // SetRedelegateBoundary sets the delegate boundary. @@ -84,7 +84,7 @@ func (k Keeper) GetRedelegateBoundary(ctx sdk.Context) (boundary types.Boundary) } k.cdc.MustUnmarshal(bz, &boundary) - return + return boundary } // SetDelegateCount set the number of delegate tx for a given address @@ -140,7 +140,7 @@ func (k Keeper) GetLimitPerAddr(ctx sdk.Context, addr sdk.AccAddress) (limitPerA } bz := store.Get(addr) k.cdc.MustUnmarshal(bz, &limitPerAddr) - return + return limitPerAddr } func (k Keeper) UpdateLimitPerAddr(ctx sdk.Context, addr sdk.AccAddress) { diff --git a/x/tx-boundary/keeper/keeper_test.go b/x/tx-boundary/keeper/keeper_test.go index 660ee6303..30ba48bcb 100644 --- a/x/tx-boundary/keeper/keeper_test.go +++ b/x/tx-boundary/keeper/keeper_test.go @@ -4,10 +4,12 @@ import ( "testing" "time" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" + sdk "github.com/cosmos/cosmos-sdk/types" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/notional-labs/composable/v6/app" "github.com/notional-labs/composable/v6/app/helpers" "github.com/notional-labs/composable/v6/x/tx-boundary/types" @@ -21,9 +23,9 @@ type KeeperTestSuite struct { app *app.ComposableApp } -func (suite *KeeperTestSuite) SetupTest() { - suite.app = helpers.SetupComposableAppWithValSet(suite.T()) - suite.ctx = suite.app.BaseApp.NewContext(false, tmproto.Header{Height: 1, ChainID: "centauri-1", Time: time.Now().UTC()}) +func (s *KeeperTestSuite) SetupTest() { + s.app = helpers.SetupComposableAppWithValSet(s.T()) + s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{Height: 1, ChainID: "centauri-1", Time: time.Now().UTC()}) } func TestKeeperTestSuite(t *testing.T) { @@ -45,7 +47,7 @@ var ( } ) -func (suite *KeeperTestSuite) TestSetDelegateBoundary() { +func (s *KeeperTestSuite) TestSetDelegateBoundary() { for _, tc := range []struct { desc string expectedBoundary types.Boundary @@ -57,7 +59,7 @@ func (suite *KeeperTestSuite) TestSetDelegateBoundary() { desc: "Case success", expectedBoundary: newBoundary, malleate: func() error { - return suite.app.TxBoundaryKeepper.SetDelegateBoundary(suite.ctx, newBoundary) + return s.app.TxBoundaryKeepper.SetDelegateBoundary(s.ctx, newBoundary) }, shouldErr: false, }, @@ -65,7 +67,7 @@ func (suite *KeeperTestSuite) TestSetDelegateBoundary() { desc: "Case fail", expectedBoundary: failBoundary, malleate: func() error { - return suite.app.TxBoundaryKeepper.SetDelegateBoundary(suite.ctx, failBoundary) + return s.app.TxBoundaryKeepper.SetDelegateBoundary(s.ctx, failBoundary) }, shouldErr: true, expectedErr: "BlocksPerGeneration must not be zero", @@ -80,21 +82,21 @@ func (suite *KeeperTestSuite) TestSetDelegateBoundary() { }, } { tc := tc - suite.Run(tc.desc, func() { - suite.SetupTest() + s.Run(tc.desc, func() { + s.SetupTest() err := tc.malleate() if !tc.shouldErr { - res := suite.app.TxBoundaryKeepper.GetDelegateBoundary(suite.ctx) - suite.Equal(res, tc.expectedBoundary) + res := s.app.TxBoundaryKeepper.GetDelegateBoundary(s.ctx) + s.Equal(res, tc.expectedBoundary) } else { - suite.Equal(err.Error(), tc.expectedErr) + s.Equal(err.Error(), tc.expectedErr) } }) } } -func (suite *KeeperTestSuite) TestSetRedelegateBoundary() { - suite.app.TxBoundaryKeepper.SetRedelegateBoundary(suite.ctx, types.Boundary{ +func (s *KeeperTestSuite) TestSetRedelegateBoundary() { + s.app.TxBoundaryKeepper.SetRedelegateBoundary(s.ctx, types.Boundary{ //nolint:errcheck TxLimit: 10, BlocksPerGeneration: 5, }) @@ -110,7 +112,7 @@ func (suite *KeeperTestSuite) TestSetRedelegateBoundary() { desc: "Case success", expectedBoundary: newBoundary, malleate: func() error { - return suite.app.TxBoundaryKeepper.SetRedelegateBoundary(suite.ctx, newBoundary) + return s.app.TxBoundaryKeepper.SetRedelegateBoundary(s.ctx, newBoundary) }, shouldErr: false, }, @@ -118,7 +120,7 @@ func (suite *KeeperTestSuite) TestSetRedelegateBoundary() { desc: "Success", expectedBoundary: failBoundary, malleate: func() error { - return suite.app.TxBoundaryKeepper.SetRedelegateBoundary(suite.ctx, failBoundary) + return s.app.TxBoundaryKeepper.SetRedelegateBoundary(s.ctx, failBoundary) }, shouldErr: true, expectedErr: "BlocksPerGeneration must not be zero", @@ -133,14 +135,14 @@ func (suite *KeeperTestSuite) TestSetRedelegateBoundary() { }, } { tc := tc - suite.Run(tc.desc, func() { - suite.SetupTest() + s.Run(tc.desc, func() { + s.SetupTest() err := tc.malleate() if !tc.shouldErr { - res := suite.app.TxBoundaryKeepper.GetRedelegateBoundary(suite.ctx) - suite.Equal(res, tc.expectedBoundary) + res := s.app.TxBoundaryKeepper.GetRedelegateBoundary(s.ctx) + s.Equal(res, tc.expectedBoundary) } else { - suite.Equal(err.Error(), tc.expectedErr) + s.Equal(err.Error(), tc.expectedErr) } }) } diff --git a/x/tx-boundary/module.go b/x/tx-boundary/module.go index ed712c2fe..9383381cf 100644 --- a/x/tx-boundary/module.go +++ b/x/tx-boundary/module.go @@ -1,11 +1,10 @@ -package tx_boundary +package txboundary import ( "context" "encoding/json" "fmt" - abci "github.com/cometbft/cometbft/abci/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -15,6 +14,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + + abci "github.com/cometbft/cometbft/abci/types" + "github.com/notional-labs/composable/v6/x/tx-boundary/keeper" "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) @@ -46,7 +48,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the module interface -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { +func (AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } @@ -105,11 +107,11 @@ func (AppModule) Name() string { } // RegisterInvariants registers the tx-boundary module invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} +func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // RegisterServices registers a gRPC query service to respond to the // module-specific gRPC queries. -func (am AppModule) RegisterServices(_ module.Configurator) { +func (AppModule) RegisterServices(_ module.Configurator) { // types.RegisterQueryServer(cfg.QueryServer(), am.keeper) // types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) } @@ -135,7 +137,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock returns the begin blocker for the tx-boundary module. -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} +func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} // ProposalContents doesn't return any content functions for governance proposals. func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { diff --git a/x/tx-boundary/types/genesis.go b/x/tx-boundary/types/genesis.go index f690a7c9d..b7b822706 100644 --- a/x/tx-boundary/types/genesis.go +++ b/x/tx-boundary/types/genesis.go @@ -1,6 +1,6 @@ package types -import fmt "fmt" +import "fmt" var ( DefaultDelegateBoundary = Boundary{ diff --git a/x/tx-boundary/types/msg.go b/x/tx-boundary/types/msg.go index e927b957f..2d50886a2 100644 --- a/x/tx-boundary/types/msg.go +++ b/x/tx-boundary/types/msg.go @@ -2,6 +2,7 @@ package types import ( errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec/legacy" sdk "github.com/cosmos/cosmos-sdk/types" )