diff --git a/.github/workflows/push_docker_images.yml b/.github/workflows/push_docker_images.yml index cb695f4bf..14f55a558 100644 --- a/.github/workflows/push_docker_images.yml +++ b/.github/workflows/push_docker_images.yml @@ -2,10 +2,9 @@ # # On every new `vX.Y.Z` tag the following images are pushed: # -# notional-labs/centauri:X.Y.Z # is pushed -# notional-labs/centauri:X.Y # is updated to X.Y.Z -# notional-labs/centauri:X # is updated to X.Y.Z -# notional-labs/centauri:latest # is updated to X.Y.Z +# ghcr.io/composablefi/composable-cosmos:X.Y.Z # is pushed +# ghcr.io/composablefi/composable-cosmos:X.Y # is updated to X.Y.Z +# ghcr.io/composablefi/composable-cosmos:X # is updated to X.Y.Z # # All the images above have support for linux/amd64 and linux/arm64. # @@ -29,14 +28,11 @@ jobs: feeapp-images: runs-on: ubuntu-latest steps: - - - name: Check out the repo + - name: Check out the repo uses: actions/checkout@v3 - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to GitHub Container Registry uses: docker/login-action@v3 @@ -44,8 +40,7 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - - name: Parse tag + - name: Parse tag id: tag run: | VERSION=$(echo ${{ github.ref_name }} | sed "s/v//") @@ -56,8 +51,7 @@ jobs: echo "MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_ENV echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_ENV echo "PATCH_VERSION=$PATCH_VERSION" >> $GITHUB_ENV - - - name: Build and push + - name: Build and push id: build_push_image uses: docker/build-push-action@v3 with: @@ -66,6 +60,6 @@ jobs: push: true platforms: linux/amd64,linux/arm64 tags: | - ghcr.io/notional-labs/centauri:${{ env.MAJOR_VERSION }} - ghcr.io/notional-labs/centauri:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }} - ghcr.io/notional-labs/centauri:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }} \ No newline at end of file + ghcr.io/composablefi/composable-cosmos:${{ env.MAJOR_VERSION }} + ghcr.io/composablefi/composable-cosmos:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }} + ghcr.io/composablefi/composable-cosmos:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }} diff --git a/Dockerfile b/Dockerfile index a1b94dfe8..db1742944 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,18 +51,32 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ -trimpath \ -o /centauri/build/centaurid \ - /centauri/cmd/centaurid/main.go + /centauri/cmd/centaurid + # -------------------------------------------------------- -# Runner +# toolkit # -------------------------------------------------------- +FROM busybox:1.35.0-uclibc as busybox +RUN addgroup --gid 1025 -S composable && adduser --uid 1025 -S composable -G composable + + +# -------------------------------------------------------- +# Runner +# -------------------------------------------------------- FROM ${RUNNER_IMAGE} +COPY --from=busybox:1.35.0-uclibc /bin/sh /bin/sh + COPY --from=builder /centauri/build/centaurid /bin/centaurid -ENV HOME /centauri -WORKDIR $HOME +# Install composable user +COPY --from=busybox /etc/passwd /etc/passwd +COPY --from=busybox --chown=1025:1025 /home/composable /home/composable + +WORKDIR /home/composable +USER composable # rest server EXPOSE 1317 @@ -72,4 +86,5 @@ EXPOSE 26656 EXPOSE 26657 # grpc EXPOSE 9090 + ENTRYPOINT ["centaurid"] \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index c0838bdeb..48d8bdff1 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -46,7 +46,7 @@ RUN GOWORK=off go build \ -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ -trimpath \ -o /centauri/build/centaurid \ - /centauri/cmd/centaurid/main.go + /centauri/cmd/centaurid # -------------------------------------------------------- # Runner diff --git a/Makefile b/Makefile index 0cecb6827..7c5753588 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') DOCKER := $(shell which docker) DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8 BUILDDIR ?= $(CURDIR)/build -HTTPS_GIT := https://github.com/notional-labs/composable-testnet/.git +HTTPS_GIT := https://github.com/notional-labs/composable-centauri.git export GO111MODULE = on @@ -140,7 +140,7 @@ ictest-validator: # Executes start chain tests via interchaintest ictest-start-polkadot: - cd tests/interchaintest && go test -timeout=25m -race -v -run TestPolkadotComposableChainStart . + cd tests/interchaintest && go test -timeout=25m -race -v -run TestPolkadotcentauriChainStart . # Executes IBC tests via interchaintest ictest-ibc: diff --git a/app/ante/ante.go b/app/ante/ante.go index 65e8e47de..747a0f0c6 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -9,32 +9,33 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ante "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/signing" - - tfmwKeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" - txBoundaryAnte "github.com/notional-labs/centauri/v5/x/tx-boundary/ante" - txBoundaryKeeper "github.com/notional-labs/centauri/v5/x/tx-boundary/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) // Link to default ante handler used by cosmos sdk: // https://github.com/cosmos/cosmos-sdk/blob/v0.43.0/x/auth/ante/ante.go#L41 func NewAnteHandler( - _ servertypes.AppOptions, + options servertypes.AppOptions, ak ante.AccountKeeper, + bk authtypes.BankKeeper, + feegrantKeeper ante.FeegrantKeeper, + txFeeChecker ante.TxFeeChecker, sigGasConsumer ante.SignatureVerificationGasConsumer, signModeHandler signing.SignModeHandler, channelKeeper *ibckeeper.Keeper, tfmwKeeper tfmwKeeper.Keeper, - txBoundaryKeeper txBoundaryKeeper.Keeper, codec codec.BinaryCodec, ) sdk.AnteHandler { return sdk.ChainAnteDecorators( ante.NewSetUpContextDecorator(), // // outermost AnteDecorator. SetUpContext must be called first ante.NewValidateBasicDecorator(), + ante.NewConsumeGasForTxSizeDecorator(ak), + ante.NewDeductFeeDecorator(ak, bk, feegrantKeeper, txFeeChecker), ante.NewTxTimeoutHeightDecorator(), ante.NewValidateMemoDecorator(ak), ante.NewConsumeGasForTxSizeDecorator(ak), NewIBCPermissionDecorator(codec, tfmwKeeper), - txBoundaryAnte.NewStakingPermissionDecorator(codec, txBoundaryKeeper), ante.NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewValidateSigCountDecorator(ak), ante.NewSigGasConsumeDecorator(ak, sigGasConsumer), diff --git a/app/ante/ibc_ante.go b/app/ante/ibc_ante.go index 15642a58f..bab820df4 100644 --- a/app/ante/ibc_ante.go +++ b/app/ante/ibc_ante.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - tfmwKeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" + tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) type IBCPermissionDecorator struct { diff --git a/app/app.go b/app/app.go index 2e06ecf03..37e064616 100644 --- a/app/app.go +++ b/app/app.go @@ -10,9 +10,12 @@ import ( 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/cosmos/cosmos-sdk/baseapp" @@ -32,11 +35,15 @@ import ( vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/bank" - "github.com/notional-labs/centauri/v5/app/keepers" - v4 "github.com/notional-labs/centauri/v5/app/upgrades/v4" - v5 "github.com/notional-labs/centauri/v5/app/upgrades/v5" + "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" + + authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" 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" @@ -86,43 +93,36 @@ import ( icq "github.com/strangelove-ventures/async-icq/v7" icqtypes "github.com/strangelove-ventures/async-icq/v7/types" - "github.com/strangelove-ventures/packet-forward-middleware/v7/router" - routertypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types" - alliancemodule "github.com/terra-money/alliance/x/alliance" - alliancemoduleclient "github.com/terra-money/alliance/x/alliance/client" - alliancemoduletypes "github.com/terra-money/alliance/x/alliance/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/centauri/v5/custom/bank" + custombankmodule "github.com/notional-labs/composable/v6/custom/bank" - "github.com/notional-labs/centauri/v5/app/ante" - transfermiddleware "github.com/notional-labs/centauri/v5/x/transfermiddleware" - transfermiddlewaretypes "github.com/notional-labs/centauri/v5/x/transfermiddleware/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/centauri/v5/x/tx-boundary" - txBoundaryTypes "github.com/notional-labs/centauri/v5/x/tx-boundary/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/centauri/v5/x/ratelimit" - ratelimitmoduletypes "github.com/notional-labs/centauri/v5/x/ratelimit/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/centauri/v5/x/mint" - minttypes "github.com/notional-labs/centauri/v5/x/mint/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/centauri/v5/x/ibc-hooks" - ibchookstypes "github.com/notional-labs/centauri/v5/x/ibc-hooks/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" - v4_5 "github.com/notional-labs/centauri/v5/app/upgrades/v4_5" - v4_5_1 "github.com/notional-labs/centauri/v5/app/upgrades/v4_5_1" - v5_1_0 "github.com/notional-labs/centauri/v5/app/upgrades/v5_1_0" - - upgrades "github.com/notional-labs/centauri/v5/app/upgrades" + upgrades "github.com/notional-labs/composable/v6/app/upgrades" ) const ( @@ -140,8 +140,8 @@ var ( // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 EnableSpecificProposals = "" - Upgrades = []upgrades.Upgrade{v4.Upgrade, v5.Upgrade} - Forks = []upgrades.Fork{v4_5.Fork, v4_5_1.Fork, v5_1_0.Fork} + Upgrades = []upgrades.Upgrade{v4.Upgrade, v5.Upgrade, v6.Upgrade} + Forks = []upgrades.Fork{} ) // GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to @@ -173,9 +173,6 @@ func getGovProposalHandlers() []govclient.ProposalHandler { upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, - alliancemoduleclient.CreateAllianceProposalHandler, - alliancemoduleclient.UpdateAllianceProposalHandler, - alliancemoduleclient.DeleteAllianceProposalHandler, // this line is used by starport scaffolding # stargate/app/govProposalHandler ) @@ -200,6 +197,7 @@ var ( params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, + authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, groupmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, @@ -219,7 +217,6 @@ var ( txBoundary.AppModuleBasic{}, ratelimitmodule.AppModuleBasic{}, consensus.AppModuleBasic{}, - alliancemodule.AppModuleBasic{}, // this line is used by starport scaffolding # stargate/app/moduleBasic ) @@ -228,20 +225,18 @@ var ( authtypes.FeeCollectorName: nil, distrtypes.ModuleName: nil, // mint module needs burn access to remove excess validator tokens (it overallocates, then burns) - minttypes.ModuleName: {authtypes.Minter}, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - transfermiddlewaretypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - alliancemoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - alliancemoduletypes.RewardsPoolName: nil, - icatypes.ModuleName: nil, + minttypes.ModuleName: {authtypes.Minter}, + stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, + stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, + govtypes.ModuleName: {authtypes.Burner}, + transfermiddlewaretypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + icatypes.ModuleName: nil, // this line is used by starport scaffolding # stargate/app/maccPerms } ) -var _ servertypes.Application = (*CentauriApp)(nil) +var _ servertypes.Application = (*ComposableApp)(nil) func init() { userHomeDir, err := os.UserHomeDir() @@ -254,10 +249,10 @@ func init() { sdk.DefaultPowerReduction = PowerReduction } -// CentauriApp extends an ABCI application, but with most of its parameters exported. +// ComposableApp extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object // capabilities aren't needed for testing. -type CentauriApp struct { +type ComposableApp struct { *baseapp.BaseApp keepers.AppKeepers @@ -274,7 +269,7 @@ type CentauriApp struct { // RUN GOSEC // New returns a reference to an initialized blockchain app -func NewCentauriApp( +func NewComposableApp( logger log.Logger, db dbm.DB, traceStore io.Writer, @@ -287,7 +282,7 @@ func NewCentauriApp( appOpts servertypes.AppOptions, wasmOpts []wasm.Option, baseAppOptions ...func(*baseapp.BaseApp), -) *CentauriApp { +) *ComposableApp { appCodec := encodingConfig.Marshaler cdc := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry @@ -297,7 +292,7 @@ func NewCentauriApp( bApp.SetInterfaceRegistry(interfaceRegistry) bApp.SetTxEncoder(encodingConfig.TxConfig.TxEncoder()) - app := &CentauriApp{ + app := &ComposableApp{ BaseApp: bApp, AppKeepers: keepers.AppKeepers{}, cdc: cdc, @@ -362,6 +357,7 @@ func NewCentauriApp( slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), + authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), upgrade.NewAppModule(app.UpgradeKeeper), evidence.NewAppModule(app.EvidenceKeeper), ibc.NewAppModule(app.IBCKeeper), @@ -377,7 +373,6 @@ func NewCentauriApp( txBoundaryModule, icaModule, ratelimitModule, - alliancemodule.NewAppModule(appCodec, app.AllianceKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), // this line is used by starport scaffolding # stargate/app/appModule ) @@ -407,6 +402,7 @@ func NewCentauriApp( govtypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, + authz.ModuleName, feegrant.ModuleName, group.ModuleName, paramstypes.ModuleName, @@ -414,7 +410,6 @@ func NewCentauriApp( wasm08types.ModuleName, icatypes.ModuleName, wasm.ModuleName, - alliancemoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/beginBlockers ) @@ -431,6 +426,7 @@ func NewCentauriApp( vestingtypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, + authz.ModuleName, feegrant.ModuleName, group.ModuleName, paramstypes.ModuleName, @@ -447,7 +443,6 @@ func NewCentauriApp( wasm08types.ModuleName, icatypes.ModuleName, wasm.ModuleName, - alliancemoduletypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -469,6 +464,7 @@ func NewCentauriApp( ibchost.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, + authz.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, ibctransfertypes.ModuleName, @@ -484,7 +480,6 @@ func NewCentauriApp( wasm08types.ModuleName, icatypes.ModuleName, wasm.ModuleName, - alliancemoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/initGenesis ) @@ -531,18 +526,29 @@ func NewCentauriApp( app.SetAnteHandler(ante.NewAnteHandler( appOpts, app.AccountKeeper, + app.BankKeeper, + app.FeeGrantKeeper, + nil, authante.DefaultSigVerificationGasConsumer, encodingConfig.TxConfig.SignModeHandler(), app.IBCKeeper, app.TransferMiddlewareKeeper, - app.TxBoundaryKeepper, appCodec, )) app.SetEndBlocker(app.EndBlocker) + app.SetPrepareProposal( + prepare.PrepareProposalHandler( + encodingConfig.TxConfig, + appCodec, + app.TxBoundaryKeepper, + ), + ) + if manager := app.SnapshotManager(); manager != nil { err := manager.RegisterExtensions( wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.WasmKeeper), + wasm08keeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.Wasm08Keeper), ) if err != nil { panic(fmt.Errorf("failed to register snapshot extension: %s", err)) @@ -559,50 +565,50 @@ func NewCentauriApp( } // Name returns the name of the App -func (app *CentauriApp) Name() string { return app.BaseApp.Name() } +func (app *ComposableApp) Name() string { return app.BaseApp.Name() } // GetBaseApp returns the base app of the application -func (app *CentauriApp) GetBaseApp() *baseapp.BaseApp { return app.BaseApp } +func (app *ComposableApp) GetBaseApp() *baseapp.BaseApp { return app.BaseApp } // GetStakingKeeper implements the TestingApp interface. -func (app *CentauriApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { +func (app *ComposableApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { return app.StakingKeeper } // GetIBCKeeper implements the TestingApp interface. -func (app *CentauriApp) GetTransferKeeper() *ibctransferkeeper.Keeper { +func (app *ComposableApp) GetTransferKeeper() *ibctransferkeeper.Keeper { return &app.TransferKeeper } // GetIBCKeeper implements the TestingApp interface. -func (app *CentauriApp) GetIBCKeeper() *ibckeeper.Keeper { +func (app *ComposableApp) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper } // GetScopedIBCKeeper implements the TestingApp interface. -func (app *CentauriApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { +func (app *ComposableApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { return app.ScopedIBCKeeper } // GetTxConfig implements the TestingApp interface. -func (app *CentauriApp) GetTxConfig() client.TxConfig { +func (app *ComposableApp) GetTxConfig() client.TxConfig { cfg := MakeEncodingConfig() return cfg.TxConfig } // BeginBlocker application updates every begin block -func (app *CentauriApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { +func (app *ComposableApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { BeginBlockForks(ctx, app) return app.mm.BeginBlock(ctx, req) } // EndBlocker application updates every end block -func (app *CentauriApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { +func (app *ComposableApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { return app.mm.EndBlock(ctx, req) } // InitChainer application update at chain initialization -func (app *CentauriApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { +func (app *ComposableApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { var genesisState GenesisState if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) @@ -612,12 +618,12 @@ func (app *CentauriApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) } // LoadHeight loads a particular height -func (app *CentauriApp) LoadHeight(height int64) error { +func (app *ComposableApp) LoadHeight(height int64) error { return app.LoadVersion(height) } // ModuleAccountAddrs returns all the app's module account addresses. -func (app *CentauriApp) ModuleAccountAddrs() map[string]bool { +func (app *ComposableApp) ModuleAccountAddrs() map[string]bool { modAccAddrs := make(map[string]bool) // DO NOT REMOVE: StringMapKeys fixes non-deterministic map iteration for acc := range maccPerms { @@ -631,7 +637,7 @@ func (app *CentauriApp) ModuleAccountAddrs() map[string]bool { // // NOTE: This is solely to be used for testing purposes as it may be desirable // for modules to register their own custom testing types. -func (app *CentauriApp) LegacyAmino() *codec.LegacyAmino { +func (app *ComposableApp) LegacyAmino() *codec.LegacyAmino { return app.cdc } @@ -639,18 +645,18 @@ func (app *CentauriApp) LegacyAmino() *codec.LegacyAmino { // // NOTE: This is solely to be used for testing purposes as it may be desirable // for modules to register their own custom testing types. -func (app *CentauriApp) AppCodec() codec.Codec { +func (app *ComposableApp) AppCodec() codec.Codec { return app.appCodec } // InterfaceRegistry returns an InterfaceRegistry -func (app *CentauriApp) InterfaceRegistry() types.InterfaceRegistry { +func (app *ComposableApp) InterfaceRegistry() types.InterfaceRegistry { return app.interfaceRegistry } // RegisterAPIRoutes registers all application module routes with the provided // API server. -func (app *CentauriApp) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig) { +func (app *ComposableApp) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig) { clientCtx := apiSvr.ClientCtx // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) @@ -663,17 +669,17 @@ func (app *CentauriApp) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig } // RegisterTxService implements the Application.RegisterTxService method. -func (app *CentauriApp) RegisterTxService(clientCtx client.Context) { +func (app *ComposableApp) RegisterTxService(clientCtx client.Context) { authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) } // RegisterTendermintService implements the Application.RegisterTendermintService method. -func (app *CentauriApp) RegisterTendermintService(clientCtx client.Context) { +func (app *ComposableApp) RegisterTendermintService(clientCtx client.Context) { tmservice.RegisterTendermintService(clientCtx, app.BaseApp.GRPCQueryRouter(), app.interfaceRegistry, app.Query) } // RegisterNodeService registers the node gRPC Query service. -func (app *CentauriApp) RegisterNodeService(clientCtx client.Context) { +func (app *ComposableApp) RegisterNodeService(clientCtx client.Context) { nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) } @@ -687,12 +693,12 @@ func GetMaccPerms() map[string][]string { } // SimulationManager implements the SimulationApp interface -func (app *CentauriApp) SimulationManager() *module.SimulationManager { +func (app *ComposableApp) SimulationManager() *module.SimulationManager { return app.sm } // configure store loader that checks if version == upgradeHeight and applies store upgrades -func (app *CentauriApp) setupUpgradeStoreLoaders() { +func (app *ComposableApp) setupUpgradeStoreLoaders() { upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() if err != nil { panic(fmt.Sprintf("failed to read upgrade info from disk %s", err)) @@ -716,13 +722,13 @@ func (app *CentauriApp) setupUpgradeStoreLoaders() { } } -func (app *CentauriApp) customPreUpgradeHandler(_ upgradetypes.Plan) { +func (app *ComposableApp) customPreUpgradeHandler(_ upgradetypes.Plan) { // switch upgradeInfo.Name { // default: // } } -func (app *CentauriApp) setupUpgradeHandlers() { +func (app *ComposableApp) setupUpgradeHandlers() { for _, upgrade := range Upgrades { app.UpgradeKeeper.SetUpgradeHandler( upgrade.UpgradeName, @@ -730,6 +736,7 @@ func (app *CentauriApp) setupUpgradeHandlers() { app.mm, app.configurator, app.BaseApp, + app.AppCodec(), &app.AppKeepers, ), ) diff --git a/app/coins.go b/app/coins.go index fd6807a96..ce91ace8a 100644 --- a/app/coins.go +++ b/app/coins.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" ) -// BaseDenomUnit defines the base denomination unit for Centauri. +// BaseDenomUnit defines the base denomination unit for Composable. // 1 pica = 1x10^{BaseDenomUnit} ppica var BaseDenomUnit = 12 diff --git a/app/export.go b/app/export.go index f7bcc245f..282f4ff5f 100644 --- a/app/export.go +++ b/app/export.go @@ -15,7 +15,7 @@ import ( // ExportAppStateAndValidators exports the state of the application for a genesis // file. -func (app *CentauriApp) ExportAppStateAndValidators( +func (app *ComposableApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block @@ -51,7 +51,7 @@ func (app *CentauriApp) ExportAppStateAndValidators( // NOTE zero height genesis is a temporary feature which will be deprecated // // in favour of export at a block height -func (app *CentauriApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { +func (app *ComposableApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { applyAllowedAddrs := false // check if there is a allowed address list diff --git a/app/fork.go b/app/fork.go index 551862c27..c2e0ec0ec 100644 --- a/app/fork.go +++ b/app/fork.go @@ -5,7 +5,7 @@ import ( ) // BeginBlockForks is intended to be ran in a chain upgrade. -func BeginBlockForks(ctx sdk.Context, app *CentauriApp) { +func BeginBlockForks(ctx sdk.Context, app *ComposableApp) { for _, fork := range Forks { if ctx.BlockHeight() == fork.UpgradeHeight { fork.BeginForkLogic(ctx, &app.AppKeepers) diff --git a/app/helpers/test_helpers.go b/app/helpers/test_helpers.go index bcaf04129..1646262fa 100644 --- a/app/helpers/test_helpers.go +++ b/app/helpers/test_helpers.go @@ -27,7 +27,7 @@ import ( "github.com/cosmos/ibc-go/v7/testing/mock" "github.com/stretchr/testify/require" - centauri "github.com/notional-labs/centauri/v5/app" + composable "github.com/notional-labs/composable/v6/app" ) // SimAppChainID hardcoded chainID for simulation @@ -58,7 +58,7 @@ type EmptyAppOptions struct{} func (EmptyAppOptions) Get(_ string) interface{} { return nil } -func NewContextForApp(app centauri.CentauriApp) sdk.Context { +func NewContextForApp(app composable.ComposableApp) sdk.Context { ctx := app.BaseApp.NewContext(false, tmproto.Header{ ChainID: fmt.Sprintf("test-chain-%s", tmrand.Str(4)), Height: 1, @@ -66,7 +66,7 @@ func NewContextForApp(app centauri.CentauriApp) sdk.Context { return ctx } -func Setup(t *testing.T, isCheckTx bool, invCheckPeriod uint) *centauri.CentauriApp { +func Setup(t *testing.T, isCheckTx bool, invCheckPeriod uint) *composable.ComposableApp { t.Helper() app, genesisState := setup(!isCheckTx, invCheckPeriod) if !isCheckTx { @@ -87,34 +87,34 @@ func Setup(t *testing.T, isCheckTx bool, invCheckPeriod uint) *centauri.Centauri return app } -func setup(withGenesis bool, invCheckPeriod uint, opts ...wasm.Option) (*centauri.CentauriApp, centauri.GenesisState) { +func setup(withGenesis bool, invCheckPeriod uint, opts ...wasm.Option) (*composable.ComposableApp, composable.GenesisState) { db := dbm.NewMemDB() - encCdc := centauri.MakeEncodingConfig() - app := centauri.NewCentauriApp( + encCdc := composable.MakeEncodingConfig() + app := composable.NewComposableApp( log.NewNopLogger(), db, nil, true, wasmtypes.EnableAllProposals, map[int64]bool{}, - centauri.DefaultNodeHome, + composable.DefaultNodeHome, invCheckPeriod, encCdc, EmptyAppOptions{}, opts, ) if withGenesis { - return app, centauri.NewDefaultGenesisState() + return app, composable.NewDefaultGenesisState() } - return app, centauri.GenesisState{} + return app, composable.GenesisState{} } -// SetupWithGenesisValSet initializes a new CentauriApp with a validator set and genesis accounts +// SetupWithGenesisValSet initializes a new ComposableApp with a validator set and genesis accounts // that also act as delegators. For simplicity, each validator is bonded with a delegation -// of one consensus engine unit (10^6) in the default token of the CentauriApp from first genesis -// account. A Nop logger is set in CentauriApp. -func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, balances ...banktypes.Balance) *centauri.CentauriApp { +// of one consensus engine unit (10^6) in the default token of the ComposableApp from first genesis +// account. A Nop logger is set in ComposableApp. +func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, balances ...banktypes.Balance) *composable.ComposableApp { t.Helper() app, genesisState := setup(true, 5) genesisState, err := simtestutil.GenesisStateWithValSet(app.AppCodec(), genesisState, valSet, genAccs, balances...) @@ -151,7 +151,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs return app } -func SetupCentauriAppWithValSet(t *testing.T) *centauri.CentauriApp { +func SetupComposableAppWithValSet(t *testing.T) *composable.ComposableApp { t.Helper() // generate validator private/public key privVal := mock.NewPV() @@ -173,11 +173,11 @@ func SetupCentauriAppWithValSet(t *testing.T) *centauri.CentauriApp { Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, amount)), } - centauriApp := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, "notional", balance) - return centauriApp + composableApp := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, "notional", balance) + return composableApp } -func SetupCentauriAppWithValSetWithGenAccout(t *testing.T) (*centauri.CentauriApp, sdk.AccAddress, []stakingtypes.Validator) { +func SetupComposableAppWithValSetWithGenAccout(t *testing.T) (*composable.ComposableApp, sdk.AccAddress, []stakingtypes.Validator) { t.Helper() // generate validator private/public key privVal := mock.NewPV() @@ -219,7 +219,7 @@ func SetupCentauriAppWithValSetWithGenAccout(t *testing.T) (*centauri.CentauriAp } validators = append(validators, validator) } - centauriApp := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, "notional", balance) + composableApp := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, "notional", balance) - return centauriApp, acc.GetAddress(), validators + return composableApp, acc.GetAddress(), validators } diff --git a/app/ibctesting/chain.go b/app/ibctesting/chain.go index 46795c96b..c2082b7b6 100644 --- a/app/ibctesting/chain.go +++ b/app/ibctesting/chain.go @@ -8,7 +8,7 @@ import ( "testing" "time" - ratelimitmodulekeeper "github.com/notional-labs/centauri/v5/x/ratelimit/keeper" + ratelimitmodulekeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" @@ -54,9 +54,9 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - centauri "github.com/notional-labs/centauri/v5/app" - "github.com/notional-labs/centauri/v5/app/ibctesting/simapp" - routerKeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" + 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" ) // TestChain is a testing struct that wraps a simapp with the last TM Header, the current ABCI @@ -125,7 +125,7 @@ func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain { Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, amount)), } - app := NewTestingAppDecorator(t, centauri.SetupWithGenesisValSet(t, coord.CurrentTime.UTC(), valSet, []authtypes.GenesisAccount{acc}, balance)) + app := NewTestingAppDecorator(t, composable.SetupWithGenesisValSet(t, coord.CurrentTime.UTC(), valSet, []authtypes.GenesisAccount{acc}, balance)) // create current header and call begin block header := tmproto.Header{ @@ -281,7 +281,7 @@ func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) { // ensure the chain has the latest time chain.Coordinator.UpdateTimeForChain(chain) - _, r, err := centauri.SignAndDeliver( + _, r, err := composable.SignAndDeliver( chain.t, chain.TxConfig, chain.App.GetBaseApp(), @@ -316,7 +316,7 @@ func (chain *TestChain) SendMsgsWithExpPass(expPass bool, msgs ...sdk.Msg) (*sdk // ensure the chain has the latest time chain.Coordinator.UpdateTimeForChain(chain) - _, r, err := centauri.SignAndDeliver( + _, r, err := composable.SignAndDeliver( chain.t, chain.TxConfig, chain.App.GetBaseApp(), @@ -635,7 +635,7 @@ func (chain *TestChain) GetBankKeeper() bankkeeper.Keeper { return chain.GetTestSupport().BankKeeper() } -func (chain TestChain) GetTestSupport() *centauri.TestSupport { +func (chain TestChain) GetTestSupport() *composable.TestSupport { return chain.App.(*TestingAppDecorator).TestSupport() } @@ -709,13 +709,13 @@ func submitLegacyProposal(t *testing.T, ctx sdk.Context, content v1beta1.Content var _ ibctesting.TestingApp = TestingAppDecorator{} type TestingAppDecorator struct { - *centauri.CentauriApp + *composable.ComposableApp t *testing.T } -func NewTestingAppDecorator(t *testing.T, centauri *centauri.CentauriApp) *TestingAppDecorator { +func NewTestingAppDecorator(t *testing.T, composable *composable.ComposableApp) *TestingAppDecorator { t.Helper() - return &TestingAppDecorator{CentauriApp: centauri, t: t} + return &TestingAppDecorator{ComposableApp: composable, t: t} } func (a TestingAppDecorator) GetBaseApp() *baseapp.BaseApp { @@ -750,8 +750,8 @@ func (a TestingAppDecorator) GetTxConfig() client.TxConfig { return a.TestSupport().GetTxConfig() } -func (a TestingAppDecorator) TestSupport() *centauri.TestSupport { - return centauri.NewTestSupport(a.t, a.CentauriApp) +func (a TestingAppDecorator) TestSupport() *composable.TestSupport { + return composable.NewTestSupport(a.t, a.ComposableApp) } func (a TestingAppDecorator) GetWasmdKeeper() wasm.Keeper { diff --git a/app/ibctesting/simapp/app.go b/app/ibctesting/simapp/app.go index bf55f3330..53a0e7165 100644 --- a/app/ibctesting/simapp/app.go +++ b/app/ibctesting/simapp/app.go @@ -90,9 +90,9 @@ import ( "github.com/gorilla/mux" // TODO: mint module not complete yet, - "github.com/notional-labs/centauri/v5/x/mint" - mintkeeper "github.com/notional-labs/centauri/v5/x/mint/keeper" - minttypes "github.com/notional-labs/centauri/v5/x/mint/types" + "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" @@ -124,13 +124,13 @@ import ( ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" - simappparams "github.com/notional-labs/centauri/v5/app/ibctesting/simapp/params" - simappupgrades "github.com/notional-labs/centauri/v5/app/ibctesting/simapp/upgrades" - v6 "github.com/notional-labs/centauri/v5/app/ibctesting/simapp/upgrades/v6" - v7 "github.com/notional-labs/centauri/v5/app/ibctesting/simapp/upgrades/v7" - transfermiddleware "github.com/notional-labs/centauri/v5/x/transfermiddleware" - transfermiddlewarekeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" - transfermiddlewaretypes "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + simappparams "github.com/notional-labs/composable/v6/app/ibctesting/simapp/params" + 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" + transfermiddlewarekeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" + transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) const appName = "SimApp" diff --git a/app/ibctesting/simapp/encoding.go b/app/ibctesting/simapp/encoding.go index 5fb6d8696..53ee98f0e 100644 --- a/app/ibctesting/simapp/encoding.go +++ b/app/ibctesting/simapp/encoding.go @@ -3,7 +3,7 @@ package simapp import ( "github.com/cosmos/cosmos-sdk/std" - simappparams "github.com/notional-labs/centauri/v5/app/ibctesting/simapp/params" + simappparams "github.com/notional-labs/composable/v6/app/ibctesting/simapp/params" ) // MakeTestEncodingConfig creates an EncodingConfig for testing. This function diff --git a/app/ibctesting/simapp/sim_test.go b/app/ibctesting/simapp/sim_test.go index 29d982f02..32d602b0c 100644 --- a/app/ibctesting/simapp/sim_test.go +++ b/app/ibctesting/simapp/sim_test.go @@ -30,7 +30,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - minttypes "github.com/notional-labs/centauri/v5/x/mint/types" + minttypes "github.com/notional-labs/composable/v6/x/mint/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index d342fc81e..b1a36db04 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -52,6 +52,7 @@ import ( 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" @@ -66,32 +67,28 @@ import ( icqkeeper "github.com/strangelove-ventures/async-icq/v7/keeper" icqtypes "github.com/strangelove-ventures/async-icq/v7/types" - custombankkeeper "github.com/notional-labs/centauri/v5/custom/bank/keeper" + custombankkeeper "github.com/notional-labs/composable/v6/custom/bank/keeper" - "github.com/strangelove-ventures/packet-forward-middleware/v7/router" - routerkeeper "github.com/strangelove-ventures/packet-forward-middleware/v7/router/keeper" - routertypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types" + 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" - alliancemodule "github.com/terra-money/alliance/x/alliance" - alliancemodulekeeper "github.com/terra-money/alliance/x/alliance/keeper" - alliancemoduletypes "github.com/terra-money/alliance/x/alliance/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" - transfermiddleware "github.com/notional-labs/centauri/v5/x/transfermiddleware" - transfermiddlewarekeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" - transfermiddlewaretypes "github.com/notional-labs/centauri/v5/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" - txBoundaryKeeper "github.com/notional-labs/centauri/v5/x/tx-boundary/keeper" - txBoundaryTypes "github.com/notional-labs/centauri/v5/x/tx-boundary/types" - - ratelimitmodule "github.com/notional-labs/centauri/v5/x/ratelimit" - ratelimitmodulekeeper "github.com/notional-labs/centauri/v5/x/ratelimit/keeper" - ratelimitmoduletypes "github.com/notional-labs/centauri/v5/x/ratelimit/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/centauri/v5/x/mint/keeper" - minttypes "github.com/notional-labs/centauri/v5/x/mint/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" @@ -99,14 +96,13 @@ import ( 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/centauri/v5/x/ibc-hooks" - ibchookskeeper "github.com/notional-labs/centauri/v5/x/ibc-hooks/keeper" - ibchookstypes "github.com/notional-labs/centauri/v5/x/ibc-hooks/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" ) const ( - AccountAddressPrefix = "centauri" - authorityAddress = "centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m" + AccountAddressPrefix = "composable" ) type AppKeepers struct { @@ -133,6 +129,7 @@ type AppKeepers struct { ICQKeeper icqkeeper.Keeper ICAHostKeeper icahostkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper + AuthzKeeper authzkeeper.Keeper GroupKeeper groupkeeper.Keeper Wasm08Keeper wasm08Keeper.Keeper // TODO: use this name ? WasmKeeper wasm.Keeper @@ -151,7 +148,6 @@ type AppKeepers struct { TxBoundaryKeepper txBoundaryKeeper.Keeper RouterKeeper *routerkeeper.Keeper RatelimitKeeper ratelimitmodulekeeper.Keeper - AllianceKeeper alliancemodulekeeper.Keeper } // InitNormalKeepers initializes all 'normal' keepers. @@ -175,6 +171,14 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.BankKeeper = custombankkeeper.NewBaseKeeper( appCodec, appKeepers.keys[banktypes.StoreKey], appKeepers.AccountKeeper, appKeepers.BlacklistedModuleAccountAddrs(maccPerms), &appKeepers.TransferMiddlewareKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + + appKeepers.AuthzKeeper = authzkeeper.NewKeeper( + appKeepers.keys[authzkeeper.StoreKey], + appCodec, + bApp.MsgServiceRouter(), + appKeepers.AccountKeeper, + ) + appKeepers.StakingKeeper = stakingkeeper.NewKeeper( appCodec, appKeepers.keys[stakingtypes.StoreKey], appKeepers.AccountKeeper, appKeepers.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) @@ -212,21 +216,11 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, appKeepers.keys[feegrant.StoreKey], appKeepers.AccountKeeper) appKeepers.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, appKeepers.keys[upgradetypes.StoreKey], appCodec, homePath, bApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) - appKeepers.AllianceKeeper = alliancemodulekeeper.NewKeeper( - appCodec, - appKeepers.keys[alliancemoduletypes.StoreKey], - appKeepers.GetSubspace(alliancemoduletypes.ModuleName), - appKeepers.AccountKeeper, - appKeepers.BankKeeper, - appKeepers.StakingKeeper, - appKeepers.DistrKeeper, - ) - - appKeepers.BankKeeper.RegisterKeepers(appKeepers.AllianceKeeper, appKeepers.StakingKeeper) + appKeepers.BankKeeper.RegisterKeepers(appKeepers.StakingKeeper) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks appKeepers.StakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(appKeepers.DistrKeeper.Hooks(), appKeepers.SlashingKeeper.Hooks(), appKeepers.AllianceKeeper.StakingHooks()), + stakingtypes.NewMultiStakingHooks(appKeepers.DistrKeeper.Hooks(), appKeepers.SlashingKeeper.Hooks()), ) // ... other modules keepers @@ -236,7 +230,9 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appCodec, appKeepers.keys[ibchost.StoreKey], appKeepers.GetSubspace(ibchost.ModuleName), appKeepers.StakingKeeper, appKeepers.UpgradeKeeper, appKeepers.ScopedIBCKeeper, ) - appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper(appCodec, appKeepers.keys[wasmtypes.StoreKey], authorityAddress, homePath) + govModuleAuthority := authtypes.NewModuleAddress(govtypes.ModuleName).String() + + appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper(appCodec, appKeepers.keys[wasmtypes.StoreKey], govModuleAuthority, homePath, &appKeepers.IBCKeeper.ClientKeeper) // ICA Host keeper appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper( @@ -259,8 +255,8 @@ func (appKeepers *AppKeepers) InitNormalKeepers( ) appKeepers.IBCHooksKeeper = &hooksKeeper - centauriPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() - wasmHooks := ibc_hooks.NewWasmHooks(&hooksKeeper, nil, centauriPrefix) // The contract keeper needs to be set later + composablePrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() + wasmHooks := ibc_hooks.NewWasmHooks(&hooksKeeper, nil, composablePrefix) // The contract keeper needs to be set later appKeepers.Ics20WasmHooks = &wasmHooks appKeepers.HooksICS4Wrapper = ibc_hooks.NewICS4Middleware( appKeepers.IBCKeeper.ChannelKeeper, @@ -274,13 +270,13 @@ func (appKeepers *AppKeepers) InitNormalKeepers( &appKeepers.RatelimitKeeper, &appKeepers.TransferKeeper, appKeepers.BankKeeper, - authorityAddress, + govModuleAuthority, ) appKeepers.TxBoundaryKeepper = txBoundaryKeeper.NewKeeper( appCodec, appKeepers.keys[txBoundaryTypes.StoreKey], - authorityAddress, + govModuleAuthority, ) appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper( @@ -388,8 +384,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(appKeepers.ParamsKeeper)). // AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(appKeepers.DistrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(appKeepers.UpgradeKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper)). - AddRoute(alliancemoduletypes.RouterKey, alliancemodule.NewAllianceProposalHandler(appKeepers.AllianceKeeper)) + AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper)) // The gov proposal types can be individually enabled if len(enabledProposals) != 0 { @@ -398,7 +393,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( govKeeper := *govkeeper.NewKeeper( appCodec, appKeepers.keys[govtypes.StoreKey], appKeepers.AccountKeeper, appKeepers.BankKeeper, - appKeepers.StakingKeeper, bApp.MsgServiceRouter(), govtypes.DefaultConfig(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), + appKeepers.StakingKeeper, bApp.MsgServiceRouter(), govtypes.DefaultConfig(), govModuleAuthority, ) govKeeper.SetLegacyRouter(govRouter) @@ -464,7 +459,6 @@ func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legac paramsKeeper.Subspace(icqtypes.ModuleName) paramsKeeper.Subspace(ibchost.ModuleName) paramsKeeper.Subspace(icahosttypes.SubModuleName) - paramsKeeper.Subspace(alliancemoduletypes.ModuleName) paramsKeeper.Subspace(wasm.ModuleName) paramsKeeper.Subspace(transfermiddlewaretypes.ModuleName) diff --git a/app/keepers/keys.go b/app/keepers/keys.go index ee2accf49..605a40955 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -3,8 +3,10 @@ package keepers import ( 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" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" @@ -24,19 +26,18 @@ import ( ibchost "github.com/cosmos/ibc-go/v7/modules/core/exported" icqtypes "github.com/strangelove-ventures/async-icq/v7/types" - routertypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types" - alliancemoduletypes "github.com/terra-money/alliance/x/alliance/types" + routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" - ibchookstypes "github.com/notional-labs/centauri/v5/x/ibc-hooks/types" - ratelimitmoduletypes "github.com/notional-labs/centauri/v5/x/ratelimit/types" - transfermiddlewaretypes "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" - txBoundaryTypes "github.com/notional-labs/centauri/v5/x/tx-boundary/types" + ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/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/centauri/v5/x/mint/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" @@ -50,7 +51,8 @@ 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, alliancemoduletypes.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, ) // Define transient store keys diff --git a/app/prepare/prepare.go b/app/prepare/prepare.go new file mode 100644 index 000000000..948921834 --- /dev/null +++ b/app/prepare/prepare.go @@ -0,0 +1,24 @@ +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" + txboundarykeeper "github.com/notional-labs/composable/v6/x/tx-boundary/keeper" +) + +func PrepareProposalHandler( + txConfig client.TxConfig, + cdc codec.BinaryCodec, + txboundaryKeeper txboundarykeeper.Keeper, +) sdk.PrepareProposalHandler { + return func(ctx sdk.Context, req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { + filterChangeValSetMsgs := FilterChangeValSetMsgs(ctx, cdc, txConfig.TxDecoder(), req.Txs) + if req.Height%5 == 0 { + return abci.ResponsePrepareProposal{Txs: req.Txs} + } + + return abci.ResponsePrepareProposal{Txs: filterChangeValSetMsgs} + } +} diff --git a/app/prepare/tx_filter.go b/app/prepare/tx_filter.go new file mode 100644 index 000000000..56b474e7d --- /dev/null +++ b/app/prepare/tx_filter.go @@ -0,0 +1,70 @@ +package prepare + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/authz" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +// FilterChangeValSetMsgs slpit list txs to 2 set : filteredTxs, changeValSetTxs +func FilterChangeValSetMsgs(ctx sdk.Context, cdc codec.BinaryCodec, decoder sdk.TxDecoder, txs [][]byte) [][]byte { + var filteredTxs [][]byte + for _, txBytes := range txs { + // Decode tx so we can read msgs. + tx, err := decoder(txBytes) + if err != nil { + ctx.Logger().Error(fmt.Sprintf("RemoveDisallowMsgs: failed to decode tx: %v", err)) + continue // continue to next tx. + } + + // For each msg in tx, check if it is disallowed. + containsChangeValsetMsg := false + for _, msg := range tx.GetMsgs() { + if isChangeValSetMsg(ctx, cdc, msg) { + containsChangeValsetMsg = true + break // break out of loop over msgs. + } + } + + // If tx contains disallowed msg, skip it. + if containsChangeValsetMsg { + ctx.Logger().Info("Found change valset msg") + continue // continue to next tx. + } + + // Otherwise, add tx to filtered txs. + filteredTxs = append(filteredTxs, txBytes) + } + + return filteredTxs +} + +func isChangeValSetMsg(ctx sdk.Context, cdc codec.BinaryCodec, msg sdk.Msg) bool { + switch msg := msg.(type) { + + case *stakingtypes.MsgDelegate: + return true + case *stakingtypes.MsgBeginRedelegate: + return true + case *authz.MsgExec: + return isChangeValSetAuthzMsg(ctx, cdc, msg) + default: + return false + } +} + +func isChangeValSetAuthzMsg(ctx sdk.Context, cdc codec.BinaryCodec, execMsg *authz.MsgExec) bool { + for _, v := range execMsg.Msgs { + var innerMsg sdk.Msg + if err := cdc.UnpackAny(v, &innerMsg); err != nil { + return false + } + if isChangeValSetMsg(ctx, cdc, innerMsg) { + return true + } + } + return false +} diff --git a/app/test_access.go b/app/test_access.go index b7ba6dcc3..78a65b7d2 100644 --- a/app/test_access.go +++ b/app/test_access.go @@ -16,16 +16,16 @@ import ( 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/centauri/v5/x/ratelimit/keeper" - tfmdKeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" + ratelimitkeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" + tfmdKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) type TestSupport struct { tb testing.TB - app *CentauriApp + app *ComposableApp } -func NewTestSupport(tb testing.TB, app *CentauriApp) *TestSupport { +func NewTestSupport(tb testing.TB, app *ComposableApp) *TestSupport { tb.Helper() return &TestSupport{tb: tb, app: app} } diff --git a/app/test_helpers.go b/app/test_helpers.go index 1e4521a00..97f5df118 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -36,7 +36,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - minttypes "github.com/notional-labs/centauri/v5/x/mint/types" + minttypes "github.com/notional-labs/composable/v6/x/mint/types" "github.com/CosmWasm/wasmd/x/wasm" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" @@ -61,7 +61,7 @@ var DefaultConsensusParams = &tmproto.ConsensusParams{ }, } -func setup(tb testing.TB, withGenesis bool, invCheckPeriod uint) (*CentauriApp, GenesisState) { +func setup(tb testing.TB, withGenesis bool, invCheckPeriod uint) (*ComposableApp, GenesisState) { tb.Helper() nodeHome := tb.TempDir() snapshotDir := filepath.Join(nodeHome, "data", "snapshots") @@ -74,7 +74,7 @@ func setup(tb testing.TB, withGenesis bool, invCheckPeriod uint) (*CentauriApp, })} var wasmOpts []wasm.Option db := dbm.NewMemDB() - app := NewCentauriApp( + app := NewComposableApp( log.NewNopLogger(), db, nil, true, wasmtypes.EnableAllProposals, @@ -101,7 +101,7 @@ func SetupWithGenesisValSet( valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, -) *CentauriApp { +) *ComposableApp { t.Helper() app, genesisState := setup(t, true, 5) // set genesis accounts @@ -181,7 +181,7 @@ func SetupWithGenesisValSet( } // SetupWithEmptyStore setup a wasmd app instance with empty DB -func SetupWithEmptyStore(tb testing.TB) *CentauriApp { +func SetupWithEmptyStore(tb testing.TB) *ComposableApp { tb.Helper() app, _ := setup(tb, false, 0) return app @@ -229,7 +229,7 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { } // AddTestAddrsFromPubKeys adds the addresses into the WasmApp providing only the public keys. -func AddTestAddrsFromPubKeys(app *CentauriApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt sdkmath.Int) { +func AddTestAddrsFromPubKeys(app *ComposableApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt sdkmath.Int) { initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) for _, pk := range pubKeys { @@ -239,17 +239,17 @@ func AddTestAddrsFromPubKeys(app *CentauriApp, ctx sdk.Context, pubKeys []crypto // AddTestAddrs constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrs(app *CentauriApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress { +func AddTestAddrs(app *ComposableApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createRandomAccounts) } // AddTestAddrs constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrsIncremental(app *CentauriApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress { +func AddTestAddrsIncremental(app *ComposableApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createIncrementalAccounts) } -func addTestAddrs(app *CentauriApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { +func addTestAddrs(app *ComposableApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { testAddrs := strategy(accNum) initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) @@ -262,7 +262,7 @@ func addTestAddrs(app *CentauriApp, ctx sdk.Context, accNum int, accAmt sdkmath. return testAddrs } -func initAccountWithCoins(app *CentauriApp, ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) { +func initAccountWithCoins(app *ComposableApp, ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) { err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, coins) if err != nil { panic(err) @@ -307,7 +307,7 @@ func TestAddr(addr, bech string) (sdk.AccAddress, error) { } // CheckBalance checks the balance of an account. -func CheckBalance(t *testing.T, app *CentauriApp, addr sdk.AccAddress, balances sdk.Coins) { +func CheckBalance(t *testing.T, app *ComposableApp, addr sdk.AccAddress, balances sdk.Coins) { t.Helper() ctxCheck := app.BaseApp.NewContext(true, tmproto.Header{}) require.True(t, balances.IsEqual(app.BankKeeper.GetAllBalances(ctxCheck, addr))) diff --git a/app/upgrades/centauri/upgrade.go b/app/upgrades/centauri/upgrade.go index c83658368..4dbd5b88b 100644 --- a/app/upgrades/centauri/upgrade.go +++ b/app/upgrades/centauri/upgrade.go @@ -16,10 +16,10 @@ import ( govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - bech32authmigration "github.com/notional-labs/centauri/v5/bech32-migration/auth" - bech32govmigration "github.com/notional-labs/centauri/v5/bech32-migration/gov" - bech32slashingmigration "github.com/notional-labs/centauri/v5/bech32-migration/slashing" - bech32stakingmigration "github.com/notional-labs/centauri/v5/bech32-migration/staking" + 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" + bech32stakingmigration "github.com/notional-labs/composable/v6/bech32-migration/staking" ) func CreateUpgradeHandler( diff --git a/app/upgrades/reward/constants.go b/app/upgrades/reward/constants.go index 6d0837541..18a12fb9e 100644 --- a/app/upgrades/reward/constants.go +++ b/app/upgrades/reward/constants.go @@ -1,6 +1,6 @@ package v4 const ( - // UpgradeName defines the on-chain upgrade name for the Centauri upgrade. + // UpgradeName defines the on-chain upgrade name for the composable upgrade. UpgradeName = "reward" ) diff --git a/app/upgrades/reward/upgrade.go b/app/upgrades/reward/upgrade.go index 991d2eb3a..647fb7fb4 100644 --- a/app/upgrades/reward/upgrade.go +++ b/app/upgrades/reward/upgrade.go @@ -5,8 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - mintkeeper "github.com/notional-labs/centauri/v5/x/mint/keeper" - tfmwkeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" + mintkeeper "github.com/notional-labs/composable/v6/x/mint/keeper" + tfmwkeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) var listAllowedRelayAddress = []string{ diff --git a/app/upgrades/types.go b/app/upgrades/types.go index fb35080de..10551b005 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -2,12 +2,13 @@ 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" - "github.com/notional-labs/centauri/v5/app/keepers" + "github.com/notional-labs/composable/v6/app/keepers" ) // BaseAppParamManager defines an interrace that BaseApp is expected to fullfil @@ -26,7 +27,7 @@ type Upgrade struct { UpgradeName string // CreateUpgradeHandler defines the function that creates an upgrade handler - CreateUpgradeHandler func(*module.Manager, module.Configurator, BaseAppParamManager, *keepers.AppKeepers) upgradetypes.UpgradeHandler + CreateUpgradeHandler func(*module.Manager, module.Configurator, BaseAppParamManager, codec.Codec, *keepers.AppKeepers) upgradetypes.UpgradeHandler // Store upgrades, should be used for any new modules introduced, new modules deleted, or store names renamed. StoreUpgrades store.StoreUpgrades diff --git a/app/upgrades/v4/constants.go b/app/upgrades/v4/constants.go index e6e7a7360..91e150e0a 100644 --- a/app/upgrades/v4/constants.go +++ b/app/upgrades/v4/constants.go @@ -5,13 +5,13 @@ import ( 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/centauri/v5/app/upgrades" - ibchookstypes "github.com/notional-labs/centauri/v5/x/ibc-hooks/types" - ratelimitmoduletypes "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/app/upgrades" + ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types" + ratelimitmoduletypes "github.com/notional-labs/composable/v6/x/ratelimit/types" ) const ( - // UpgradeName defines the on-chain upgrade name for the Centauri upgrade. + // UpgradeName defines the on-chain upgrade name for the composable upgrade. UpgradeName = "v4" ) diff --git a/app/upgrades/v4/upgrade.go b/app/upgrades/v4/upgrade.go index eb614ffba..b26fee2a9 100644 --- a/app/upgrades/v4/upgrade.go +++ b/app/upgrades/v4/upgrade.go @@ -6,15 +6,17 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/notional-labs/centauri/v5/app/keepers" - "github.com/notional-labs/centauri/v5/app/upgrades" - tfmdtypes "github.com/notional-labs/centauri/v5/x/transfermiddleware/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" ) func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, _ upgrades.BaseAppParamManager, + _ codec.Codec, keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { diff --git a/app/upgrades/v4_5/constants.go b/app/upgrades/v4_5/constants.go index ef7b9665d..032f1f01f 100644 --- a/app/upgrades/v4_5/constants.go +++ b/app/upgrades/v4_5/constants.go @@ -1,9 +1,9 @@ package v45 -import "github.com/notional-labs/centauri/v5/app/upgrades" +import "github.com/notional-labs/composable/v6/app/upgrades" const ( - // UpgradeName defines the on-chain upgrade name for the Centauri upgrade. + // UpgradeName defines the on-chain upgrade name for the composable upgrade. UpgradeName = "v4_5" UpgradeHeight = 967554 ) diff --git a/app/upgrades/v4_5/fork.go b/app/upgrades/v4_5/fork.go index d1d9b6d5f..b913f3024 100644 --- a/app/upgrades/v4_5/fork.go +++ b/app/upgrades/v4_5/fork.go @@ -12,7 +12,7 @@ import ( 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" - "github.com/notional-labs/centauri/v5/app/keepers" + "github.com/notional-labs/composable/v6/app/keepers" ) func RunForkLogic(ctx sdk.Context, appKeepers *keepers.AppKeepers) { diff --git a/app/upgrades/v4_5_1/constants.go b/app/upgrades/v4_5_1/constants.go index bae8d3337..fec6f73b6 100644 --- a/app/upgrades/v4_5_1/constants.go +++ b/app/upgrades/v4_5_1/constants.go @@ -1,6 +1,6 @@ package v4_5_1 -import "github.com/notional-labs/centauri/v5/app/upgrades" +import "github.com/notional-labs/composable/v6/app/upgrades" const ( // UpgradeName defines the on-chain upgrade name for the Composable v5 upgrade. diff --git a/app/upgrades/v4_5_1/fork.go b/app/upgrades/v4_5_1/fork.go index f0b85d60e..fc413b7ae 100644 --- a/app/upgrades/v4_5_1/fork.go +++ b/app/upgrades/v4_5_1/fork.go @@ -3,8 +3,8 @@ package v4_5_1 import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/app/keepers" - rateLimitKeeper "github.com/notional-labs/centauri/v5/x/ratelimit/keeper" + "github.com/notional-labs/composable/v6/app/keepers" + rateLimitKeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" ) func RunForkLogic(ctx sdk.Context, keepers *keepers.AppKeepers) { diff --git a/app/upgrades/v5/constants.go b/app/upgrades/v5/constants.go index 87d595774..69946b0cb 100644 --- a/app/upgrades/v5/constants.go +++ b/app/upgrades/v5/constants.go @@ -2,12 +2,12 @@ package v5 import ( store "github.com/cosmos/cosmos-sdk/store/types" - "github.com/notional-labs/centauri/v5/app/upgrades" - txboundary "github.com/notional-labs/centauri/v5/x/tx-boundary/types" + "github.com/notional-labs/composable/v6/app/upgrades" + txboundary "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) const ( - // UpgradeName defines the on-chain upgrade name for the Centauri upgrade. + // UpgradeName defines the on-chain upgrade name for the composable upgrade. UpgradeName = "v5" ) diff --git a/app/upgrades/v5/upgrade.go b/app/upgrades/v5/upgrade.go index 93da70da2..90fc487e2 100644 --- a/app/upgrades/v5/upgrade.go +++ b/app/upgrades/v5/upgrade.go @@ -2,12 +2,13 @@ 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/centauri/v5/app/keepers" - "github.com/notional-labs/centauri/v5/app/upgrades" - "github.com/notional-labs/centauri/v5/x/ratelimit/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" ) const ( @@ -22,6 +23,7 @@ func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, _ upgrades.BaseAppParamManager, + _ codec.Codec, keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { diff --git a/app/upgrades/v5_1_0/constants.go b/app/upgrades/v5_1_0/constants.go index 72ae72bfc..aa9a6bf30 100644 --- a/app/upgrades/v5_1_0/constants.go +++ b/app/upgrades/v5_1_0/constants.go @@ -1,6 +1,6 @@ package v5_1_0 -import "github.com/notional-labs/centauri/v5/app/upgrades" +import "github.com/notional-labs/composable/v6/app/upgrades" const ( // UpgradeName defines the on-chain upgrade name for the Composable v5 upgrade. diff --git a/app/upgrades/v5_1_0/fork.go b/app/upgrades/v5_1_0/fork.go index 01b051706..771d3c696 100644 --- a/app/upgrades/v5_1_0/fork.go +++ b/app/upgrades/v5_1_0/fork.go @@ -4,9 +4,9 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/app/keepers" - rateLimitKeeper "github.com/notional-labs/centauri/v5/x/ratelimit/keeper" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/app/keepers" + rateLimitKeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) const uosmo = "ibc/47BD209179859CDE4A2806763D7189B6E6FE13A17880FE2B42DE1E6C1E329E23" diff --git a/app/upgrades/v5_2_0/constants.go b/app/upgrades/v5_2_0/constants.go new file mode 100644 index 000000000..b09071c2d --- /dev/null +++ b/app/upgrades/v5_2_0/constants.go @@ -0,0 +1,18 @@ +package v5_2_0 + +import "github.com/notional-labs/composable/v6/app/upgrades" + +const ( + // UpgradeName defines the on-chain upgrade name for the Composable v5 upgrade. + UpgradeName = "v5_2_0" + + // UpgradeHeight defines the block height at which the Composable v6 upgrade is + // triggered. + UpgradeHeight = 1771900 +) + +var Fork = upgrades.Fork{ + UpgradeName: UpgradeName, + UpgradeHeight: UpgradeHeight, + BeginForkLogic: RunForkLogic, +} diff --git a/app/upgrades/v5_2_0/fork.go b/app/upgrades/v5_2_0/fork.go new file mode 100644 index 000000000..0b4e95d2e --- /dev/null +++ b/app/upgrades/v5_2_0/fork.go @@ -0,0 +1,83 @@ +//nolint:all +package v5_2_0 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/notional-labs/composable/v6/app/keepers" + + 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/cosmos/ibc-go/v7/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + wasm08types "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" +) + +const ( + newWasmCodeID = "ad84ee3292e28b4e46da16974c118d40093e1a6e28a083f2f045f68fde7fb575" + subjectClientId = "08-wasm-5" + substituteClientId = "08-wasm-133" +) + +func RunForkLogic(ctx sdk.Context, keepers *keepers.AppKeepers) { + ctx.Logger().Info("Applying v5_2_0 upgrade" + + "Upgrade 08-wasm contract", + ) + + UpdateWasmContract(ctx, keepers.IBCKeeper) + + err := ClientUpdate(ctx, keepers.IBCKeeper.Codec(), keepers.IBCKeeper, subjectClientId, substituteClientId) + if err != nil { + panic(err) + } +} + +func UpdateWasmContract(ctx sdk.Context, ibckeeper *ibckeeper.Keeper) { + unknownClientState, found := ibckeeper.ClientKeeper.GetClientState(ctx, subjectClientId) + if !found { + panic("substitute client client not found ") + } + + clientState, ok := unknownClientState.(*wasm08types.ClientState) + if !ok { + panic("cannot update client") + } + + code, err := transfertypes.ParseHexHash(newWasmCodeID) + if err != nil { + panic(err) + } + + clientState.CodeId = code + + ibckeeper.ClientKeeper.SetClientState(ctx, subjectClientId, clientState) +} + +func ClientUpdate(ctx sdk.Context, codec codec.BinaryCodec, ibckeeper *ibckeeper.Keeper, subjectClientId string, substituteClientId string) error { + subjectClientState, found := ibckeeper.ClientKeeper.GetClientState(ctx, subjectClientId) + if !found { + return sdkerrors.Wrapf(clienttypes.ErrClientNotFound, "subject client with ID %s", subjectClientId) + } + + subjectClientStore := ibckeeper.ClientKeeper.ClientStore(ctx, subjectClientId) + + substituteClientState, found := ibckeeper.ClientKeeper.GetClientState(ctx, substituteClientId) + if !found { + return sdkerrors.Wrapf(clienttypes.ErrClientNotFound, "substitute client with ID %s", substituteClientId) + } + + substituteClientStore := ibckeeper.ClientKeeper.ClientStore(ctx, substituteClientId) + + if status := ibckeeper.ClientKeeper.GetClientStatus(ctx, substituteClientState, substituteClientId); status != exported.Active { + return sdkerrors.Wrapf(clienttypes.ErrClientNotActive, "substitute client is not Active, status is %s", status) + } + + if err := subjectClientState.CheckSubstituteAndUpdateState(ctx, codec, subjectClientStore, substituteClientStore, substituteClientState); err != nil { + return err + } + + ctx.Logger().Info("client updated after hark fork passed", "client-id", subjectClientId) + + return nil +} diff --git a/app/upgrades/v6/constants.go b/app/upgrades/v6/constants.go new file mode 100644 index 000000000..06444b580 --- /dev/null +++ b/app/upgrades/v6/constants.go @@ -0,0 +1,20 @@ +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" +) + +const ( + // UpgradeName defines the on-chain upgrade name for the composable upgrade. + UpgradeName = "v6" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{ + Added: []string{authz.ModuleName}, + }, +} diff --git a/app/upgrades/v6/upgrade.go b/app/upgrades/v6/upgrade.go new file mode 100644 index 000000000..a614235b2 --- /dev/null +++ b/app/upgrades/v6/upgrade.go @@ -0,0 +1,24 @@ +package v6 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmos/cosmos-sdk/codec" + "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" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + _ upgrades.BaseAppParamManager, + cdc codec.Codec, + keepers *keepers.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + return mm.RunMigrations(ctx, configurator, vm) + } +} diff --git a/bech32-migration/auth/auth.go b/bech32-migration/auth/auth.go index ae1cd868f..1bb3f829f 100644 --- a/bech32-migration/auth/auth.go +++ b/bech32-migration/auth/auth.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - "github.com/notional-labs/centauri/v5/bech32-migration/utils" + "github.com/notional-labs/composable/v6/bech32-migration/utils" ) func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) { diff --git a/bech32-migration/gov/gov.go b/bech32-migration/gov/gov.go index 40f222a6f..f141d1c0b 100644 --- a/bech32-migration/gov/gov.go +++ b/bech32-migration/gov/gov.go @@ -9,7 +9,7 @@ import ( v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/notional-labs/centauri/v5/bech32-migration/utils" + "github.com/notional-labs/composable/v6/bech32-migration/utils" ) func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) { diff --git a/bech32-migration/slashing/slashing.go b/bech32-migration/slashing/slashing.go index 4964c5474..cde06383e 100644 --- a/bech32-migration/slashing/slashing.go +++ b/bech32-migration/slashing/slashing.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/notional-labs/centauri/v5/bech32-migration/utils" + "github.com/notional-labs/composable/v6/bech32-migration/utils" ) func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) { diff --git a/bech32-migration/staking/staking.go b/bech32-migration/staking/staking.go index 47147152a..3af0f74ab 100644 --- a/bech32-migration/staking/staking.go +++ b/bech32-migration/staking/staking.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/notional-labs/centauri/v5/bech32-migration/utils" + "github.com/notional-labs/composable/v6/bech32-migration/utils" ) func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) { diff --git a/bech32-migration/utils/utils.go b/bech32-migration/utils/utils.go index 6ecedc167..8bb883097 100644 --- a/bech32-migration/utils/utils.go +++ b/bech32-migration/utils/utils.go @@ -10,7 +10,7 @@ import ( const ( // OldBech32Prefix defines the Bech32 prefix used for EthAccounts - OldBech32Prefix = "banksy" + OldBech32Prefix = "centauri" // OldBech32PrefixAccAddr defines the Bech32 prefix of an account's address OldBech32PrefixAccAddr = OldBech32Prefix diff --git a/cmd/centaurid/cmd/bech32_convert.go b/cmd/centaurid/cmd/bech32_convert.go index 35c4e9599..336f70fc3 100644 --- a/cmd/centaurid/cmd/bech32_convert.go +++ b/cmd/centaurid/cmd/bech32_convert.go @@ -43,7 +43,7 @@ Example: }, } - cmd.Flags().StringP(flagBech32Prefix, "p", "centauri", "Bech32 Prefix to encode to") + cmd.Flags().StringP(flagBech32Prefix, "p", "composable", "Bech32 Prefix to encode to") return cmd } diff --git a/cmd/centaurid/cmd/genaccounts.go b/cmd/centaurid/cmd/genaccounts.go index 37a68d1ec..df42303d7 100644 --- a/cmd/centaurid/cmd/genaccounts.go +++ b/cmd/centaurid/cmd/genaccounts.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/bech32-migration/utils" + "github.com/notional-labs/composable/v6/bech32-migration/utils" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -201,7 +201,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa func CovertPrefixAddr() *cobra.Command { cmd := &cobra.Command{ Use: "convert [address]", - Short: "Convert prefix from banksy to centauri", + Short: "Convert prefix from layer to centauri", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { newAddr := utils.ConvertAccAddr(args[0]) diff --git a/cmd/centaurid/cmd/root.go b/cmd/centaurid/cmd/root.go index 159891d1b..007663989 100644 --- a/cmd/centaurid/cmd/root.go +++ b/cmd/centaurid/cmd/root.go @@ -33,8 +33,8 @@ import ( genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/notional-labs/centauri/v5/app" - // "github.com/notional-labs/centauri/v5/app/params" + "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 ) @@ -56,7 +56,7 @@ func NewRootCmd() (*cobra.Command, app.EncodingConfig) { rootCmd := &cobra.Command{ Use: app.Name + "d", - Short: "Centauri App", + Short: "Composable App", PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { // set the default command outputs cmd.SetOut(cmd.OutOrStdout()) @@ -270,7 +270,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseappOptions := server.DefaultBaseappOptions(appOpts) var emptyWasmOpts []wasm.Option - newApp := app.NewCentauriApp( + newApp := app.NewComposableApp( logger, db, traceStore, true, app.GetEnabledProposals(), skipUpgradeHeights, @@ -291,7 +291,7 @@ func (a appCreator) appExport( logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, appOpts servertypes.AppOptions, _ []string, ) (servertypes.ExportedApp, error) { - var anApp *app.CentauriApp + var anApp *app.ComposableApp homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { @@ -300,7 +300,7 @@ func (a appCreator) appExport( var emptyWasmOpts []wasm.Option if height != -1 { - anApp = app.NewCentauriApp( + anApp = app.NewComposableApp( logger, db, traceStore, @@ -318,7 +318,7 @@ func (a appCreator) appExport( return servertypes.ExportedApp{}, err } } else { - anApp = app.NewCentauriApp( + anApp = app.NewComposableApp( logger, db, traceStore, diff --git a/cmd/centaurid/main.go b/cmd/centaurid/main.go index 5c9cb1894..bad5e27a4 100644 --- a/cmd/centaurid/main.go +++ b/cmd/centaurid/main.go @@ -5,9 +5,9 @@ import ( svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/notional-labs/centauri/v5/app" - cmd "github.com/notional-labs/centauri/v5/cmd/centaurid/cmd" - cmdcfg "github.com/notional-labs/centauri/v5/cmd/centaurid/config" + "github.com/notional-labs/composable/v6/app" + cmd "github.com/notional-labs/composable/v6/cmd/centaurid/cmd" + cmdcfg "github.com/notional-labs/composable/v6/cmd/centaurid/config" ) func main() { diff --git a/custom/bank/bank_test.go b/custom/bank/bank_test.go index 65d833901..ffbaa63f2 100644 --- a/custom/bank/bank_test.go +++ b/custom/bank/bank_test.go @@ -9,7 +9,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/stretchr/testify/suite" - customibctesting "github.com/notional-labs/centauri/v5/app/ibctesting" + customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) type CustomBankTestSuite struct { diff --git a/custom/bank/keeper/keeper.go b/custom/bank/keeper/keeper.go index a71599d8c..222ce1a3b 100644 --- a/custom/bank/keeper/keeper.go +++ b/custom/bank/keeper/keeper.go @@ -13,19 +13,15 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - banktypes "github.com/notional-labs/centauri/v5/custom/bank/types" + banktypes "github.com/notional-labs/composable/v6/custom/bank/types" - transfermiddlewarekeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" - - alliancekeeper "github.com/terra-money/alliance/x/alliance/keeper" - alliancetypes "github.com/terra-money/alliance/x/alliance/types" + transfermiddlewarekeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) type Keeper struct { bankkeeper.BaseKeeper tfmk banktypes.TransferMiddlewareKeeper - ak alliancekeeper.Keeper sk banktypes.StakingKeeper acck accountkeeper.AccountKeeper } @@ -41,8 +37,7 @@ func NewBaseKeeper( authority string, ) Keeper { keeper := Keeper{ - BaseKeeper: bankkeeper.NewBaseKeeper(cdc, storeKey, ak, blockedAddrs, authority), // TODO: how to set authority? - ak: alliancekeeper.Keeper{}, + BaseKeeper: bankkeeper.NewBaseKeeper(cdc, storeKey, ak, blockedAddrs, authority), sk: stakingkeeper.Keeper{}, tfmk: tfmk, acck: ak, @@ -50,8 +45,7 @@ func NewBaseKeeper( return keeper } -func (k *Keeper) RegisterKeepers(ak alliancekeeper.Keeper, sk banktypes.StakingKeeper) { - k.ak = ak +func (k *Keeper) RegisterKeepers(sk banktypes.StakingKeeper) { k.sk = sk } @@ -68,16 +62,6 @@ func (k Keeper) SupplyOf(c context.Context, req *types.QuerySupplyOfRequest) (*t ctx := sdk.UnwrapSDKContext(c) supply := k.GetSupply(ctx, req.Denom) - if req.Denom == k.sk.BondDenom(ctx) { - assets := k.ak.GetAllAssets(ctx) - totalRewardWeights := sdk.ZeroDec() - for _, asset := range assets { - totalRewardWeights = totalRewardWeights.Add(asset.RewardWeight) - } - allianceBonded := k.ak.GetAllianceBondedAmount(ctx, k.acck.GetModuleAddress(alliancetypes.ModuleName)) - supply.Amount = supply.Amount.Sub(allianceBonded) - } - return &types.QuerySupplyOfResponse{Amount: sdk.NewCoin(req.Denom, supply.Amount)}, nil } @@ -93,11 +77,5 @@ func (k Keeper) TotalSupply(ctx context.Context, req *types.QueryTotalSupplyRequ duplicateCoins := k.tfmk.GetTotalEscrowedToken(sdkCtx) totalSupply = totalSupply.Sub(duplicateCoins...) - allianceBonded := k.ak.GetAllianceBondedAmount(sdkCtx, k.acck.GetModuleAddress(alliancetypes.ModuleName)) - bondDenom := k.sk.BondDenom(sdkCtx) - if totalSupply.AmountOf(bondDenom).IsPositive() { - totalSupply = totalSupply.Sub(sdk.NewCoin(bondDenom, allianceBonded)) - } - return &types.QueryTotalSupplyResponse{Supply: totalSupply, Pagination: pageRes}, nil } diff --git a/custom/bank/module.go b/custom/bank/module.go index e55cda7ca..be7acaa6b 100644 --- a/custom/bank/module.go +++ b/custom/bank/module.go @@ -10,12 +10,10 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" - custombankkeeper "github.com/notional-labs/centauri/v5/custom/bank/keeper" + custombankkeeper "github.com/notional-labs/composable/v6/custom/bank/keeper" ) -// AppModule wraps around the bank module and the bank keeper to return the right total supply ignoring bonded tokens -// that the alliance module minted to rebalance the voting power -// It modifies the TotalSupply and SupplyOf GRPC queries +// AppModule wraps around the bank module and the bank keeper to return the right total supply type AppModule struct { bankmodule.AppModule keeper custombankkeeper.Keeper diff --git a/go.mod b/go.mod index 205c5c581..eb01d527d 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,19 @@ -module github.com/notional-labs/centauri/v5 +module github.com/notional-labs/composable/v6 go 1.19 require ( - cosmossdk.io/math v1.0.1 + cosmossdk.io/math v1.1.2 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.1 + 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.3 + github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.0.1 + github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0 + github.com/cosmos/ibc-go/v7 v7.3.1 github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.3 github.com/golangci/golangci-lint v1.50.1 @@ -21,13 +22,11 @@ require ( github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.7.0 github.com/strangelove-ventures/async-icq/v7 v7.0.0-20230413165143-a3b65ccdc897 - github.com/strangelove-ventures/packet-forward-middleware/v7 v7.0.0-20230412224111-136e94e98861 - github.com/stretchr/testify v1.8.3 - github.com/terra-money/alliance v0.1.1-0.20230419080242-b29b0ec11186 + github.com/stretchr/testify v1.8.4 golang.org/x/tools v0.6.0 - google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 - google.golang.org/grpc v1.55.0 - gotest.tools/v3 v3.4.0 + google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 + google.golang.org/grpc v1.56.2 + gotest.tools/v3 v3.5.0 mvdan.cc/gofumpt v0.4.0 ) @@ -53,6 +52,9 @@ require ( github.com/butuzov/ireturn v0.1.1 // indirect github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/daixiang0/gci v0.8.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect @@ -62,6 +64,7 @@ require ( github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-critic/go-critic v0.6.5 // indirect github.com/go-toolsmith/astcast v1.0.0 // indirect github.com/go-toolsmith/astcopy v1.0.2 // indirect @@ -82,6 +85,7 @@ require ( github.com/golangci/misspell v0.3.5 // indirect github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.4.2 // indirect @@ -97,6 +101,8 @@ require ( github.com/kisielk/errcheck v1.6.2 // indirect github.com/kisielk/gotool v1.0.0 // indirect github.com/kkHAIKE/contextcheck v1.1.3 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.6 // indirect github.com/kyoh86/exportloopref v0.1.8 // indirect @@ -123,6 +129,7 @@ require ( github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f // indirect github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/ryancurrah/gomodguard v1.2.4 // indirect github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect @@ -155,8 +162,10 @@ require ( go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.23.0 // indirect golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/sync v0.1.0 // 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 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 @@ -164,26 +173,25 @@ require ( ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go v0.110.4 // indirect + cloud.google.com/go/compute v1.20.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.12.0 // indirect - cloud.google.com/go/storage v1.29.0 // indirect - cosmossdk.io/log v1.1.0 // indirect + cloud.google.com/go/iam v1.1.0 // 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 github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect - github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/go-playground/locales v0.14.0 // indirect 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.7.0 // indirect + github.com/googleapis/gax-go/v2 v2.11.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 @@ -195,14 +203,13 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rs/zerolog v1.30.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/ugorji/go/codec v1.2.7 // indirect github.com/ulikunitz/xz v0.5.11 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/oauth2 v0.6.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.110.0 // indirect + google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) @@ -210,8 +217,8 @@ require ( require ( cosmossdk.io/api v0.3.1 cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0-beta.7 + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/errors v1.0.0 cosmossdk.io/tools/rosetta v0.2.1 filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -272,13 +279,13 @@ require ( 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 - github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/pelletier/go-toml/v2 v2.0.7 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -290,23 +297,23 @@ require ( github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.3 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.3 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.15.0 + github.com/spf13/viper v1.16.0 github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect + 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.7.0 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/net v0.9.0 // indirect - golang.org/x/sys v0.7.0 // indirect - golang.org/x/term v0.7.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/protobuf v1.30.0 + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // 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 nhooyr.io/websocket v1.8.6 // indirect @@ -319,11 +326,14 @@ replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 // lock wasmvm so we do not break the grandpa contract github.com/CosmWasm/wasmvm => github.com/CosmWasm/wasmvm v1.2.1 + + github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 => github.com/notional-labs/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0-20231027045618-f659894b12d9 // ibc-go with wasm client - github.com/cosmos/ibc-go/v7 => github.com/notional-labs/ibc-go/v7 v7.0.1-wasm-client.0.20230724144435-2b77d4a1ce70 + github.com/cosmos/ibc-go/v7 => github.com/notional-labs/ibc-go/v7 v7.2.1-0.20231010040541-6cf43006971f - github.com/strangelove-ventures/packet-forward-middleware/v7 => github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230828115741-8f5f501461be + 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.20230523105704-66dba9499c01 + 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 8738e523b..073ee4139 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.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +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/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.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +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/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,13 +113,12 @@ 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 v0.12.0 h1:DRtTY29b75ciH6Ov1PHb4/iat2CLCvrOm40Q0a6DFpE= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= +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/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= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -177,8 +176,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -194,14 +193,14 @@ cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= -cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +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/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= @@ -246,7 +245,6 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd 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/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= 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= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -346,13 +344,18 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.1 h1:KLxkQTK2hICXYq21U2hn1W5hOVYUdQgDQ1uB+90xPIg= -github.com/cometbft/cometbft v0.37.1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= +github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -368,8 +371,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.3 h1:r0hGmZoAzP2D+MaPaFGHwAaTdFQq3pNpHaUp1BsffbM= -github.com/cosmos/cosmos-sdk v0.47.3/go.mod h1:c4OfLdAykA9zsj1CqrxBRqXzVz48I++JSvIMPSPcEmk= +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/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= @@ -380,12 +383,12 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK 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/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= +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= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= -github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= -github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= +github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -396,8 +399,6 @@ github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcX github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cristalhq/acmd v0.8.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/daixiang0/gci v0.8.1 h1:T4xpSC+hmsi4CSyuYfIJdMZAr9o7xZmHpQVygMghGZ4= @@ -474,6 +475,8 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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= @@ -481,6 +484,7 @@ github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwv github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= 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-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= @@ -500,7 +504,6 @@ 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/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= @@ -541,7 +544,6 @@ github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -663,6 +665,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -681,8 +685,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.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +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/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= @@ -846,6 +850,7 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -899,8 +904,8 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= @@ -963,12 +968,10 @@ github.com/nishanths/exhaustive v0.8.3 h1:pw5O09vwg8ZaditDp/nQRqVnrMczSJDxRDJMow github.com/nishanths/exhaustive v0.8.3/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/notional-labs/alliance v1.0.1-0.20230523105704-66dba9499c01 h1:koCsoc1NGpU8TntXwM/s7Z/whsKNDVPiLim35HLBAzA= -github.com/notional-labs/alliance v1.0.1-0.20230523105704-66dba9499c01/go.mod h1:GFQ8TsXDMTpu7kif0Dwddz6rxazy0ZJQHfN38ZmAodI= -github.com/notional-labs/ibc-go/v7 v7.0.1-wasm-client.0.20230724144435-2b77d4a1ce70 h1:oZTUDZzUBp8D2h3uZfPQmZGVksrROqubHDASvFB/+u0= -github.com/notional-labs/ibc-go/v7 v7.0.1-wasm-client.0.20230724144435-2b77d4a1ce70/go.mod h1:ISHo/Qitjtvj2svGmttaZv03zVXmS+uqvUyF9kFqlI0= -github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230828115741-8f5f501461be h1:fCcfI4QG6WsnTvmwG6BC/jLpTHOg0v4aOrBWDXVmohE= -github.com/notional-labs/packet-forward-middleware/v7 v7.0.0-20230828115741-8f5f501461be/go.mod h1:+Urw3FnxiiB7qs3CQaMWlgfntFkbebHlYNYt2y8JI/I= +github.com/notional-labs/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0-20231027045618-f659894b12d9 h1:4rte3LTbrQnlu0Gnw6gouj2voGwgjweORA1dcgnQxlU= +github.com/notional-labs/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0-20231027045618-f659894b12d9/go.mod h1:3PHOr4UiPNtnZJutT22fm5+pjIefTlDEgtWGoOJg3A0= +github.com/notional-labs/ibc-go/v7 v7.2.1-0.20231010040541-6cf43006971f h1:Uw35VHCdLTsQf8B4UGTjHCR6HqcYFF6dwPW8uJzS0f4= +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/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -1012,8 +1015,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= -github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= @@ -1022,7 +1025,8 @@ github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9oc github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= 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/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +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= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1090,17 +1094,18 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1150,8 +1155,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= @@ -1167,8 +1172,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= @@ -1194,8 +1199,9 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -1222,12 +1228,11 @@ github.com/tomarrell/wrapcheck/v2 v2.7.0/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0 github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= 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= @@ -1252,10 +1257,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -1281,6 +1286,7 @@ 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/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU= 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= @@ -1303,9 +1309,10 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +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.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= @@ -1317,8 +1324,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 h1:Ic/qN6TEifvObMGQy72k0n1LlJr7DjWWEi+MOsDOiSk= golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= @@ -1350,8 +1357,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1402,6 +1409,7 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1414,8 +1422,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.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +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= @@ -1441,8 +1449,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.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +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/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= @@ -1457,8 +1465,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.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/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/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= @@ -1565,13 +1573,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.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.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.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +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= @@ -1581,9 +1589,10 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +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= @@ -1739,8 +1748,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.110.0 h1:l+rh0KYUooe9JGbGVx71tbFo4SMbMTXK3I3ia2QSEeU= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= +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/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= @@ -1858,8 +1867,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-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +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/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= @@ -1901,8 +1914,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.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +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/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= @@ -1919,8 +1932,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1953,8 +1966,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/proposal.json b/proposal.json new file mode 100644 index 000000000..cbefee6e9 --- /dev/null +++ b/proposal.json @@ -0,0 +1,86 @@ +{ + "body": { + "messages": [ + { + "@type": "/cosmos.gov.v1.MsgSubmitProposal", + "messages": [ + { + "@type": "/centauri.ratelimit.v1beta1.MsgUpdateRateLimit", + "authority": "centauri10d07y265gmmuvt4z0w9aw880jnsr700j7g7ejq", + "denom": "ibc/EF48E6B1A1A19F47ECAEA62F5670C37C0580E86A9E88498B7E393EB6F49F33C0", + "min_rate_limit_amount": "30410000000", + "channel_id": "channel-2", + "max_percent_send": "30", + "max_percent_recv": "30", + "duration_hours": "1" + }, + { + "@type": "/centauri.ratelimit.v1beta1.MsgUpdateRateLimit", + "authority": "centauri10d07y265gmmuvt4z0w9aw880jnsr700j7g7ejq", + "denom": "ibc/3CC19CEC7E5A3E90E78A5A9ECC5A0E2F8F826A375CF1E096F4515CF09DA3E366", + "min_rate_limit_amount": "513350000000000", + "channel_id": "channel-2", + "max_percent_send": "30", + "max_percent_recv": "30", + "duration_hours": "1" + }, + { + "@type": "/centauri.ratelimit.v1beta1.MsgUpdateRateLimit", + "authority": "centauri10d07y265gmmuvt4z0w9aw880jnsr700j7g7ejq", + "denom": "ibc/EE9046745AEC0E8302CB7ED9D5AD67F528FB3B7AE044B247FB0FB293DBDA35E9", + "channel_id": "channel-2", + "max_percent_send": "30", + "max_percent_recv": "30", + "min_rate_limit_amount": "12550000000000000", + "duration_hours": "1" + }, + { + "@type": "/centauri.ratelimit.v1beta1.MsgUpdateRateLimit", + "authority": "centauri10d07y265gmmuvt4z0w9aw880jnsr700j7g7ejq", + "denom": "ibc/F3EC9F834E57DF704FA3AEAF14E8391C2E58397FE56960AD70E67562990D8265", + "min_rate_limit_amount": "250000000000", + "channel_id": "channel-2", + "max_percent_send": "30", + "max_percent_recv": "30", + "duration_hours": "1" + }, + { + "@type": "/centauri.ratelimit.v1beta1.MsgUpdateRateLimit", + "authority": "centauri10d07y265gmmuvt4z0w9aw880jnsr700j7g7ejq", + "denom": "ibc/47BD209179859CDE4A2806763D7189B6E6FE13A17880FE2B42DE1E6C1E329E23", + "min_rate_limit_amount": "1", + "channel_id": "channel-2", + "max_percent_send": "30", + "max_percent_recv": "30", + "duration_hours": "1" + } + ], + "initial_deposit": [ + { + "denom": "ppica", + "amount": "500000000000000000" + } + ], + "proposer": "centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m", + "metadata": "Update Transfer RateLimit", + "title": "Update Transfer RateLimit", + "summary": "Update Transfer RateLimit : change the duration to 1 hour " + } + ], + "memo": "", + "timeout_height": "0", + "extension_options": [], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [], + "fee": { + "amount": [], + "gas_limit": "2000000", + "payer": "", + "granter": "" + }, + "tip": null + }, + "signatures": [] +} \ No newline at end of file diff --git a/proto/centauri/ratelimit/v1beta1/query.proto b/proto/centauri/ratelimit/v1beta1/query.proto index af1f24bfd..e8c2d5498 100644 --- a/proto/centauri/ratelimit/v1beta1/query.proto +++ b/proto/centauri/ratelimit/v1beta1/query.proto @@ -15,20 +15,22 @@ service Query { } rpc RateLimit(QueryRateLimitRequest) returns (QueryRateLimitResponse) { option (google.api.http).get = - "/centauri/ratelimit/ratelimit/{channel_id}/by_denom"; + "/centauri/ratelimit/ratelimit/{ChannelID}/by_denom"; } rpc RateLimitsByChainID(QueryRateLimitsByChainIDRequest) returns (QueryRateLimitsByChainIDResponse) { - option (google.api.http).get = "/centauri/ratelimit/ratelimits/{chain_id}"; + option (google.api.http).get = + "/centauri/ratelimit/ratelimits/{chain_id}"; } rpc RateLimitsByChannelID(QueryRateLimitsByChannelIDRequest) returns (QueryRateLimitsByChannelIDResponse) { option (google.api.http).get = - "/centauri/ratelimit/ratelimits/{channel_id}"; + "/centauri/ratelimit/ratelimits/{ChannelID}"; } rpc AllWhitelistedAddresses(QueryAllWhitelistedAddressesRequest) returns (QueryAllWhitelistedAddressesResponse) { - option (google.api.http).get = "/centauri/ratelimit/whitelisted_addresses"; + option (google.api.http).get = + "/centauri/ratelimit/whitelisted_addresses"; } } @@ -39,7 +41,7 @@ message QueryAllRateLimitsResponse { message QueryRateLimitRequest { string denom = 1; - string channel_id = 2; + string ChannelID = 2 [ (gogoproto.customname) = "ChannelID" ]; } message QueryRateLimitResponse { RateLimit rate_limit = 1; } @@ -48,7 +50,7 @@ message QueryRateLimitsByChainIDResponse { repeated RateLimit rate_limits = 1 [ (gogoproto.nullable) = false ]; } -message QueryRateLimitsByChannelIDRequest { string channel_id = 1; } +message QueryRateLimitsByChannelIDRequest { string ChannelID = 1 [ (gogoproto.customname) = "ChannelID" ]; } message QueryRateLimitsByChannelIDResponse { repeated RateLimit rate_limits = 1 [ (gogoproto.nullable) = false ]; } diff --git a/proto/centauri/ratelimit/v1beta1/ratelimit.proto b/proto/centauri/ratelimit/v1beta1/ratelimit.proto index e7228fe0b..1d58a0da8 100644 --- a/proto/centauri/ratelimit/v1beta1/ratelimit.proto +++ b/proto/centauri/ratelimit/v1beta1/ratelimit.proto @@ -14,7 +14,7 @@ enum PacketDirection { message Path { string denom = 1; - string channel_id = 2; + string channel_id = 2 [ (gogoproto.customname) = "ChannelID" ]; } message Quota { diff --git a/proto/centauri/ratelimit/v1beta1/tx.proto b/proto/centauri/ratelimit/v1beta1/tx.proto old mode 100755 new mode 100644 index ab20cfd53..a9ca471f2 --- a/proto/centauri/ratelimit/v1beta1/tx.proto +++ b/proto/centauri/ratelimit/v1beta1/tx.proto @@ -9,9 +9,12 @@ option go_package = "x/ratelimit/types"; // Msg defines the transfer middleware Msg service. service Msg { rpc AddTransferRateLimit(MsgAddRateLimit) returns (MsgAddRateLimitResponse); - rpc UpdateTransferRateLimit(MsgUpdateRateLimit) returns (MsgUpdateRateLimitResponse); - rpc RemoveTransferRateLimit(MsgRemoveRateLimit) returns (MsgRemoveRateLimitResponse); - rpc ResetTransferRateLimit(MsgResetRateLimit) returns (MsgResetRateLimitResponse); + rpc UpdateTransferRateLimit(MsgUpdateRateLimit) + returns (MsgUpdateRateLimitResponse); + rpc RemoveTransferRateLimit(MsgRemoveRateLimit) + returns (MsgRemoveRateLimitResponse); + rpc ResetTransferRateLimit(MsgResetRateLimit) + returns (MsgResetRateLimitResponse); } message MsgAddRateLimit { @@ -23,7 +26,7 @@ message MsgAddRateLimit { // denom of the token that is limited string denom = 2; // The channel that is limited when transferr ICS 20 packet of denom - string channel_id = 3; + string channel_id = 3 [ (gogoproto.customname) = "ChannelID" ]; // Max rate limit send string max_percent_send = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", @@ -34,13 +37,13 @@ message MsgAddRateLimit { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; + // Duration of rate limit. The rate limit will reset when reach the duration. + uint64 duration_hours = 6; // Min amount of rate limit (allow transfer max(min-amout, rate-limit)) - string min_rate_limit_amount = 6 [ + string min_rate_limit_amount = 7 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; - // Duration of rate limit. The rate limit will reset when reach the duration. - uint64 duration_hours = 7; } message MsgAddRateLimitResponse {} @@ -52,7 +55,7 @@ message MsgUpdateRateLimit { // overwritten). string authority = 1 [ (gogoproto.moretags) = "yaml:\"authority\"" ]; string denom = 2; - string channel_id = 3; + string channel_id = 3 [ (gogoproto.customname) = "ChannelID" ]; string max_percent_send = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false @@ -77,7 +80,7 @@ message MsgRemoveRateLimit { // overwritten). string authority = 1 [ (gogoproto.moretags) = "yaml:\"authority\"" ]; string denom = 2; - string channel_id = 3; + string channel_id = 3 [ (gogoproto.customname) = "ChannelID" ]; } message MsgRemoveRateLimitResponse {} @@ -89,7 +92,7 @@ message MsgResetRateLimit { // overwritten). string authority = 1 [ (gogoproto.moretags) = "yaml:\"authority\"" ]; string denom = 2; - string channel_id = 3; + string channel_id = 3 [ (gogoproto.customname) = "ChannelID" ]; } message MsgResetRateLimitResponse {} diff --git a/proto/centauri/transfermiddleware/v1beta1/genesis.proto b/proto/centauri/transfermiddleware/v1beta1/genesis.proto index ebd341cac..b6b978d0a 100644 --- a/proto/centauri/transfermiddleware/v1beta1/genesis.proto +++ b/proto/centauri/transfermiddleware/v1beta1/genesis.proto @@ -14,4 +14,3 @@ message GenesisState { [ (gogoproto.nullable) = false ]; Params params = 2 [ (gogoproto.nullable) = false ]; } - diff --git a/proto/centauri/transfermiddleware/v1beta1/parachain_token_info.proto b/proto/centauri/transfermiddleware/v1beta1/parachain_token_info.proto index f570c3f9b..f61095315 100644 --- a/proto/centauri/transfermiddleware/v1beta1/parachain_token_info.proto +++ b/proto/centauri/transfermiddleware/v1beta1/parachain_token_info.proto @@ -13,7 +13,10 @@ message ParachainIBCTokenInfo { // dotsama chain. string ibc_denom = 1 [ (gogoproto.moretags) = "yaml:\"ibc_denom\"" ]; // channel_id is source channel in IBC connection from centauri chain - string channel_id = 2 [ (gogoproto.moretags) = "yaml:\"channel_id\"" ]; + string channel_id = 2 [ + (gogoproto.moretags) = "yaml:\"channel_id\"", + (gogoproto.customname) = "ChannelID" + ]; // native denom is new native minted denom in centauri chain. string native_denom = 3 [ (gogoproto.moretags) = "yaml:\"native_denom\"" ]; // asset id is the id of the asset on Picasso diff --git a/proto/centauri/transfermiddleware/v1beta1/query.proto b/proto/centauri/transfermiddleware/v1beta1/query.proto index fc12b0249..86871ce6a 100644 --- a/proto/centauri/transfermiddleware/v1beta1/query.proto +++ b/proto/centauri/transfermiddleware/v1beta1/query.proto @@ -3,6 +3,7 @@ package centauri.transfermiddleware.v1beta1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "x/transfermiddleware/types"; @@ -17,11 +18,19 @@ service Query { returns (QueryEscrowAddressResponse) { option (google.api.http).get = "/centauri/escrowaddress"; } + + rpc RelayerAccount(QueryIBCWhiteListRequest) + returns (QueryIBCWhiteListResponse) { + option (google.api.http).get = "/centauri/ibcwhitelist"; + } } // message QueryEscrowAddressRequest message QueryEscrowAddressRequest { - string channel_id = 1 [ (gogoproto.moretags) = "yaml:\"channel_id\"" ]; + string channel_id = 1 [ + (gogoproto.moretags) = "yaml:\"channel_id\"", + (gogoproto.customname) = "ChannelID" + ]; } // QueryEscrowAddressResponse @@ -40,7 +49,25 @@ message QueryParaTokenInfoRequest { // RPC method. message QueryParaTokenInfoResponse { string ibc_denom = 1 [ (gogoproto.moretags) = "yaml:\"ibc_denom\"" ]; - string channel_id = 2 [ (gogoproto.moretags) = "yaml:\"channel_id\"" ]; + string channel_id = 2 [ + (gogoproto.moretags) = "yaml:\"channel_id\"", + (gogoproto.customname) = "ChannelID" + ]; string native_denom = 3 [ (gogoproto.moretags) = "yaml:\"native_denom\"" ]; string asset_id = 4 [ (gogoproto.moretags) = "yaml:\"asset_id\"" ]; } + +// QueryIBCWhiteListRequest is the response type for the QueryIBCWhiteListRequest +// RPC method. +message QueryIBCWhiteListRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryIBCWhiteListResponse is the response type for the QueryIBCWhiteListRequest +// RPC method. +message QueryIBCWhiteListResponse { + repeated string white_list = 1 [ (gogoproto.moretags) = "yaml:\"white_list\"" ]; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageResponse pagination = 2; + +} diff --git a/proto/centauri/transfermiddleware/v1beta1/tx.proto b/proto/centauri/transfermiddleware/v1beta1/tx.proto index a11e679c9..a70779bb6 100644 --- a/proto/centauri/transfermiddleware/v1beta1/tx.proto +++ b/proto/centauri/transfermiddleware/v1beta1/tx.proto @@ -22,7 +22,10 @@ message MsgAddParachainIBCTokenInfo { // authority is the address that controls the module (defaults to x/gov unless // overwritten). string authority = 1 [ (gogoproto.moretags) = "yaml:\"authority\"" ]; - string channel_id = 2 [ (gogoproto.moretags) = "yaml:\"channel_id\"" ]; + string channel_id = 2 [ + (gogoproto.moretags) = "yaml:\"channel_id\"", + (gogoproto.customname) = "ChannelID" + ]; string ibc_denom = 3 [ (gogoproto.moretags) = "yaml:\"ibc_denom\"" ]; string native_denom = 4 [ (gogoproto.moretags) = "yaml:\"native_denom\"" ]; string asset_id = 5 [ (gogoproto.moretags) = "yaml:\"asset_id\"" ]; diff --git a/proto/centauri/txboundary/v1beta1/boundary.proto b/proto/centauri/txboundary/v1beta1/boundary.proto index b1352c068..d7f7ef485 100644 --- a/proto/centauri/txboundary/v1beta1/boundary.proto +++ b/proto/centauri/txboundary/v1beta1/boundary.proto @@ -9,13 +9,13 @@ option go_package = "x/tx-boundary/types"; // Boundary defines the number of tx limit and block per tx generation time message Boundary { - uint64 tx_limit = 1; - uint64 blocks_per_generation = 2; + uint64 tx_limit = 1; + uint64 blocks_per_generation = 2; } // Boundary defines the number of delegate and redelegate per Addr message LimitPerAddr { - uint64 delegate_count = 1; - uint64 reledegate_count = 2; - int64 latest_update_block = 3; + uint64 delegate_count = 1; + uint64 reledegate_count = 2; + int64 latest_update_block = 3; } \ No newline at end of file diff --git a/proto/centauri/txboundary/v1beta1/genesis.proto b/proto/centauri/txboundary/v1beta1/genesis.proto index 93f9b6e85..45bb6eeb0 100644 --- a/proto/centauri/txboundary/v1beta1/genesis.proto +++ b/proto/centauri/txboundary/v1beta1/genesis.proto @@ -18,4 +18,3 @@ message GenesisState { (gogoproto.nullable) = false ]; } - diff --git a/proto/centauri/txboundary/v1beta1/query.proto b/proto/centauri/txboundary/v1beta1/query.proto index 33579368f..c3fba408b 100644 --- a/proto/centauri/txboundary/v1beta1/query.proto +++ b/proto/centauri/txboundary/v1beta1/query.proto @@ -10,30 +10,37 @@ option go_package = "x/tx-boundary/types"; // Query provides defines the gRPC querier service. service Query { // DelegateBoundary returns the boundary for the delegate tx. - rpc DelegateBoundary(QueryDelegateBoundaryRequest) returns (QueryDelegateBoundaryResponse) { - option (google.api.http).get = "/cosmos/txboundary/v1beta1/delegateboundary"; + rpc DelegateBoundary(QueryDelegateBoundaryRequest) + returns (QueryDelegateBoundaryResponse) { + option (google.api.http).get = + "/cosmos/txboundary/v1beta1/delegateboundary"; } // RedelegateBoundary returns the boundary for the redelegate tx. - rpc RedelegateBoundary(QueryRedelegateBoundaryRequest) returns (QueryRedelegateBoundaryResponse) { - option (google.api.http).get = "/cosmos/txboundary/v1beta1/redelegateboundary"; + rpc RedelegateBoundary(QueryRedelegateBoundaryRequest) + returns (QueryRedelegateBoundaryResponse) { + option (google.api.http).get = + "/cosmos/txboundary/v1beta1/redelegateboundary"; } } -// QueryDelegateBoundaryRequest is the request type for the Query/DelegateBoundary RPC method. +// QueryDelegateBoundaryRequest is the request type for the +// Query/DelegateBoundary RPC method. message QueryDelegateBoundaryRequest {} -// QueryDelegateBoundaryResponse is the response type for the Query/DelegateBoundary RPC method. +// QueryDelegateBoundaryResponse is the response type for the +// Query/DelegateBoundary RPC method. message QueryDelegateBoundaryResponse { // boundary defines the boundary for the delegate tx Boundary boundary = 1 [ (gogoproto.nullable) = false ]; } -// QueryRedelegateBoundaryRequest is the request type for the Query/ReDelegateBoundary RPC method. +// QueryRedelegateBoundaryRequest is the request type for the +// Query/ReDelegateBoundary RPC method. message QueryRedelegateBoundaryRequest {} -// QueryRedelegateBoundaryResponse is the response type for the Query/ReDelegateBoundary RPC -// method. +// QueryRedelegateBoundaryResponse is the response type for the +// Query/ReDelegateBoundary RPC method. message QueryRedelegateBoundaryResponse { // boundary defines the boundary for the redelegate tx Boundary boundary = 1 [ (gogoproto.nullable) = false ]; diff --git a/proto/centauri/txboundary/v1beta1/tx.proto b/proto/centauri/txboundary/v1beta1/tx.proto index e131c5f74..788e2e7d3 100644 --- a/proto/centauri/txboundary/v1beta1/tx.proto +++ b/proto/centauri/txboundary/v1beta1/tx.proto @@ -12,57 +12,60 @@ option go_package = "x/tx-boundary/types"; // Msg defines the x/mint Msg service. service Msg { - option (cosmos.msg.v1.service) = true; - - rpc UpdateDelegateBoundary(MsgUpdateDelegateBoundary) returns (MsgUpdateDelegateBoundaryResponse); + option (cosmos.msg.v1.service) = true; - rpc UpdateRedelegateBoundary(MsgUpdateRedelegateBoundary) returns (MsgUpdateRedelegateBoundaryResponse); - } - - // MsgUpdateDelegateBoundary is the Msg/UpdateDelegateBoundary request type. - // - // Since: cosmos-sdk 0.47 - message MsgUpdateDelegateBoundary { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "centauri/x/txboundary/MsgUpdateDelegateBoundary"; - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // boundary defines the x/tx-boundary parameters to update. - // - // NOTE: All parameters must be supplied. - Boundary boundary = 2 - [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; - } - - // MsgUpdateDelegateBoundaryResponse defines the response structure for executing a - // MsgUpdateDelegateBoundary message. - // - // Since: cosmos-sdk 0.47 - message MsgUpdateDelegateBoundaryResponse {} + rpc UpdateDelegateBoundary(MsgUpdateDelegateBoundary) + returns (MsgUpdateDelegateBoundaryResponse); + + rpc UpdateRedelegateBoundary(MsgUpdateRedelegateBoundary) + returns (MsgUpdateRedelegateBoundaryResponse); +} + +// MsgUpdateDelegateBoundary is the Msg/UpdateDelegateBoundary request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateDelegateBoundary { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "centauri/x/txboundary/MsgUpdateDelegateBoundary"; + + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // MsgUpdateRedelegateBoundary is the Msg/MsgUpdateRedelegateBoundary request type. + // boundary defines the x/tx-boundary parameters to update. // - // Since: cosmos-sdk 0.47 - message MsgUpdateRedelegateBoundary { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "centauri/x/txboundary/MsgUpdateDelegateBoundary"; - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // boundary defines the x/tx-boundary parameters to update. - // - // NOTE: All parameters must be supplied. - Boundary boundary = 2 - [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; - } - - // MsgUpdateRedelegateBoundaryResponse defines the response structure for executing a - // MsgUpdateRedelegateBoundary message. + // NOTE: All parameters must be supplied. + Boundary boundary = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// MsgUpdateDelegateBoundaryResponse defines the response structure for +// executing a MsgUpdateDelegateBoundary message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateDelegateBoundaryResponse {} + +// MsgUpdateRedelegateBoundary is the Msg/MsgUpdateRedelegateBoundary request +// type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateRedelegateBoundary { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "centauri/x/txboundary/MsgUpdateDelegateBoundary"; + + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // boundary defines the x/tx-boundary parameters to update. // - // Since: cosmos-sdk 0.47 - message MsgUpdateRedelegateBoundaryResponse {} \ No newline at end of file + // NOTE: All parameters must be supplied. + Boundary boundary = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// MsgUpdateRedelegateBoundaryResponse defines the response structure for +// executing a MsgUpdateRedelegateBoundary message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateRedelegateBoundaryResponse {} \ No newline at end of file diff --git a/scripts/relayer_hermes/config_compose_gaia.toml b/scripts/relayer_hermes/config_compose_gaia.toml index bb16d2a16..4f57debbd 100644 --- a/scripts/relayer_hermes/config_compose_gaia.toml +++ b/scripts/relayer_hermes/config_compose_gaia.toml @@ -100,7 +100,7 @@ port = 4001 id = 'gaiad-t1' rpc_addr = 'http://localhost:3241' grpc_addr = 'http://localhost:3242' -websocket_addr = 'ws://localhost:3241/websocket' # ws://135.181.59.162:26657/websocket +event_source = { mode = 'push', url = 'ws://localhost:3241/websocket', batch_delay = '500ms' } rpc_timeout = '10s' account_prefix = 'cosmos' key_name = 'bob' @@ -120,7 +120,7 @@ trust_threshold = { numerator = '1', denominator = '3' } id = 'centaurid-t1' rpc_addr = 'http://127.0.0.1:2241' grpc_addr = 'http://127.0.0.1:2242' -websocket_addr = 'ws://127.0.0.1:2241/websocket' +event_source = { mode = 'push', url = 'ws://127.0.0.1:2241/websocket', batch_delay = '500ms' } rpc_timeout = '10s' account_prefix = 'centauri' key_name = 'alice' diff --git a/testnode.sh b/testnode.sh index 34f2fda31..a1bf9649d 100644 --- a/testnode.sh +++ b/testnode.sh @@ -44,4 +44,4 @@ sed -i'' -e 's/max_body_bytes = /max_body_bytes = 1/g' ~/.banksy/config/config.t cat $HOME/.banksy/config/genesis.json | jq '.app_state["gov"]["params"]["voting_period"]="45s"' > $HOME/.banksy/config/tmp_genesis.json && mv $HOME/.banksy/config/tmp_genesis.json $HOME/.banksy/config/genesis.json # Start the node (remove the --pruning=nothing flag if historical queries are not needed) -# centaurid start --pruning=nothing --minimum-gas-prices=0stake +centaurid start --pruning=nothing --minimum-gas-prices=0stake diff --git a/tests/interchaintest/basic_cosmos_test.go b/tests/interchaintest/basic_cosmos_test.go index 1e6db8367..155391a8b 100644 --- a/tests/interchaintest/basic_cosmos_test.go +++ b/tests/interchaintest/basic_cosmos_test.go @@ -21,7 +21,7 @@ func TestBasicCentauri(t *testing.T) { ctx := context.Background() - // Create chain factory with Centauri + // Create chain factory with centauri numVals := 3 numFullNodes := 3 diff --git a/tests/interchaintest/go.mod b/tests/interchaintest/go.mod index 06fe7316b..8c2b76f4e 100644 --- a/tests/interchaintest/go.mod +++ b/tests/interchaintest/go.mod @@ -188,15 +188,15 @@ require ( go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.10.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.5.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.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 golang.org/x/tools v0.9.1 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.111.0 // indirect diff --git a/tests/interchaintest/go.sum b/tests/interchaintest/go.sum index da7cc0538..377581518 100644 --- a/tests/interchaintest/go.sum +++ b/tests/interchaintest/go.sum @@ -1087,8 +1087,8 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +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= @@ -1190,8 +1190,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.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +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= @@ -1332,13 +1332,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.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.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.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +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= @@ -1349,8 +1349,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +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= diff --git a/tests/interchaintest/polkadot_chain_test.go b/tests/interchaintest/polkadot_chain_test.go index 6022acbb2..7dd018819 100644 --- a/tests/interchaintest/polkadot_chain_test.go +++ b/tests/interchaintest/polkadot_chain_test.go @@ -14,7 +14,7 @@ import ( "go.uber.org/zap/zaptest" ) -func TestPolkadotComposableChainStart(t *testing.T) { +func TestPolkadotCentauriChainStart(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") } diff --git a/tests/interchaintest/push_wasm_client_code_test.go b/tests/interchaintest/push_wasm_client_code_test.go index 0ee27ba42..4a23cf749 100644 --- a/tests/interchaintest/push_wasm_client_code_test.go +++ b/tests/interchaintest/push_wasm_client_code_test.go @@ -143,7 +143,7 @@ func TestPushWasmClientCode(t *testing.T) { _, err = cosmos.PollForProposalStatus(ctx, centauridChain, height, height+heightDelta, proposalTx.ProposalID, cosmos.ProposalStatusPassed) require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") - err = testutil.WaitForBlocks(ctx, 2, centaurid) + err = testutil.WaitForBlocks(ctx, 2, centauridChain) require.NoError(t, err) var getCodeQueryMsgRsp GetCodeQueryMsgResponse diff --git a/tests/interchaintest/upgrade_chain_test.go b/tests/interchaintest/upgrade_chain_test.go index 43c594cac..acd90d172 100644 --- a/tests/interchaintest/upgrade_chain_test.go +++ b/tests/interchaintest/upgrade_chain_test.go @@ -20,7 +20,7 @@ const ( func TestCentauriUpgrade(t *testing.T) { repo, version := GetDockerImageInfo() - CosmosChainUpgradeTest(t, repo, version, "v5") + CosmosChainUpgradeTest(t, repo, version, "v6") } func CosmosChainUpgradeTest(t *testing.T, upgradeContainerRepo, upgradeVersion, upgradeName string) { @@ -39,7 +39,7 @@ func CosmosChainUpgradeTest(t *testing.T, upgradeContainerRepo, upgradeVersion, Images: []ibc.DockerImage{ { Repository: "ghcr.io/notional-labs/centauri", - Version: "4.5.1", + Version: "6.0", UidGid: "1025:1025", }, }, diff --git a/x/ibc-hooks/client/cli/query.go b/x/ibc-hooks/client/cli/query.go index d50b33721..7b8cc8baa 100644 --- a/x/ibc-hooks/client/cli/query.go +++ b/x/ibc-hooks/client/cli/query.go @@ -9,9 +9,9 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/x/ibc-hooks/keeper" + "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper" - "github.com/notional-labs/centauri/v5/x/ibc-hooks/types" + "github.com/notional-labs/composable/v6/x/ibc-hooks/types" ) func indexRunCmd(cmd *cobra.Command, _ []string) error { diff --git a/x/ibc-hooks/keeper/keeper.go b/x/ibc-hooks/keeper/keeper.go index ce62455b2..2462a130f 100644 --- a/x/ibc-hooks/keeper/keeper.go +++ b/x/ibc-hooks/keeper/keeper.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - "github.com/notional-labs/centauri/v5/x/ibc-hooks/types" + "github.com/notional-labs/composable/v6/x/ibc-hooks/types" ) type ( diff --git a/x/ibc-hooks/module.go b/x/ibc-hooks/module.go index 3ccf43cc5..779f67846 100644 --- a/x/ibc-hooks/module.go +++ b/x/ibc-hooks/module.go @@ -10,8 +10,8 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/x/ibc-hooks/client/cli" - "github.com/notional-labs/centauri/v5/x/ibc-hooks/types" + "github.com/notional-labs/composable/v6/x/ibc-hooks/client/cli" + "github.com/notional-labs/composable/v6/x/ibc-hooks/types" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/ibc-hooks/relay_test.go b/x/ibc-hooks/relay_test.go index a76b2c2dc..338ed6603 100644 --- a/x/ibc-hooks/relay_test.go +++ b/x/ibc-hooks/relay_test.go @@ -10,8 +10,8 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/stretchr/testify/suite" - customibctesting "github.com/notional-labs/centauri/v5/app/ibctesting" - ibchookskeeper "github.com/notional-labs/centauri/v5/x/ibc-hooks/keeper" + customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" + ibchookskeeper "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper" ) // TODO: use testsuite here. diff --git a/x/ibc-hooks/wasm_hook.go b/x/ibc-hooks/wasm_hook.go index a69a3b5bb..bc239f02c 100644 --- a/x/ibc-hooks/wasm_hook.go +++ b/x/ibc-hooks/wasm_hook.go @@ -11,8 +11,8 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v5/x/ibc-hooks/keeper" - "github.com/notional-labs/centauri/v5/x/ibc-hooks/types" + "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" diff --git a/x/mint/abci.go b/x/mint/abci.go index fa4579202..c24f80747 100644 --- a/x/mint/abci.go +++ b/x/mint/abci.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/mint/keeper" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/keeper" + "github.com/notional-labs/composable/v6/x/mint/types" ) // BeginBlocker mints new tokens for the previous block. diff --git a/x/mint/client/cli/query.go b/x/mint/client/cli/query.go index e8ea5154a..b04d2d120 100644 --- a/x/mint/client/cli/query.go +++ b/x/mint/client/cli/query.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) // GetQueryCmd returns the cli query commands for the minting module. diff --git a/x/mint/client/cli/tx.go b/x/mint/client/cli/tx.go index 1c89d5367..3fb5b9dc7 100644 --- a/x/mint/client/cli/tx.go +++ b/x/mint/client/cli/tx.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) // GetTxCmd returns the tx commands for mint diff --git a/x/mint/keeper/genesis.go b/x/mint/keeper/genesis.go index c81cd6e8f..570ebecb3 100644 --- a/x/mint/keeper/genesis.go +++ b/x/mint/keeper/genesis.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) // InitGenesis new mint genesis diff --git a/x/mint/keeper/grpc_query.go b/x/mint/keeper/grpc_query.go index 0ce76b45c..88c1131c5 100644 --- a/x/mint/keeper/grpc_query.go +++ b/x/mint/keeper/grpc_query.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index cd9e95606..70ff6ddf3 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -10,7 +10,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) // Keeper of the mint store diff --git a/x/mint/keeper/msg_server.go b/x/mint/keeper/msg_server.go index 89a6c2876..4feafae33 100644 --- a/x/mint/keeper/msg_server.go +++ b/x/mint/keeper/msg_server.go @@ -8,7 +8,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) var _ types.MsgServer = msgServer{} @@ -70,10 +70,6 @@ func (ms msgServer) FundModuleAccount(goCtx context.Context, req *types.MsgFundM func (ms msgServer) AddAccountToFundModuleSet(goCtx context.Context, req *types.MsgAddAccountToFundModuleSet) (*types.MsgAddAccountToFundModuleSetResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - err := req.ValidateBasic() - if err != nil { - return nil, errorsmod.Wrapf(types.ErrValidationMsg, "invalid req msg %v - err %v", req, err) - } if ms.authority != req.Authority { return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, req.Authority) diff --git a/x/mint/module.go b/x/mint/module.go index 1769e9d05..5205a408d 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -16,10 +16,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/notional-labs/centauri/v5/x/mint/client/cli" - "github.com/notional-labs/centauri/v5/x/mint/keeper" - "github.com/notional-labs/centauri/v5/x/mint/simulation" - "github.com/notional-labs/centauri/v5/x/mint/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" + "github.com/notional-labs/composable/v6/x/mint/types" ) var ( diff --git a/x/mint/simulation/decoder.go b/x/mint/simulation/decoder.go index 14f17c7db..c8128bcfc 100644 --- a/x/mint/simulation/decoder.go +++ b/x/mint/simulation/decoder.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's diff --git a/x/mint/simulation/decoder_test.go b/x/mint/simulation/decoder_test.go index f8d51a8c8..36a0f4708 100644 --- a/x/mint/simulation/decoder_test.go +++ b/x/mint/simulation/decoder_test.go @@ -10,8 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/notional-labs/centauri/v5/x/mint/simulation" - centauriminttypes "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/simulation" + composableminttypes "github.com/notional-labs/composable/v6/x/mint/types" ) func TestDecodeStore(t *testing.T) { @@ -20,7 +20,7 @@ func TestDecodeStore(t *testing.T) { kvPairs := kv.Pairs{ Pairs: []kv.Pair{ - {Key: centauriminttypes.MinterKey, Value: cdc.MustMarshal(¢auriminttypes.Minter{Inflation: sdk.NewDec(13), AnnualProvisions: sdk.NewDec(1)})}, + {Key: composableminttypes.MinterKey, Value: cdc.MustMarshal(&composableminttypes.Minter{Inflation: sdk.NewDec(13), AnnualProvisions: sdk.NewDec(1)})}, {Key: []byte{0x99}, Value: []byte{0x99}}, }, } @@ -29,7 +29,7 @@ func TestDecodeStore(t *testing.T) { name string expectedLog string }{ - {"Minter", fmt.Sprintf("%v\n%v", centauriminttypes.Minter{Inflation: sdk.NewDec(13), AnnualProvisions: sdk.NewDec(1)}, centauriminttypes.Minter{Inflation: sdk.NewDec(13), AnnualProvisions: sdk.NewDec(1)})}, + {"Minter", fmt.Sprintf("%v\n%v", composableminttypes.Minter{Inflation: sdk.NewDec(13), AnnualProvisions: sdk.NewDec(1)}, composableminttypes.Minter{Inflation: sdk.NewDec(13), AnnualProvisions: sdk.NewDec(1)})}, {"other", ""}, } for i, tt := range tests { diff --git a/x/mint/simulation/genesis.go b/x/mint/simulation/genesis.go index 8aba1bcc2..f63d39818 100644 --- a/x/mint/simulation/genesis.go +++ b/x/mint/simulation/genesis.go @@ -9,7 +9,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) // Simulation parameter constants diff --git a/x/mint/simulation/genesis_test.go b/x/mint/simulation/genesis_test.go index 984c38581..57700280a 100644 --- a/x/mint/simulation/genesis_test.go +++ b/x/mint/simulation/genesis_test.go @@ -14,8 +14,8 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/mint" - "github.com/notional-labs/centauri/v5/x/mint/simulation" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/simulation" + "github.com/notional-labs/composable/v6/x/mint/types" ) // TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. diff --git a/x/mint/simulation/proposals.go b/x/mint/simulation/proposals.go index d98b8d360..dc28440e5 100644 --- a/x/mint/simulation/proposals.go +++ b/x/mint/simulation/proposals.go @@ -8,7 +8,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/types" ) // Simulation operation weights constants diff --git a/x/mint/simulation/proposals_test.go b/x/mint/simulation/proposals_test.go index 56d62c167..69aca951a 100644 --- a/x/mint/simulation/proposals_test.go +++ b/x/mint/simulation/proposals_test.go @@ -11,8 +11,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/address" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/notional-labs/centauri/v5/x/mint/simulation" - "github.com/notional-labs/centauri/v5/x/mint/types" + "github.com/notional-labs/composable/v6/x/mint/simulation" + "github.com/notional-labs/composable/v6/x/mint/types" ) func TestProposalMsgs(t *testing.T) { diff --git a/x/mint/types/codec.go b/x/mint/types/codec.go index bfb5e25f6..5032b1376 100644 --- a/x/mint/types/codec.go +++ b/x/mint/types/codec.go @@ -27,10 +27,10 @@ func init() { // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(Params{}, "centauri/x/mintParams", nil) - legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "centauri/MsgUpdateParams") - cdc.RegisterConcrete(&MsgFundModuleAccount{}, "centauri/FundModuleAccount", nil) - cdc.RegisterConcrete(&MsgAddAccountToFundModuleSet{}, "centauri/MsgAddAccountToFundModuleSet", nil) + cdc.RegisterConcrete(Params{}, "composable/x/mintParams", nil) + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "composable/MsgUpdateParams") + cdc.RegisterConcrete(&MsgFundModuleAccount{}, "composable/FundModuleAccount", nil) + cdc.RegisterConcrete(&MsgAddAccountToFundModuleSet{}, "composable/MsgAddAccountToFundModuleSet", nil) } // RegisterInterfaces registers the interfaces types with the interface registry. diff --git a/x/mint/types/msg.go b/x/mint/types/msg.go index 7e212589d..4e81a18be 100644 --- a/x/mint/types/msg.go +++ b/x/mint/types/msg.go @@ -68,14 +68,14 @@ func (m MsgAddAccountToFundModuleSet) GetSignBytes() []byte { // ValidateBasic does a sanity check on the provided data. func (m MsgAddAccountToFundModuleSet) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(m.AllowedAddress) + _, err := sdk.AccAddressFromBech32(m.Authority) if err != nil { - return errorsmod.Wrap(err, "from address must be valid address") + return errorsmod.Wrap(err, "authority must be valid address") } _, err = sdk.AccAddressFromBech32(m.AllowedAddress) if err != nil { - return errorsmod.Wrap(err, "from address must be valid address") + return errorsmod.Wrap(err, "allowed address must be valid address") } return nil diff --git a/x/ratelimit/client/cli/query.go b/x/ratelimit/client/cli/query.go index 863873fcd..968b20a08 100644 --- a/x/ratelimit/client/cli/query.go +++ b/x/ratelimit/client/cli/query.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) // GetQueryCmd returns the cli query commands for this module. diff --git a/x/ratelimit/client/cli/tx.go b/x/ratelimit/client/cli/tx.go index f4bdde62b..227ae30af 100644 --- a/x/ratelimit/client/cli/tx.go +++ b/x/ratelimit/client/cli/tx.go @@ -5,13 +5,13 @@ import ( "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) // GetTxCmd returns the tx commands for router func GetTxCmd() *cobra.Command { txCmd := &cobra.Command{ - Use: "transfermiddleware", + Use: types.ModuleName, DisableFlagParsing: true, SuggestionsMinimumDistance: 2, Short: fmt.Sprintf("Tx commands for the %s module", types.ModuleName), diff --git a/x/ratelimit/ibc_middleware.go b/x/ratelimit/ibc_middleware.go index 9e3d6904f..f22829935 100644 --- a/x/ratelimit/ibc_middleware.go +++ b/x/ratelimit/ibc_middleware.go @@ -3,7 +3,7 @@ package ratelimit import ( "fmt" - "github.com/notional-labs/centauri/v5/x/ratelimit/keeper" + "github.com/notional-labs/composable/v6/x/ratelimit/keeper" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/ratelimit/keeper/abci.go b/x/ratelimit/keeper/abci.go index 2f097721a..a3789e223 100644 --- a/x/ratelimit/keeper/abci.go +++ b/x/ratelimit/keeper/abci.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) // BeginBlocker of epochs module. diff --git a/x/ratelimit/keeper/epoch.go b/x/ratelimit/keeper/epoch.go index bb993ce56..0039c067a 100644 --- a/x/ratelimit/keeper/epoch.go +++ b/x/ratelimit/keeper/epoch.go @@ -6,7 +6,7 @@ import ( "github.com/gogo/protobuf/proto" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/ratelimit/keeper/genesis.go b/x/ratelimit/keeper/genesis.go index 1f50a23ad..0b64c87ff 100644 --- a/x/ratelimit/keeper/genesis.go +++ b/x/ratelimit/keeper/genesis.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { diff --git a/x/ratelimit/keeper/grpc_query.go b/x/ratelimit/keeper/grpc_query.go index 87ff085c6..2aee780d2 100644 --- a/x/ratelimit/keeper/grpc_query.go +++ b/x/ratelimit/keeper/grpc_query.go @@ -8,7 +8,7 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/ratelimit/keeper/keeper.go b/x/ratelimit/keeper/keeper.go index d2b8cc24b..243241ca4 100644 --- a/x/ratelimit/keeper/keeper.go +++ b/x/ratelimit/keeper/keeper.go @@ -10,8 +10,8 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" - tfmwkeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" + "github.com/notional-labs/composable/v6/x/ratelimit/types" + tfmwkeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) type Keeper struct { diff --git a/x/ratelimit/keeper/msg_server.go b/x/ratelimit/keeper/msg_server.go index 3ea6ce7d9..c2f91c744 100644 --- a/x/ratelimit/keeper/msg_server.go +++ b/x/ratelimit/keeper/msg_server.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) var _ types.MsgServer = msgServer{} diff --git a/x/ratelimit/keeper/packet.go b/x/ratelimit/keeper/packet.go index a023960b8..85e8510ab 100644 --- a/x/ratelimit/keeper/packet.go +++ b/x/ratelimit/keeper/packet.go @@ -14,7 +14,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) type RateLimitedPacketInfo struct { diff --git a/x/ratelimit/keeper/rate_limit.go b/x/ratelimit/keeper/rate_limit.go index 184c8bb10..8ef5514d8 100644 --- a/x/ratelimit/keeper/rate_limit.go +++ b/x/ratelimit/keeper/rate_limit.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) // Get the rate limit byte key built from the denom and channelID diff --git a/x/ratelimit/module.go b/x/ratelimit/module.go index e523d8f91..70a96f533 100644 --- a/x/ratelimit/module.go +++ b/x/ratelimit/module.go @@ -16,9 +16,9 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/x/ratelimit/client/cli" - "github.com/notional-labs/centauri/v5/x/ratelimit/keeper" - "github.com/notional-labs/centauri/v5/x/ratelimit/types" + "github.com/notional-labs/composable/v6/x/ratelimit/client/cli" + "github.com/notional-labs/composable/v6/x/ratelimit/keeper" + "github.com/notional-labs/composable/v6/x/ratelimit/types" ) var ( diff --git a/x/ratelimit/relay_test.go b/x/ratelimit/relay_test.go index ca821bb30..1e2b090ce 100644 --- a/x/ratelimit/relay_test.go +++ b/x/ratelimit/relay_test.go @@ -8,8 +8,8 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/stretchr/testify/suite" - customibctesting "github.com/notional-labs/centauri/v5/app/ibctesting" - ratelimittypes "github.com/notional-labs/centauri/v5/x/ratelimit/types" + customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" + ratelimittypes "github.com/notional-labs/composable/v6/x/ratelimit/types" ) type RateLimitTestSuite struct { diff --git a/x/ratelimit/types/codec.go b/x/ratelimit/types/codec.go index 9902cbe95..a9d5d4676 100644 --- a/x/ratelimit/types/codec.go +++ b/x/ratelimit/types/codec.go @@ -16,10 +16,10 @@ import ( // RegisterLegacyAminoCodec registers the account interfaces and concrete types on the // provided LegacyAmino codec. These types are used for Amino JSON serialization func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - legacy.RegisterAminoMsg(cdc, &MsgAddRateLimit{}, "centauri/MsgAddRateLimit") - legacy.RegisterAminoMsg(cdc, &MsgUpdateRateLimit{}, "centauri/MsgUpdateRateLimit") - legacy.RegisterAminoMsg(cdc, &MsgRemoveRateLimit{}, "centauri/MsgRemoveRateLimit") - legacy.RegisterAminoMsg(cdc, &MsgResetRateLimit{}, "centauri/MsgResetRateLimit") + legacy.RegisterAminoMsg(cdc, &MsgAddRateLimit{}, "composable/MsgAddRateLimit") + legacy.RegisterAminoMsg(cdc, &MsgUpdateRateLimit{}, "composable/MsgUpdateRateLimit") + legacy.RegisterAminoMsg(cdc, &MsgRemoveRateLimit{}, "composable/MsgRemoveRateLimit") + legacy.RegisterAminoMsg(cdc, &MsgResetRateLimit{}, "composable/MsgResetRateLimit") } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { diff --git a/x/ratelimit/types/query.pb.go b/x/ratelimit/types/query.pb.go index e78b01bde..d786e1025 100644 --- a/x/ratelimit/types/query.pb.go +++ b/x/ratelimit/types/query.pb.go @@ -111,7 +111,7 @@ func (m *QueryAllRateLimitsResponse) GetRateLimits() []RateLimit { type QueryRateLimitRequest struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty"` + ChannelID string `protobuf:"bytes,2,opt,name=ChannelID,proto3" json:"ChannelID,omitempty"` } func (m *QueryRateLimitRequest) Reset() { *m = QueryRateLimitRequest{} } @@ -294,7 +294,7 @@ func (m *QueryRateLimitsByChainIDResponse) GetRateLimits() []RateLimit { } type QueryRateLimitsByChannelIDRequest struct { - ChannelID string `protobuf:"bytes,1,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty"` + ChannelID string `protobuf:"bytes,1,opt,name=ChannelID,proto3" json:"ChannelID,omitempty"` } func (m *QueryRateLimitsByChannelIDRequest) Reset() { *m = QueryRateLimitsByChannelIDRequest{} } @@ -479,46 +479,46 @@ func init() { } var fileDescriptor_b0fc123b957ea496 = []byte{ - // 613 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x4f, 0x6f, 0xd3, 0x30, - 0x18, 0xc6, 0xeb, 0xc1, 0x18, 0x7d, 0xc7, 0x0e, 0x98, 0x0d, 0xb6, 0x00, 0x59, 0x09, 0x6c, 0x1a, - 0x54, 0x34, 0x6a, 0xab, 0x71, 0xd9, 0xf8, 0xb3, 0xb2, 0x4b, 0xa5, 0x1e, 0xa0, 0x17, 0x24, 0x24, - 0xa8, 0xdc, 0xc6, 0x6a, 0x83, 0xba, 0x38, 0x8b, 0x5d, 0xa0, 0x42, 0xbb, 0x20, 0x71, 0x47, 0xe2, - 0x3b, 0x70, 0xe5, 0x43, 0x70, 0xa9, 0xc4, 0x81, 0x49, 0x5c, 0x38, 0x21, 0xd4, 0xf2, 0x41, 0x50, - 0x1c, 0x27, 0xa5, 0x5d, 0x1b, 0xda, 0x4a, 0xbb, 0x39, 0xf6, 0xfb, 0x3c, 0xfe, 0xbd, 0x8e, 0x9f, - 0x04, 0x36, 0x6b, 0xd4, 0x11, 0xa4, 0xe5, 0xd9, 0xa6, 0x47, 0x04, 0x6d, 0xda, 0x07, 0xb6, 0x30, - 0x5f, 0x67, 0xab, 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, 0x88, - 0xe4, 0xe0, 0x9d, 0xc9, 0x41, 0x4e, 0xa4, 0x55, 0xdb, 0x9d, 0x4d, 0xac, 0xfa, 0xc9, 0xca, 0x7e, - 0xd2, 0xf8, 0x76, 0xfc, 0x61, 0xcb, 0x86, 0xe4, 0x17, 0xe1, 0x08, 0x7f, 0x43, 0xb0, 0x32, 0x32, - 0x49, 0xf8, 0xfe, 0xb4, 0x28, 0x03, 0x29, 0xd6, 0x1e, 0xcc, 0x2a, 0x57, 0xbd, 0xe4, 0x65, 0x2f, - 0x77, 0x71, 0x7a, 0x82, 0x5e, 0xc2, 0x97, 0x83, 0xbf, 0x23, 0xb8, 0x32, 0x26, 0x7b, 0xf8, 0xe1, - 0x24, 0x37, 0x38, 0x26, 0xdd, 0xda, 0xa3, 0xd9, 0x0d, 0x26, 0x79, 0x3f, 0x6f, 0xfa, 0xca, 0x0a, - 0x09, 0xa5, 0x85, 0x74, 0xa7, 0xab, 0xa3, 0xe3, 0xae, 0x8e, 0x7e, 0x77, 0x75, 0xf4, 0xb1, 0xa7, - 0x27, 0x8e, 0x7b, 0x7a, 0xe2, 0x67, 0x4f, 0x4f, 0x3c, 0xbf, 0xf8, 0xf6, 0x1f, 0xb1, 0x68, 0xbb, - 0x94, 0x57, 0xcf, 0xc9, 0x9f, 0x69, 0xfe, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0x22, 0x2b, - 0xa5, 0xf2, 0x07, 0x00, 0x00, + // 620 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xcd, 0x16, 0x4a, 0xc9, 0x94, 0x1e, 0x58, 0x5a, 0x68, 0x0d, 0x72, 0x83, 0xa1, 0x55, 0x69, + 0x50, 0xac, 0x98, 0x8f, 0x03, 0x94, 0x8f, 0xa6, 0xb9, 0x44, 0xea, 0xa1, 0xf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 0xa9, + 0xed, 0xcb, 0xef, 0xff, 0x03, 0xf3, 0xa6, 0x47, 0x59, 0xe5, 0x82, 0xf8, 0xcd, 0xde, 0xfb, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x51, 0xbe, 0x7e, 0xf2, 0x0c, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ratelimit/types/query.pb.gw.go b/x/ratelimit/types/query.pb.gw.go index bad710f6f..9415a3bc1 100644 --- a/x/ratelimit/types/query.pb.gw.go +++ b/x/ratelimit/types/query.pb.gw.go @@ -52,7 +52,7 @@ func local_request_Query_AllRateLimits_0(ctx context.Context, marshaler runtime. } var ( - filter_Query_RateLimit_0 = &utilities.DoubleArray{Encoding: map[string]int{"channel_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_RateLimit_0 = &utilities.DoubleArray{Encoding: map[string]int{"ChannelID": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_RateLimit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -66,15 +66,15 @@ func request_Query_RateLimit_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) - val, ok = pathParams["channel_id"] + val, ok = pathParams["ChannelID"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ChannelID") } protoReq.ChannelID, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ChannelID", err) } if err := req.ParseForm(); err != nil { @@ -100,15 +100,15 @@ func local_request_Query_RateLimit_0(ctx context.Context, marshaler runtime.Mars _ = err ) - val, ok = pathParams["channel_id"] + val, ok = pathParams["ChannelID"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ChannelID") } protoReq.ChannelID, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ChannelID", err) } if err := req.ParseForm(); err != nil { @@ -188,15 +188,15 @@ func request_Query_RateLimitsByChannelID_0(ctx context.Context, marshaler runtim _ = err ) - val, ok = pathParams["channel_id"] + val, ok = pathParams["ChannelID"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ChannelID") } protoReq.ChannelID, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ChannelID", err) } msg, err := client.RateLimitsByChannelID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -215,15 +215,15 @@ func local_request_Query_RateLimitsByChannelID_0(ctx context.Context, marshaler _ = err ) - val, ok = pathParams["channel_id"] + val, ok = pathParams["ChannelID"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ChannelID") } protoReq.ChannelID, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ChannelID", err) } msg, err := server.RateLimitsByChannelID(ctx, &protoReq) @@ -517,11 +517,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_AllRateLimits_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"centauri", "ratelimit", "ratelimits"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RateLimit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"centauri", "ratelimit", "channel_id", "by_denom"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_RateLimit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"centauri", "ratelimit", "ChannelID", "by_denom"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_RateLimitsByChainID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"centauri", "ratelimit", "ratelimits", "chain_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RateLimitsByChannelID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"centauri", "ratelimit", "ratelimits", "channel_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_RateLimitsByChannelID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"centauri", "ratelimit", "ratelimits", "ChannelID"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AllWhitelistedAddresses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"centauri", "ratelimit", "whitelisted_addresses"}, "", runtime.AssumeColonVerbOpt(false))) ) diff --git a/x/ratelimit/types/ratelimit.pb.go b/x/ratelimit/types/ratelimit.pb.go index 605f5b4ef..0ef153ed1 100644 --- a/x/ratelimit/types/ratelimit.pb.go +++ b/x/ratelimit/types/ratelimit.pb.go @@ -51,7 +51,7 @@ func (PacketDirection) EnumDescriptor() ([]byte, []int) { type Path struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty"` + ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` } func (m *Path) Reset() { *m = Path{} } @@ -313,41 +313,42 @@ func init() { } var fileDescriptor_825b72046a6cedeb = []byte{ - // 544 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xd1, 0x6a, 0x13, 0x4d, - 0x14, 0xde, 0x6d, 0x37, 0xf9, 0xff, 0x4c, 0x6c, 0x1b, 0x87, 0x5a, 0x42, 0xc0, 0x6d, 0x0c, 0x28, - 0xa5, 0xe2, 0x86, 0x56, 0x41, 0xc4, 0xab, 0xb4, 0x4d, 0x69, 0xb1, 0x48, 0xdc, 0x48, 0x15, 0x6f, - 0x96, 0xc9, 0xce, 0x31, 0x3b, 0x34, 0x3b, 0x13, 0x67, 0x67, 0xd3, 0xf8, 0x06, 0x5e, 0x0a, 0x3e, - 0x82, 0x2f, 0xd3, 0xcb, 0x5e, 0x8a, 0x17, 0x45, 0x92, 0x6b, 0xdf, 0x41, 0x66, 0x76, 0xd3, 0x16, - 0x41, 0xc5, 0x78, 0x95, 0x9c, 0x33, 0xdf, 0xf9, 0xe6, 0x7c, 0x67, 0xbe, 0xb3, 0x68, 0x33, 0x04, - 0xae, 0x48, 0x2a, 0x59, 0x53, 0x12, 0x05, 0x03, 0x16, 0x33, 0xd5, 0x1c, 0x6d, 0xf5, 0x40, 0x91, - 0xad, 0xab, 0x8c, 0x37, 0x94, 0x42, 0x09, 0x5c, 0x9b, 0x61, 0xbd, 0xab, 0x93, 0x1c, 0x5b, 0x5b, - 0xed, 0x8b, 0xbe, 0x30, 0xb0, 0xa6, 0xfe, 0x97, 0x55, 0x34, 0x9e, 0x22, 0xa7, 0x43, 0x54, 0x84, - 0x57, 0x51, 0x81, 0x02, 0x17, 0x71, 0xd5, 0xae, 0xdb, 0x1b, 0x25, 0x3f, 0x0b, 0xf0, 0x6d, 0x84, - 0xc2, 0x88, 0x70, 0x0e, 0x83, 0x80, 0xd1, 0xea, 0x82, 0x39, 0x2a, 0xe5, 0x99, 0x43, 0xda, 0x98, - 0xd8, 0xa8, 0xf0, 0x22, 0x15, 0x8a, 0xe0, 0xd7, 0xa8, 0x12, 0x93, 0x71, 0x30, 0x04, 0xa9, 0x3b, - 0x08, 0x12, 0xe0, 0x34, 0x63, 0xda, 0xf1, 0xce, 0x2e, 0xd6, 0xad, 0xaf, 0x17, 0xeb, 0xf7, 0xfa, - 0x4c, 0x45, 0x69, 0xcf, 0x0b, 0x45, 0xdc, 0x0c, 0x45, 0x12, 0x8b, 0x24, 0xff, 0x79, 0x90, 0xd0, - 0x93, 0xa6, 0x7a, 0x3f, 0x84, 0xc4, 0x3b, 0xe4, 0xca, 0x5f, 0x8e, 0xc9, 0xb8, 0x93, 0xd1, 0x74, - 0x81, 0xd3, 0x9f, 0x99, 0x25, 0x84, 0xa3, 0xac, 0x91, 0x7f, 0x61, 0xf6, 0x21, 0x1c, 0xe1, 0xbb, - 0x68, 0x99, 0xa6, 0x92, 0x28, 0x26, 0x78, 0x10, 0x89, 0x54, 0x26, 0xd5, 0xc5, 0xba, 0xbd, 0xe1, - 0xf8, 0x4b, 0xb3, 0xec, 0x81, 0x4e, 0x36, 0xbe, 0xdb, 0xc8, 0xd9, 0x1f, 0x88, 0x53, 0xbc, 0x8f, - 0x8a, 0x8c, 0xbf, 0x1d, 0x88, 0xd3, 0x39, 0x95, 0xe5, 0xd5, 0xf8, 0x00, 0xfd, 0x27, 0x52, 0x65, - 0x88, 0xe6, 0x13, 0x32, 0x2b, 0xc7, 0x5d, 0xb4, 0x34, 0x7b, 0x9e, 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0x89, 0x6b, 0x9f, 0x4f, 0x5c, 0xfb, 0xdb, 0xc4, 0xb5, 0x3f, 0x4e, 0x5d, 0xeb, 0x7c, - 0xea, 0x5a, 0x5f, 0xa6, 0xae, 0xf5, 0xe6, 0xe6, 0xf8, 0xda, 0x17, 0xc2, 0xa8, 0xe9, 0x15, 0xcd, - 0x92, 0x3f, 0xfc, 0x11, 0x00, 0x00, 0xff, 0xff, 0x51, 0xff, 0x42, 0x9e, 0x44, 0x04, 0x00, 0x00, + // 554 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4f, 0x6f, 0xd3, 0x30, + 0x14, 0x4f, 0xb6, 0xb4, 0x50, 0x97, 0x6e, 0xc5, 0x1a, 0x53, 0xd5, 0x43, 0x5a, 0x2a, 0x81, 0xa6, + 0x01, 0xa9, 0x36, 0x90, 0x10, 0xc7, 0xfe, 0x9b, 0x56, 0x98, 0x50, 0x71, 0xd1, 0x40, 0x5c, 0x22, + 0x37, 0x31, 0x8d, 0xb5, 0xc6, 0x2e, 0x8e, 0xd3, 0x95, 0x6f, 0xc0, 0x11, 0x89, 0x8f, 0xc0, 0x97, + 0xd9, 0x71, 0x47, 0xc4, 0xa1, 0x42, 0xed, 0x99, 0xef, 0x80, 0xec, 0xa4, 0xdb, 0x84, 0x04, 0x88, + 0xee, 0xd4, 0xbe, 0xe7, 0xdf, 0xfb, 0xf9, 0xfd, 0xde, 0xfb, 0x39, 0x60, 0xd7, 0x23, 0x4c, 0xe2, + 0x58, 0xd0, 0xba, 0xc0, 0x92, 0x8c, 0x68, 0x48, 0x65, 0x7d, 0xb2, 0x37, 0x20, 0x12, 0xef, 0x5d, + 0x66, 0x9c, 0xb1, 0xe0, 0x92, 0xc3, 0xf2, 0x12, 0xeb, 0x5c, 0x9e, 0xa4, 0xd8, 0xf2, 0xd6, 0x90, + 0x0f, 0xb9, 0x86, 0xd5, 0xd5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x45, 0xb3, 0x6c, 0x7d, 0xfa, 0x6a, 0x1b, 0xcd, 0x07, 0x67, 0x73, 0xdb, 0x3c, 0x9f, 0xdb, + 0xe6, 0x8f, 0xb9, 0x6d, 0x7e, 0x5e, 0xd8, 0xc6, 0xf9, 0xc2, 0x36, 0xbe, 0x2d, 0x6c, 0xe3, 0xdd, + 0xed, 0xe9, 0x95, 0x0f, 0x86, 0x56, 0x33, 0xc8, 0xea, 0x37, 0xff, 0xf8, 0x57, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x3c, 0xa3, 0x98, 0x7f, 0x53, 0x04, 0x00, 0x00, } func (m *Path) Marshal() (dAtA []byte, err error) { diff --git a/x/ratelimit/types/tx.pb.go b/x/ratelimit/types/tx.pb.go index c4e7f9920..6cfeb9763 100644 --- a/x/ratelimit/types/tx.pb.go +++ b/x/ratelimit/types/tx.pb.go @@ -33,13 +33,19 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgAddRateLimit struct { // authority is the address that controls the module (defaults to x/gov unless // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - ChannelID string `protobuf:"bytes,3,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty"` - MaxPercentSend github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=max_percent_send,json=maxPercentSend,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_percent_send"` - MaxPercentRecv github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=max_percent_recv,json=maxPercentRecv,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_percent_recv"` - MinRateLimitAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=min_rate_limit_amount,json=minRateLimitAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_rate_limit_amount"` - DurationHours uint64 `protobuf:"varint,7,opt,name=duration_hours,json=durationHours,proto3" json:"duration_hours,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` + // denom of the token that is limited + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // The channel that is limited when transferr ICS 20 packet of denom + ChannelID string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + // Max rate limit send + MaxPercentSend github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=max_percent_send,json=maxPercentSend,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_percent_send"` + // Max rate limit receive + MaxPercentRecv github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=max_percent_recv,json=maxPercentRecv,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_percent_recv"` + // Duration of rate limit. The rate limit will reset when reach the duration. + DurationHours uint64 `protobuf:"varint,6,opt,name=duration_hours,json=durationHours,proto3" json:"duration_hours,omitempty"` + // Min amount of rate limit (allow transfer max(min-amout, rate-limit)) + MinRateLimitAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=min_rate_limit_amount,json=minRateLimitAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_rate_limit_amount"` } func (m *MsgAddRateLimit) Reset() { *m = MsgAddRateLimit{} } @@ -144,7 +150,7 @@ type MsgUpdateRateLimit struct { // overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - ChannelID string `protobuf:"bytes,3,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty"` + ChannelID string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` MaxPercentSend github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=max_percent_send,json=maxPercentSend,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_percent_send"` MaxPercentRecv github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=max_percent_recv,json=maxPercentRecv,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_percent_recv"` MinRateLimitAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=min_rate_limit_amount,json=minRateLimitAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_rate_limit_amount"` @@ -253,7 +259,7 @@ type MsgRemoveRateLimit struct { // overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - ChannelID string `protobuf:"bytes,3,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty"` + ChannelID string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` } func (m *MsgRemoveRateLimit) Reset() { *m = MsgRemoveRateLimit{} } @@ -351,7 +357,7 @@ type MsgResetRateLimit struct { // overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - ChannelID string `protobuf:"bytes,3,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty"` + ChannelID string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` } func (m *MsgResetRateLimit) Reset() { *m = MsgResetRateLimit{} } @@ -460,43 +466,44 @@ func init() { } var fileDescriptor_6b20911f56917b5f = []byte{ - // 561 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x95, 0x4d, 0x8b, 0x13, 0x31, - 0x1c, 0xc6, 0x3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x73, 0xd0, 0x37, 0x81, 0xb5, 0x08, 0x73, 0xca, 0xfa, 0x83, 0xa1, 0x59, 0x7b, 0x84, 0xf2, - 0xce, 0x5f, 0x60, 0xbd, 0x24, 0xed, 0x5c, 0x9c, 0x69, 0xda, 0xf7, 0x06, 0xd8, 0xd6, 0x65, 0x49, - 0xd4, 0x3f, 0x10, 0xf6, 0x06, 0xd8, 0x59, 0x48, 0x33, 0xc9, 0x7a, 0xf8, 0x2e, 0x07, 0xb2, 0x75, - 0x19, 0xc2, 0x2e, 0x28, 0xd6, 0x30, 0x7e, 0x2a, 0x10, 0x93, 0x2f, 0x89, 0x98, 0xa5, 0xde, 0x77, - 0x96, 0xff, 0x97, 0x9d, 0xb9, 0xa3, 0x69, 0x1d, 0xad, 0x21, 0x9e, 0x24, 0x80, 0x6f, 0x0c, 0x50, - 0x4a, 0xb9, 0x2f, 0x8e, 0xee, 0xac, 0x30, 0x9c, 0xdb, 0x2f, 0xd6, 0x83, 0xf5, 0xf4, 0xbf, 0x64, - 0x48, 0x69, 0xae, 0x9f, 0x61, 0x6e, 0x17, 0xac, 0xcc, 0xb0, 0x64, 0xd7, 0xc0, 0xd7, 0xe0, 0xba, - 0x66, 0xb4, 0x98, 0xe0, 0x60, 0xa5, 0xe3, 0x79, 0xb4, 0xd6, 0xfd, 0xb5, 0xe4, 0x93, 0xf1, 0x4f, - 0xf6, 0xfb, 0x43, 0xdb, 0x38, 0x1b, 0xda, 0xc6, 0xb7, 0xa1, 0x6d, 0x7c, 0x1c, 0xd9, 0x99, 0xb3, - 0x91, 0x9d, 0xf9, 0x32, 0xb2, 0x33, 0x2f, 0xb6, 0xbb, 0xe7, 0x2e, 0x6e, 0x7d, 0xfa, 0x1b, 0x9b, - 0xfa, 0xa6, 0x3d, 0xfa, 0x19, 0x00, 0x00, 0xff, 0xff, 0x62, 0x2e, 0x80, 0x93, 0xdb, 0x07, 0x00, - 0x00, + // 588 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0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a4, 0x2b, 0xef, 0xc7, 0x7a, 0xe6, 0x74, 0xac, 0x67, 0xbe, 0x8c, 0xf5, + 0xcc, 0x8b, 0xad, 0xfe, 0xb9, 0x47, 0x3f, 0xba, 0x1b, 0x5a, 0xf9, 0xe8, 0x95, 0x3e, 0xfc, 0x11, + 0x00, 0x00, 0xff, 0xff, 0x4a, 0x6e, 0xb8, 0xc0, 0x17, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -707,11 +714,6 @@ func (m *MsgAddRateLimit) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.DurationHours != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.DurationHours)) - i-- - dAtA[i] = 0x38 - } { size := m.MinRateLimitAmount.Size() i -= size @@ -721,7 +723,12 @@ func (m *MsgAddRateLimit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a + if m.DurationHours != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.DurationHours)) + i-- + dAtA[i] = 0x30 + } { size := m.MaxPercentRecv.Size() i -= size @@ -1058,11 +1065,11 @@ func (m *MsgAddRateLimit) Size() (n int) { n += 1 + l + sovTx(uint64(l)) l = m.MaxPercentRecv.Size() n += 1 + l + sovTx(uint64(l)) - l = m.MinRateLimitAmount.Size() - n += 1 + l + sovTx(uint64(l)) if m.DurationHours != 0 { n += 1 + sovTx(uint64(m.DurationHours)) } + l = m.MinRateLimitAmount.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -1374,6 +1381,25 @@ func (m *MsgAddRateLimit) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationHours", wireType) + } + m.DurationHours = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DurationHours |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MinRateLimitAmount", wireType) } @@ -1407,25 +1433,6 @@ func (m *MsgAddRateLimit) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationHours", wireType) - } - m.DurationHours = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationHours |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/transfermiddleware/client/cli/cli.go b/x/transfermiddleware/client/cli/query.go similarity index 73% rename from x/transfermiddleware/client/cli/cli.go rename to x/transfermiddleware/client/cli/query.go index 6e4aec095..85d03f921 100644 --- a/x/transfermiddleware/client/cli/cli.go +++ b/x/transfermiddleware/client/cli/query.go @@ -8,20 +8,22 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) // GetQueryCmd returns the query commands for router func GetQueryCmd() *cobra.Command { queryCmd := &cobra.Command{ - Use: "transfermiddleware", + Use: types.ModuleName, DisableFlagParsing: true, SuggestionsMinimumDistance: 2, + Short: "Query for transfer middleware module", } queryCmd.AddCommand( GetCmdParaTokenInfo(), GetEscowAddress(), + GetRelayerAccount(), ) return queryCmd @@ -82,6 +84,30 @@ func GetEscowAddress() *cobra.Command { return cmd } +func GetRelayerAccount() *cobra.Command { + cmd := &cobra.Command{ + Use: "relayer-account ", + Short: "Query the relayer account ", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + res, err := queryClient.RelayerAccount(cmd.Context(), &types.QueryIBCWhiteListRequest{}) + if err != nil { + return err + } + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // NewTxCmd returns the transaction commands for router func NewTxCmd() *cobra.Command { return nil diff --git a/x/transfermiddleware/client/cli/tx.go b/x/transfermiddleware/client/cli/tx.go index 65757d25d..2bcccaec1 100644 --- a/x/transfermiddleware/client/cli/tx.go +++ b/x/transfermiddleware/client/cli/tx.go @@ -9,13 +9,13 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) // GetTxCmd returns the tx commands for router func GetTxCmd() *cobra.Command { txCmd := &cobra.Command{ - Use: "transfermiddleware", + Use: types.ModuleName, DisableFlagParsing: true, SuggestionsMinimumDistance: 2, Short: "Registry and remove IBC dotsama chain information", diff --git a/x/transfermiddleware/ibc_ante_test.go b/x/transfermiddleware/ibc_ante_test.go index 5eb3fcd6e..0ba0b9c33 100644 --- a/x/transfermiddleware/ibc_ante_test.go +++ b/x/transfermiddleware/ibc_ante_test.go @@ -12,10 +12,10 @@ import ( wasmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/08-wasm/types" "github.com/stretchr/testify/suite" - customibctesting "github.com/notional-labs/centauri/v5/app/ibctesting" + customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) -var govAuthorityAddress = "centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m" +var govAuthorityAddress = "centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m" // convert from: centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m type TransferTestSuite struct { suite.Suite diff --git a/x/transfermiddleware/ibc_middleware.go b/x/transfermiddleware/ibc_middleware.go index cc00c0c5d..4be08ca44 100644 --- a/x/transfermiddleware/ibc_middleware.go +++ b/x/transfermiddleware/ibc_middleware.go @@ -11,7 +11,7 @@ import ( porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" + "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" ) var _ porttypes.Middleware = &IBCMiddleware{} diff --git a/x/transfermiddleware/keeper/abci.go b/x/transfermiddleware/keeper/abci.go index 4712e28ce..a3f0479d8 100644 --- a/x/transfermiddleware/keeper/abci.go +++ b/x/transfermiddleware/keeper/abci.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) // BeginBlocker of epochs module. diff --git a/x/transfermiddleware/keeper/genesis.go b/x/transfermiddleware/keeper/genesis.go index 0004a28d4..6a4615b7e 100644 --- a/x/transfermiddleware/keeper/genesis.go +++ b/x/transfermiddleware/keeper/genesis.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) // TODO: add init genesis logic diff --git a/x/transfermiddleware/keeper/genesis_test.go b/x/transfermiddleware/keeper/genesis_test.go index 0084b58bd..ca352b56c 100644 --- a/x/transfermiddleware/keeper/genesis_test.go +++ b/x/transfermiddleware/keeper/genesis_test.go @@ -5,12 +5,12 @@ import ( "github.com/stretchr/testify/require" - helpers "github.com/notional-labs/centauri/v5/app/helpers" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + helpers "github.com/notional-labs/composable/v6/app/helpers" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) func TestTFMInitGenesis(t *testing.T) { - app := helpers.SetupCentauriAppWithValSet(t) + app := helpers.SetupComposableAppWithValSet(t) ctx := helpers.NewContextForApp(*app) tokenInfos := make([]types.ParachainIBCTokenInfo, 1) @@ -34,7 +34,7 @@ func TestTFMInitGenesis(t *testing.T) { } func TestTFMExportGenesis(t *testing.T) { - app := helpers.SetupCentauriAppWithValSet(t) + app := helpers.SetupComposableAppWithValSet(t) ctx := helpers.NewContextForApp(*app) err := app.TransferMiddlewareKeeper.AddParachainIBCInfo(ctx, "ibc-test", "channel-0", "pica", "1") @@ -55,7 +55,7 @@ func TestTFMExportGenesis(t *testing.T) { } func TestIterateParaTokenInfos(t *testing.T) { - app := helpers.SetupCentauriAppWithValSet(t) + app := helpers.SetupComposableAppWithValSet(t) ctx := helpers.NewContextForApp(*app) err := app.TransferMiddlewareKeeper.AddParachainIBCInfo(ctx, "ibc-test", "channel-0", "pica", "1") diff --git a/x/transfermiddleware/keeper/grpc_query.go b/x/transfermiddleware/keeper/grpc_query.go index cb654fa02..dbf461a9b 100644 --- a/x/transfermiddleware/keeper/grpc_query.go +++ b/x/transfermiddleware/keeper/grpc_query.go @@ -3,10 +3,11 @@ package keeper import ( "context" + "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/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) func (k Keeper) ParaTokenInfo(c context.Context, req *types.QueryParaTokenInfoRequest) (*types.QueryParaTokenInfoResponse, error) { @@ -28,3 +29,30 @@ func (k Keeper) EscrowAddress(_ context.Context, req *types.QueryEscrowAddressRe EscrowAddress: escrowAddress.String(), }, nil } + +func (k Keeper) RelayerAccount(c context.Context, req *types.QueryIBCWhiteListRequest) (*types.QueryIBCWhiteListResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + var whiteList []string + + store := ctx.KVStore(k.storeKey) + prefixStore := prefix.NewStore(store, types.KeyRlyAddress) + + iter := prefixStore.Iterator(nil, nil) + defer iter.Close() + + pageRes, err := sdkquery.FilteredPaginate(prefixStore, req.Pagination, func(key, _ []byte, accumulate bool) (bool, error) { + if accumulate { + whiteList = append(whiteList, string(key)) + } + return true, nil + }) + if err != nil { + return nil, err + } + + return &types.QueryIBCWhiteListResponse{ + WhiteList: whiteList, + Pagination: pageRes, + }, nil +} diff --git a/x/transfermiddleware/keeper/ics4wrapper.go b/x/transfermiddleware/keeper/ics4wrapper.go index 703ff20c5..14dd2e898 100644 --- a/x/transfermiddleware/keeper/ics4wrapper.go +++ b/x/transfermiddleware/keeper/ics4wrapper.go @@ -12,7 +12,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) func (keeper Keeper) hasParachainIBCTokenInfo(ctx sdk.Context, nativeDenom string) bool { diff --git a/x/transfermiddleware/keeper/keeper.go b/x/transfermiddleware/keeper/keeper.go index e28c11a17..095f33dc0 100644 --- a/x/transfermiddleware/keeper/keeper.go +++ b/x/transfermiddleware/keeper/keeper.go @@ -6,6 +6,7 @@ import ( 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" @@ -14,7 +15,7 @@ import ( 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/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) type Keeper struct { @@ -154,11 +155,39 @@ func (keeper Keeper) SetAllowRlyAddress(ctx sdk.Context, rlyAddress string) { store.Set(types.GetKeyByRlyAddress(rlyAddress), []byte{1}) } +func (keeper Keeper) DeleteAllowRlyAddress(ctx sdk.Context, rlyAddress string) { + store := ctx.KVStore(keeper.storeKey) + store.Delete(types.GetKeyByRlyAddress(rlyAddress)) +} + func (keeper Keeper) HasAllowRlyAddress(ctx sdk.Context, rlyAddress string) bool { store := ctx.KVStore(keeper.storeKey) key := types.GetKeyByRlyAddress(rlyAddress) - return store.Has(key) + if store.Has(key) { + return true + } + + prefixStore := prefix.NewStore(store, types.KeyRlyAddress) + iter := prefixStore.Iterator(nil, nil) + defer iter.Close() + + // there are not records => so it is permissionless + return !iter.Valid() +} + +func (keeper Keeper) IterateAllowRlyAddress(ctx sdk.Context, cb func(rlyAddress string) (stop bool)) { + store := ctx.KVStore(keeper.storeKey) + prefixStore := prefix.NewStore(store, types.KeyRlyAddress) + iterator := sdk.KVStorePrefixIterator(prefixStore, nil) + + defer iterator.Close() + for ; iterator.Valid(); iterator.Next() { + rlyAddress := string(iterator.Key()) + if cb(rlyAddress) { + break + } + } } func (keeper Keeper) HasParachainIBCTokenInfoByNativeDenom(ctx sdk.Context, nativeDenom string) bool { diff --git a/x/transfermiddleware/keeper/msg_server.go b/x/transfermiddleware/keeper/msg_server.go index dba2d76d7..9e303e4d7 100644 --- a/x/transfermiddleware/keeper/msg_server.go +++ b/x/transfermiddleware/keeper/msg_server.go @@ -9,7 +9,7 @@ import ( "cosmossdk.io/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) var _ types.MsgServer = msgServer{} diff --git a/x/transfermiddleware/keeper/params.go b/x/transfermiddleware/keeper/params.go index 890882030..b3905bf87 100644 --- a/x/transfermiddleware/keeper/params.go +++ b/x/transfermiddleware/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { diff --git a/x/transfermiddleware/keeper/relay.go b/x/transfermiddleware/keeper/relay.go index ecaedbd79..35cf2ed90 100644 --- a/x/transfermiddleware/keeper/relay.go +++ b/x/transfermiddleware/keeper/relay.go @@ -6,7 +6,7 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData) error { diff --git a/x/transfermiddleware/module.go b/x/transfermiddleware/module.go index a0421ce3f..1f64a2b79 100644 --- a/x/transfermiddleware/module.go +++ b/x/transfermiddleware/module.go @@ -16,9 +16,9 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/client/cli" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/client/cli" + "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) var ( diff --git a/x/transfermiddleware/pfm_test.go b/x/transfermiddleware/pfm_test.go index 1cef4d519..ce9eb675d 100644 --- a/x/transfermiddleware/pfm_test.go +++ b/x/transfermiddleware/pfm_test.go @@ -13,7 +13,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/stretchr/testify/suite" - customibctesting "github.com/notional-labs/centauri/v5/app/ibctesting" + customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) type PacketMetadata struct { diff --git a/x/transfermiddleware/relay_test.go b/x/transfermiddleware/relay_test.go index 5753e4bdf..fdb27f02f 100644 --- a/x/transfermiddleware/relay_test.go +++ b/x/transfermiddleware/relay_test.go @@ -10,7 +10,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/stretchr/testify/suite" - customibctesting "github.com/notional-labs/centauri/v5/app/ibctesting" + customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) // TODO: use testsuite here. diff --git a/x/transfermiddleware/types/codec.go b/x/transfermiddleware/types/codec.go index 9f32f7abe..523049256 100644 --- a/x/transfermiddleware/types/codec.go +++ b/x/transfermiddleware/types/codec.go @@ -16,9 +16,9 @@ import ( // RegisterLegacyAminoCodec registers the account interfaces and concrete types on the // provided LegacyAmino codec. These types are used for Amino JSON serialization func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - legacy.RegisterAminoMsg(cdc, &MsgAddParachainIBCTokenInfo{}, "centauri/MsgAddParachainInfo") - legacy.RegisterAminoMsg(cdc, &MsgRemoveParachainIBCTokenInfo{}, "centauri/MsgRemoveParachainInfo") - legacy.RegisterAminoMsg(cdc, &MsgAddRlyAddress{}, "centauri/MsgAddRlyAddress") + legacy.RegisterAminoMsg(cdc, &MsgAddParachainIBCTokenInfo{}, "composable/MsgAddParachainInfo") + legacy.RegisterAminoMsg(cdc, &MsgRemoveParachainIBCTokenInfo{}, "composable/MsgRemoveParachainInfo") + legacy.RegisterAminoMsg(cdc, &MsgAddRlyAddress{}, "composable/MsgAddRlyAddress") } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { diff --git a/x/transfermiddleware/types/info_test.go b/x/transfermiddleware/types/info_test.go index aa19f53f3..a0018cbe7 100644 --- a/x/transfermiddleware/types/info_test.go +++ b/x/transfermiddleware/types/info_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/notional-labs/centauri/v5/x/transfermiddleware/types" + "github.com/notional-labs/composable/v6/x/transfermiddleware/types" ) func TestValidateBasic(t *testing.T) { diff --git a/x/transfermiddleware/types/parachain_token_info.pb.go b/x/transfermiddleware/types/parachain_token_info.pb.go index 9f492749f..c20c80a58 100644 --- a/x/transfermiddleware/types/parachain_token_info.pb.go +++ b/x/transfermiddleware/types/parachain_token_info.pb.go @@ -28,13 +28,13 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // ParachainIBCTokenInfo represents information about transferable IBC tokens -// from Parachain. +// from Parachain(Substrate based network). type ParachainIBCTokenInfo struct { // ibc_denom is the denomination of the ibced token transferred from the // dotsama chain. IbcDenom string `protobuf:"bytes,1,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty" yaml:"ibc_denom"` // channel_id is source channel in IBC connection from centauri chain - ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` // native denom is new native minted denom in centauri chain. NativeDenom string `protobuf:"bytes,3,opt,name=native_denom,json=nativeDenom,proto3" json:"native_denom,omitempty" yaml:"native_denom"` // asset id is the id of the asset on Picasso @@ -166,32 +166,33 @@ func init() { } var fileDescriptor_b9cc8ea0d211210f = []byte{ - // 392 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xbf, 0xae, 0xd3, 0x30, - 0x14, 0xc6, 0x63, 0x40, 0x70, 0xeb, 0x22, 0x01, 0xb9, 0xad, 0xa8, 0x82, 0x48, 0x90, 0x59, 0x98, - 0x12, 0x15, 0x3a, 0x75, 0x60, 0x08, 0x2c, 0xd9, 0x50, 0xd4, 0xa9, 0x4b, 0xe4, 0x24, 0x4e, 0x6a, - 0x91, 0xd8, 0x91, 0xe3, 0x16, 0xfa, 0x16, 0x7d, 0x19, 0xde, 0xa1, 0x63, 0x47, 0xa6, 0x80, 0xda, - 0x95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xee, 0x79, 0xdb, 0x38, 0xb7, 0x9a, 0xfb, 0x5b, - 0x45, 0xe1, 0x50, 0xa7, 0xda, 0xd1, 0x85, 0x37, 0xb8, 0xae, 0x89, 0xec, 0xfc, 0x1e, 0x28, 0xee, - 0xb6, 0x6d, 0x9c, 0x27, 0x9a, 0xeb, 0x15, 0x14, 0x3e, 0x52, 0x61, 0x90, 0xa2, 0x6f, 0x00, 0xbe, - 0x08, 0x49, 0xc9, 0x37, 0xe4, 0xfa, 0xd0, 0xff, 0xf6, 0x02, 0xee, 0xd0, 0xcb, 0x12, 0x0e, 0x85, - 0x7a, 0x3a, 0xea, 0x96, 0xac, 0xc6, 0x1f, 0xbe, 0xb5, 0x5c, 0x7d, 0x01, 0xb7, 0xbf, 0x80, 0xbb, - 0xe8, 0x2f, 0xe0, 0xbf, 0xdc, 0x37, 0x8e, 0x71, 0x59, 0x4f, 0x2d, 0xb1, 0x90, 0x8a, 0x45, 0xbb, - 0x1f, 0x0e, 0x08, 0xa1, 0x7e, 0xad, 0xab, 0xf7, 0x67, 0xfb, 0xa3, 0x0d, 0x0e, 0x47, 0x1b, 0xfc, - 0x3c, 0xda, 0x60, 0x77, 0xb2, 0x8d, 0xc3, 0xc9, 0x36, 0xbe, 0x9f, 0x6c, 0x63, 0x69, 0x7d, 0xbd, - 0xf6, 0xab, 0xe4, 0xb6, 0x22, 0x75, 0xfc, 0x50, 0x99, 0xbe, 0xfb, 0x1d, 0x00, 0x00, 0xff, 0xff, - 0xd7, 0x2a, 0x55, 0xb9, 0x81, 0x02, 0x00, 0x00, + // 403 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x31, 0x8f, 0x94, 0x40, + 0x14, 0xc7, 0x19, 0x35, 0x7a, 0xcc, 0x9a, 0xa8, 0xdc, 0x19, 0x2f, 0x18, 0x19, 0x33, 0x36, 0x56, + 0x90, 0x55, 0xab, 0x2b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0x8e, + 0x02, 0x00, 0x00, } func (m *ParachainIBCTokenInfo) Marshal() (dAtA []byte, err error) { diff --git a/x/transfermiddleware/types/query.pb.go b/x/transfermiddleware/types/query.pb.go index baea27af5..72e4d177e 100644 --- a/x/transfermiddleware/types/query.pb.go +++ b/x/transfermiddleware/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -31,7 +32,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // message QueryEscrowAddressRequest type QueryEscrowAddressRequest struct { - ChannelID string `protobuf:"bytes,1,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ChannelID string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` } func (m *QueryEscrowAddressRequest) Reset() { *m = QueryEscrowAddressRequest{} } @@ -169,7 +170,7 @@ func (m *QueryParaTokenInfoRequest) GetNativeDenom() string { // RPC method. type QueryParaTokenInfoResponse struct { IbcDenom string `protobuf:"bytes,1,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty" yaml:"ibc_denom"` - ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` NativeDenom string `protobuf:"bytes,3,opt,name=native_denom,json=nativeDenom,proto3" json:"native_denom,omitempty" yaml:"native_denom"` AssetId string `protobuf:"bytes,4,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty" yaml:"asset_id"` } @@ -235,11 +236,114 @@ func (m *QueryParaTokenInfoResponse) GetAssetId() string { return "" } +// QueryIBCWhiteListRequest is the response type for the QueryIBCWhiteListRequest +// RPC method. +type QueryIBCWhiteListRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryIBCWhiteListRequest) Reset() { *m = QueryIBCWhiteListRequest{} } +func (m *QueryIBCWhiteListRequest) String() string { return proto.CompactTextString(m) } +func (*QueryIBCWhiteListRequest) ProtoMessage() {} +func (*QueryIBCWhiteListRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cc2bc06232cb63aa, []int{4} +} +func (m *QueryIBCWhiteListRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIBCWhiteListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIBCWhiteListRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryIBCWhiteListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIBCWhiteListRequest.Merge(m, src) +} +func (m *QueryIBCWhiteListRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryIBCWhiteListRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIBCWhiteListRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIBCWhiteListRequest proto.InternalMessageInfo + +func (m *QueryIBCWhiteListRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryIBCWhiteListResponse is the response type for the QueryIBCWhiteListRequest +// RPC method. +type QueryIBCWhiteListResponse struct { + WhiteList []string `protobuf:"bytes,1,rep,name=white_list,json=whiteList,proto3" json:"white_list,omitempty" yaml:"white_list"` + // pagination defines an optional pagination for the request. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryIBCWhiteListResponse) Reset() { *m = QueryIBCWhiteListResponse{} } +func (m *QueryIBCWhiteListResponse) String() string { return proto.CompactTextString(m) } +func (*QueryIBCWhiteListResponse) ProtoMessage() {} +func (*QueryIBCWhiteListResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cc2bc06232cb63aa, []int{5} +} +func (m *QueryIBCWhiteListResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIBCWhiteListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIBCWhiteListResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryIBCWhiteListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIBCWhiteListResponse.Merge(m, src) +} +func (m *QueryIBCWhiteListResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryIBCWhiteListResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIBCWhiteListResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIBCWhiteListResponse proto.InternalMessageInfo + +func (m *QueryIBCWhiteListResponse) GetWhiteList() []string { + if m != nil { + return m.WhiteList + } + return nil +} + +func (m *QueryIBCWhiteListResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterType((*QueryEscrowAddressRequest)(nil), "centauri.transfermiddleware.v1beta1.QueryEscrowAddressRequest") proto.RegisterType((*QueryEscrowAddressResponse)(nil), "centauri.transfermiddleware.v1beta1.QueryEscrowAddressResponse") proto.RegisterType((*QueryParaTokenInfoRequest)(nil), "centauri.transfermiddleware.v1beta1.QueryParaTokenInfoRequest") proto.RegisterType((*QueryParaTokenInfoResponse)(nil), "centauri.transfermiddleware.v1beta1.QueryParaTokenInfoResponse") + proto.RegisterType((*QueryIBCWhiteListRequest)(nil), "centauri.transfermiddleware.v1beta1.QueryIBCWhiteListRequest") + proto.RegisterType((*QueryIBCWhiteListResponse)(nil), "centauri.transfermiddleware.v1beta1.QueryIBCWhiteListResponse") } func init() { @@ -247,37 +351,48 @@ func init() { } var fileDescriptor_cc2bc06232cb63aa = []byte{ - // 472 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0x8d, 0xc3, 0xab, 0x19, 0x28, 0x0f, 0xb7, 0x55, 0x89, 0x85, 0x6c, 0x34, 0x6c, 0x58, 0xd9, - 0x0a, 0x74, 0xd5, 0x05, 0x8f, 0x0a, 0x16, 0xd9, 0x51, 0x0b, 0x09, 0x89, 0x05, 0xd1, 0x8d, 0x7d, - 0x1b, 0x46, 0x24, 0x33, 0xee, 0xcc, 0xa4, 0x25, 0x5b, 0xbe, 0x00, 0x89, 0x2f, 0xe1, 0x2f, 0x58, - 0x56, 0x62, 0xc3, 0xca, 0x42, 0x09, 0x7b, 0x84, 0xbf, 0x00, 0xd9, 0x33, 0xa1, 0x4d, 0x6b, 0xa4, - 0xb4, 0xbb, 0xb9, 0x3a, 0x73, 0xce, 0x9c, 0x7b, 0x7d, 0xae, 0x49, 0x94, 0x20, 0xd7, 0x30, 0x96, - 0x2c, 0xd2, 0x12, 0xb8, 0xda, 0x43, 0x39, 0x62, 0x69, 0x3a, 0xc4, 0x43, 0x90, 0x18, 0x1d, 0x74, - 0xfa, 0xa8, 0xa1, 0x13, 0xed, 0x8f, 0x51, 0x4e, 0xc2, 0x4c, 0x0a, 0x2d, 0xdc, 0x07, 0x73, 0x42, - 0x78, 0x96, 0x10, 0x5a, 0x82, 0xb7, 0x3e, 0x10, 0x03, 0x51, 0xdd, 0x8f, 0xca, 0x93, 0xa1, 0x7a, - 0xf7, 0x06, 0x42, 0x0c, 0x86, 0x18, 0x41, 0xc6, 0x22, 0xe0, 0x5c, 0x68, 0xd0, 0x4c, 0x70, 0x65, - 0x50, 0xba, 0x4b, 0xda, 0xbb, 0xe5, 0x3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5f, 0xab, 0x8e, 0xdd, - 0xf4, 0xd1, 0xef, 0x26, 0xb9, 0x52, 0xf5, 0xec, 0x7e, 0x75, 0xc8, 0xea, 0x42, 0xe3, 0xee, 0x93, - 0x70, 0x89, 0xd4, 0x85, 0xff, 0xfd, 0x16, 0xde, 0xd3, 0x0b, 0xf3, 0xcd, 0xc4, 0x69, 0xf0, 0xe9, - 0xfb, 0xaf, 0x2f, 0xcd, 0xb6, 0xbb, 0x79, 0xbc, 0x2f, 0x19, 0x48, 0xd0, 0xe5, 0x45, 0x56, 0x3a, - 0x2c, 0x3d, 0x2f, 0xc4, 0xec, 0x3c, 0x9e, 0xeb, 0x22, 0x7f, 0x1e, 0xcf, 0xb5, 0xf9, 0xae, 0xf3, - 0x6c, 0xe2, 0x6b, 0xe3, 0xbc, 0xb3, 0xf5, 0x6d, 0xea, 0x3b, 0x47, 0x53, 0xdf, 0xf9, 0x39, 0xf5, - 0x9d, 0xcf, 0x33, 0xbf, 0x71, 0x34, 0xf3, 0x1b, 0x3f, 0x66, 0x7e, 0xe3, 0xad, 0xf7, 0xb1, 0xee, - 0x77, 0xa0, 0x27, 0x19, 0xaa, 0xfe, 0xd5, 0x6a, 0x5d, 0x1f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, - 0x9f, 0xa5, 0xa0, 0xee, 0x3a, 0x04, 0x00, 0x00, + // 642 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x4f, 0x13, 0x41, + 0x14, 0x66, 0x01, 0x95, 0x0e, 0x82, 0xba, 0x80, 0x94, 0xc6, 0xec, 0x92, 0x31, 0x51, 0xe2, 0x61, + 0x37, 0x20, 0x27, 0x12, 0x51, 0x0a, 0x6a, 0x9a, 0x78, 0xc0, 0x8d, 0x09, 0x89, 0x07, 0x9a, 0xd9, + 0xdd, 0x47, 0x99, 0xd8, 0xce, 0x94, 0x9d, 0x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0xe3, 0x58, 0x1f, 0x4f, 0x9d, 0xb1, 0x93, 0x53, + 0x67, 0xec, 0xe7, 0xa9, 0x33, 0xf6, 0xb6, 0xf0, 0x3e, 0xeb, 0x7f, 0x40, 0xb6, 0xea, 0x20, 0xc2, + 0xeb, 0xea, 0xed, 0x7d, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x78, 0xf6, 0x39, 0x56, 0x33, 0x06, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -295,6 +410,7 @@ type QueryClient interface { // ParaTokenInfo queries all token info of a native denom. ParaTokenInfo(ctx context.Context, in *QueryParaTokenInfoRequest, opts ...grpc.CallOption) (*QueryParaTokenInfoResponse, error) EscrowAddress(ctx context.Context, in *QueryEscrowAddressRequest, opts ...grpc.CallOption) (*QueryEscrowAddressResponse, error) + RelayerAccount(ctx context.Context, in *QueryIBCWhiteListRequest, opts ...grpc.CallOption) (*QueryIBCWhiteListResponse, error) } type queryClient struct { @@ -323,11 +439,21 @@ func (c *queryClient) EscrowAddress(ctx context.Context, in *QueryEscrowAddressR return out, nil } +func (c *queryClient) RelayerAccount(ctx context.Context, in *QueryIBCWhiteListRequest, opts ...grpc.CallOption) (*QueryIBCWhiteListResponse, error) { + out := new(QueryIBCWhiteListResponse) + err := c.cc.Invoke(ctx, "/centauri.transfermiddleware.v1beta1.Query/RelayerAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // ParaTokenInfo queries all token info of a native denom. ParaTokenInfo(context.Context, *QueryParaTokenInfoRequest) (*QueryParaTokenInfoResponse, error) EscrowAddress(context.Context, *QueryEscrowAddressRequest) (*QueryEscrowAddressResponse, error) + RelayerAccount(context.Context, *QueryIBCWhiteListRequest) (*QueryIBCWhiteListResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -340,6 +466,9 @@ func (*UnimplementedQueryServer) ParaTokenInfo(ctx context.Context, req *QueryPa func (*UnimplementedQueryServer) EscrowAddress(ctx context.Context, req *QueryEscrowAddressRequest) (*QueryEscrowAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EscrowAddress not implemented") } +func (*UnimplementedQueryServer) RelayerAccount(ctx context.Context, req *QueryIBCWhiteListRequest) (*QueryIBCWhiteListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RelayerAccount not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -381,6 +510,24 @@ func _Query_EscrowAddress_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Query_RelayerAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIBCWhiteListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RelayerAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/centauri.transfermiddleware.v1beta1.Query/RelayerAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RelayerAccount(ctx, req.(*QueryIBCWhiteListRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "centauri.transfermiddleware.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -393,6 +540,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "EscrowAddress", Handler: _Query_EscrowAddress_Handler, }, + { + MethodName: "RelayerAccount", + Handler: _Query_RelayerAccount_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "centauri/transfermiddleware/v1beta1/query.proto", @@ -539,6 +690,85 @@ func (m *QueryParaTokenInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *QueryIBCWhiteListRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryIBCWhiteListRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIBCWhiteListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryIBCWhiteListResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryIBCWhiteListResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIBCWhiteListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.WhiteList) > 0 { + for iNdEx := len(m.WhiteList) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhiteList[iNdEx]) + copy(dAtA[i:], m.WhiteList[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.WhiteList[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -614,6 +844,38 @@ func (m *QueryParaTokenInfoResponse) Size() (n int) { return n } +func (m *QueryIBCWhiteListRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryIBCWhiteListResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.WhiteList) > 0 { + for _, s := range m.WhiteList { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1044,6 +1306,210 @@ func (m *QueryParaTokenInfoResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryIBCWhiteListRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryIBCWhiteListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIBCWhiteListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIBCWhiteListResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryIBCWhiteListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIBCWhiteListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhiteList", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WhiteList = append(m.WhiteList, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/transfermiddleware/types/query.pb.gw.go b/x/transfermiddleware/types/query.pb.gw.go index 68f42e5c7..fc3dd1fff 100644 --- a/x/transfermiddleware/types/query.pb.gw.go +++ b/x/transfermiddleware/types/query.pb.gw.go @@ -105,6 +105,42 @@ func local_request_Query_EscrowAddress_0(ctx context.Context, marshaler runtime. } +var ( + filter_Query_RelayerAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_RelayerAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIBCWhiteListRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RelayerAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RelayerAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_RelayerAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIBCWhiteListRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RelayerAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RelayerAccount(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -157,6 +193,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_RelayerAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_RelayerAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RelayerAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -238,6 +297,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_RelayerAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_RelayerAccount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RelayerAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -245,10 +324,14 @@ var ( pattern_Query_ParaTokenInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"centauri", "paratokeninfo"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_EscrowAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"centauri", "escrowaddress"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_RelayerAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"centauri", "ibcwhitelist"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_ParaTokenInfo_0 = runtime.ForwardResponseMessage forward_Query_EscrowAddress_0 = runtime.ForwardResponseMessage + + forward_Query_RelayerAccount_0 = runtime.ForwardResponseMessage ) diff --git a/x/transfermiddleware/types/tx.pb.go b/x/transfermiddleware/types/tx.pb.go index dd5426258..ccb2ba4e3 100644 --- a/x/transfermiddleware/types/tx.pb.go +++ b/x/transfermiddleware/types/tx.pb.go @@ -34,7 +34,7 @@ type MsgAddParachainIBCTokenInfo struct { // authority is the address that controls the module (defaults to x/gov unless // overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` - ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelID,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` IbcDenom string `protobuf:"bytes,3,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty" yaml:"ibc_denom"` NativeDenom string `protobuf:"bytes,4,opt,name=native_denom,json=nativeDenom,proto3" json:"native_denom,omitempty" yaml:"native_denom"` AssetId string `protobuf:"bytes,5,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty" yaml:"asset_id"` @@ -343,40 +343,41 @@ func init() { } var fileDescriptor_2768943d6d1340b4 = []byte{ - // 528 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0xcd, 0x26, 0xbf, 0x1f, 0x34, 0x5b, 0xfe, 0x14, 0xb7, 0xd0, 0xc8, 0x95, 0x1c, 0xb4, 0x15, - 0xa8, 0x42, 0xc8, 0x56, 0x4a, 0x11, 0x52, 0x24, 0x24, 0x9a, 0x72, 0x20, 0x42, 0x91, 0x90, 0xc5, - 0x89, 0x4b, 0xb4, 0xf1, 0x6e, 0x1d, 0x0b, 0x7b, 0x37, 0xda, 0xdd, 0x86, 0xfa, 0x8a, 0xc4, 0x19, - 0xbe, 0x00, 0x57, 0xae, 0x70, 0xe2, 0x33, 0x70, 0xec, 0x91, 0x93, 0x85, 0x92, 0x03, 0x9c, 0xfd, - 0x09, 0x50, 0x6c, 0xc7, 0x09, 0x09, 0x58, 0xa5, 0xf4, 0xe4, 0x59, 0xbd, 0x79, 0x33, 0xef, 0x8d, - 0x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, 0xe5, 0x5f, 0xb7, - 0xe1, 0xfe, 0x5f, 0x4c, 0x63, 0x46, 0xd3, 0x1f, 0x9e, 0x89, 0x36, 0xd5, 0xd1, 0xda, 0xfb, 0x32, - 0x32, 0xc0, 0xc9, 0xc8, 0x00, 0xdf, 0x46, 0x06, 0x78, 0x37, 0x36, 0x4a, 0x27, 0x63, 0xa3, 0xf4, - 0x75, 0x6c, 0x94, 0x5e, 0xe8, 0xc7, 0xbf, 0x7b, 0x57, 0x55, 0x38, 0xa0, 0xb2, 0x77, 0x21, 0x79, - 0xff, 0xee, 0xfd, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x79, 0x27, 0x5d, 0x83, 0x05, 0x00, 0x00, + // 534 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4d, 0x6f, 0xd3, 0x30, + 0x18, 0xae, 0x5b, 0x3e, 0x56, 0x8f, 0x8f, 0x91, 0x4d, 0xac, 0xca, 0xa4, 0x04, 0x79, 0x02, 0x4d, + 0x08, 0x25, 0xea, 0x00, 0x21, 0x55, 0x42, 0xa2, 0xed, 0x0e, 0x54, 0xa8, 0x12, 0x8a, 0x38, 0x71, + 0xa9, 0xdc, 0xd8, 0x4b, 0x23, 0x1a, 0xbb, 0xb2, 0xbd, 0xb2, 0x5e, 0x91, 0x38, 0xc3, 0x1f, 0xe0, + 0xca, 0x15, 0xfe, 0x03, 0x17, 0x8e, 0x3b, 0x72, 0x8a, 0x50, 0x7b, 0x80, 0x73, 0x7f, 0x01, 0x6a, + 0x9c, 0x7e, 0xd0, 0x42, 0x34, 0xc6, 0x4e, 0xb1, 0xf3, 0x3c, 0xcf, 0xeb, 0xe7, 0x79, 0xf3, 0xc6, + 0xf0, 0x9e, 0x4f, 0x99, 0xc2, 0x47, 0x22, 0x74, 0x95, 0xc0, 0x4c, 0x1e, 0x52, 0x11, 0x85, 0x84, + 0x74,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0x31, 0x97, 0x99, 0x8f, 0xcf, 0x24, + 0x9b, 0xfa, 0xa8, 0x3d, 0xf8, 0x3a, 0xb4, 0xc0, 0xc9, 0xd0, 0x02, 0xdf, 0x87, 0x16, 0x78, 0x3f, + 0xb2, 0x72, 0x27, 0x23, 0x2b, 0xf7, 0x6d, 0x64, 0xe5, 0x5e, 0x9a, 0xc7, 0x7f, 0xba, 0x64, 0xd5, + 0xa0, 0x47, 0x65, 0xfb, 0x52, 0x72, 0x19, 0xde, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x4a, + 0x80, 0x1a, 0x90, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tx-boundary/ante/antetest/ante_test.go b/x/tx-boundary/ante/antetest/ante_test.go deleted file mode 100644 index 1e52f0a60..000000000 --- a/x/tx-boundary/ante/antetest/ante_test.go +++ /dev/null @@ -1,246 +0,0 @@ -package antetest - -import ( - "testing" - - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/authz" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - txboundaryAnte "github.com/notional-labs/centauri/v5/x/tx-boundary/ante" - "github.com/notional-labs/centauri/v5/x/tx-boundary/types" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" -) - -func TestAnteTestSuite(t *testing.T) { - suite.Run(t, new(AnteTestSuite)) -} - -func (s *AnteTestSuite) TestStakingAnteBasic() { - _, _, addr1 := testdata.KeyTestPubAddr() - delegateMsg := stakingtypes.NewMsgDelegate(s.delegator, s.validators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))) - msgDelegateAny, err := cdctypes.NewAnyWithValue(delegateMsg) - require.NoError(s.T(), err) - - addr2 := s.delegator - - for _, tc := range []struct { - desc string - txMsg sdk.Msg - malleate func() error - expErr bool - expErrStr string - }{ - { - desc: "Case delegate success", - txMsg: stakingtypes.NewMsgDelegate(s.delegator, s.validators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))), - malleate: func() error { - return nil - }, - expErr: false, - }, - { - desc: "Case redelegate success", - txMsg: stakingtypes.NewMsgBeginRedelegate(s.delegator, s.validators[0].GetOperator(), s.newvalidators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))), - malleate: func() error { - return nil - }, - expErr: false, - }, - { - desc: "Case authz success", - txMsg: &authz.MsgExec{Grantee: addr1.String(), Msgs: []*cdctypes.Any{msgDelegateAny}}, - malleate: func() error { - return nil - }, - expErr: false, - }, - { - desc: "Case delegate failed", - txMsg: stakingtypes.NewMsgDelegate(s.delegator, s.validators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))), - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - expErr: true, - }, - { - desc: "Case redelegate failed", - txMsg: stakingtypes.NewMsgBeginRedelegate(s.delegator, s.validators[0].GetOperator(), s.newvalidators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))), - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - expErr: true, - }, - { - desc: "Case authz failed", - txMsg: &authz.MsgExec{Grantee: addr1.String(), Msgs: []*cdctypes.Any{msgDelegateAny}}, - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - expErr: true, - }, - } { - tc := tc - s.SetupTest() - tc.malleate() - s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() - priv1, _, _ := testdata.KeyTestPubAddr() - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - - mfd := txboundaryAnte.NewStakingPermissionDecorator(s.app.AppCodec(), s.app.TxBoundaryKeepper) - antehandler := sdk.ChainAnteDecorators(mfd) - s.Require().NoError(s.txBuilder.SetMsgs(tc.txMsg)) - - tx, err := s.CreateTestTx(privs, accNums, accSeqs, s.ctx.ChainID()) - s.Require().NoError(err) - _, err = antehandler(s.ctx, tx, false) - if !tc.expErr { - s.Require().NoError(err) - } else { - s.Require().Error(err) - } - } -} - -func (s *AnteTestSuite) TestStakingAnteUpdateLimit() { - _, _, addr1 := testdata.KeyTestPubAddr() - delegateMsg := stakingtypes.NewMsgDelegate(s.delegator, s.validators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))) - - msgDelegateAny, err := cdctypes.NewAnyWithValue(delegateMsg) - require.NoError(s.T(), err) - - addr2 := s.delegator - - for _, tc := range []struct { - desc string - txMsg sdk.Msg - malleate func() error - blocksAdded int64 - expErr bool - expErrStr string - }{ - { - desc: "Case delegate success update limit", - txMsg: stakingtypes.NewMsgDelegate(s.delegator, s.validators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))), - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - blocksAdded: 5, - expErr: false, - }, - { - desc: "Case redelegate success update limit", - txMsg: stakingtypes.NewMsgBeginRedelegate(s.delegator, s.validators[0].GetOperator(), s.newvalidators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))), - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - blocksAdded: 5, - expErr: false, - }, - { - desc: "Case authz success update limit", - txMsg: &authz.MsgExec{Grantee: addr1.String(), Msgs: []*cdctypes.Any{msgDelegateAny}}, - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - blocksAdded: 5, - expErr: false, - }, - { - desc: "Case delegate fail update limit", - txMsg: stakingtypes.NewMsgDelegate(s.delegator, s.validators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))), - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - blocksAdded: 4, - expErr: true, - }, - { - desc: "Case redelegate fail update limit", - txMsg: stakingtypes.NewMsgBeginRedelegate(s.delegator, s.validators[0].GetOperator(), s.newvalidators[0].GetOperator(), sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000))), - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - blocksAdded: 4, - expErr: true, - }, - { - desc: "Case authz success update limit", - txMsg: &authz.MsgExec{Grantee: addr1.String(), Msgs: []*cdctypes.Any{msgDelegateAny}}, - malleate: func() error { - s.app.TxBoundaryKeepper.SetLimitPerAddr(s.ctx, addr2, types.LimitPerAddr{ - DelegateCount: 5, - ReledegateCount: 5, - LatestUpdateBlock: s.ctx.BlockHeight(), - }) - return nil - }, - blocksAdded: 4, - expErr: true, - }, - } { - tc := tc - s.SetupTest() - tc.malleate() - s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() - priv1, _, _ := testdata.KeyTestPubAddr() - privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} - - mfd := txboundaryAnte.NewStakingPermissionDecorator(s.app.AppCodec(), s.app.TxBoundaryKeepper) - antehandler := sdk.ChainAnteDecorators(mfd) - s.Require().NoError(s.txBuilder.SetMsgs(tc.txMsg)) - - tx, err := s.CreateTestTx(privs, accNums, accSeqs, s.ctx.ChainID()) - s.Require().NoError(err) - s.ctx = s.ctx.WithBlockHeight(s.ctx.BlockHeight() + tc.blocksAdded) - _, err = antehandler(s.ctx, tx, false) - if !tc.expErr { - s.Require().NoError(err) - } else { - s.Require().Error(err) - } - } -} diff --git a/x/tx-boundary/ante/antetest/ante_test_setup.go b/x/tx-boundary/ante/antetest/ante_test_setup.go deleted file mode 100644 index 96da98aba..000000000 --- a/x/tx-boundary/ante/antetest/ante_test_setup.go +++ /dev/null @@ -1,127 +0,0 @@ -package antetest - -import ( - "time" - - "cosmossdk.io/math" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - tmtypes "github.com/cometbft/cometbft/types" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/ibc-go/v7/testing/mock" - "github.com/notional-labs/centauri/v5/app" - "github.com/notional-labs/centauri/v5/app/helpers" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" -) - -var BaseBalance = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000000000))) - -type AnteTestSuite struct { - suite.Suite - - ctx sdk.Context - // querier sdk.Querier - app *app.CentauriApp - clientCtx client.Context - txBuilder client.TxBuilder - delegator sdk.AccAddress - validators []stakingtypes.Validator - newvalidators []stakingtypes.Validator -} - -func (suite *AnteTestSuite) SetupTest() { - suite.app, suite.delegator, suite.validators = helpers.SetupCentauriAppWithValSetWithGenAccout(suite.T()) - suite.ctx = suite.app.BaseApp.NewContext(false, tmproto.Header{Height: 1, ChainID: "centauri-1", Time: time.Now().UTC()}) - app.FundAccount(suite.app.BankKeeper, suite.ctx, suite.delegator, BaseBalance) - - encodingConfig := app.MakeEncodingConfig() - encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) - testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry) - - privVal := mock.NewPV() - pubKey, err := privVal.GetPubKey() - require.NoError(suite.T(), err) - // create validator set with single validator - validator := tmtypes.NewValidator(pubKey, 1) - valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) - - validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) - for _, val := range valSet.Validators { - pk, _ := cryptocodec.FromTmPubKeyInterface(val.PubKey) - pkAny, _ := codectypes.NewAnyWithValue(pk) - validator := stakingtypes.Validator{ - OperatorAddress: sdk.ValAddress(val.Address).String(), - ConsensusPubkey: pkAny, - Jailed: false, - Status: stakingtypes.Bonded, - Tokens: sdk.DefaultPowerReduction, - DelegatorShares: math.LegacyOneDec(), - Description: stakingtypes.Description{}, - UnbondingHeight: int64(0), - UnbondingTime: time.Unix(0, 0).UTC(), - Commission: stakingtypes.NewCommission(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), - MinSelfDelegation: math.ZeroInt(), - } - validators = append(validators, validator) - } - suite.newvalidators = validators - - suite.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig) -} - -func (s *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { - var sigsV2 []signing.SignatureV2 - for i, priv := range privs { - sigV2 := signing.SignatureV2{ - PubKey: priv.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), - Signature: nil, - }, - Sequence: accSeqs[i], - } - - sigsV2 = append(sigsV2, sigV2) - } - - if err := s.txBuilder.SetSignatures(sigsV2...); err != nil { - return nil, err - } - - sigsV2 = []signing.SignatureV2{} - for i, priv := range privs { - signerData := xauthsigning.SignerData{ - ChainID: chainID, - AccountNumber: accNums[i], - Sequence: accSeqs[i], - } - sigV2, err := tx.SignWithPrivKey( - s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), - signerData, - s.txBuilder, - priv, - s.clientCtx.TxConfig, - accSeqs[i], - ) - if err != nil { - return nil, err - } - - sigsV2 = append(sigsV2, sigV2) - } - - if err := s.txBuilder.SetSignatures(sigsV2...); err != nil { - return nil, err - } - - return s.txBuilder.GetTx(), nil -} diff --git a/x/tx-boundary/ante/decorate.go b/x/tx-boundary/ante/decorate.go deleted file mode 100644 index 9f2e6ca8b..000000000 --- a/x/tx-boundary/ante/decorate.go +++ /dev/null @@ -1,121 +0,0 @@ -package ante - -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" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - txBoundaryKeeper "github.com/notional-labs/centauri/v5/x/tx-boundary/keeper" -) - -type StakingPermissionDecorator struct { - cdc codec.BinaryCodec - txBoundary txBoundaryKeeper.Keeper -} - -func NewStakingPermissionDecorator(cdc codec.BinaryCodec, keeper txBoundaryKeeper.Keeper) StakingPermissionDecorator { - return StakingPermissionDecorator{ - cdc: cdc, - txBoundary: keeper, - } -} - -func (g StakingPermissionDecorator) AnteHandle( - ctx sdk.Context, tx sdk.Tx, - simulate bool, next sdk.AnteHandler, -) (newCtx sdk.Context, err error) { - // run checks only on CheckTx or simulate - if simulate { - return next(ctx, tx, simulate) - } - - msgs := tx.GetMsgs() - if err = g.ValidateStakingMsgs(ctx, msgs); err != nil { - return ctx, err - } - - return next(ctx, tx, simulate) -} - -// ValidateStakingMsg validate -func (g StakingPermissionDecorator) ValidateStakingMsgs(ctx sdk.Context, msgs []sdk.Msg) error { - for _, m := range msgs { - err := g.ValidateStakingMsg(ctx, m) - if err != nil { - return err - } - } - return nil -} - -func (g StakingPermissionDecorator) ValidateStakingMsg(ctx sdk.Context, msg sdk.Msg) error { - switch msg := msg.(type) { - - case *stakingtypes.MsgDelegate: - if err := g.validDelegateMsg(ctx, msg); err != nil { - return err - } - case *stakingtypes.MsgBeginRedelegate: - if err := g.validRedelegateMsg(ctx, msg); err != nil { - return err - } - case *authz.MsgExec: - if err := g.validAuthz(ctx, msg); err != nil { - return err - } - default: - return nil - } - return nil -} - -func (g StakingPermissionDecorator) validDelegateMsg(ctx sdk.Context, msg *stakingtypes.MsgDelegate) error { - boundary := g.txBoundary.GetDelegateBoundary(ctx) - delegator, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) - if err != nil { - return err - } - g.txBoundary.UpdateLimitPerAddr(ctx, delegator) - - if boundary.TxLimit == 0 { - return nil - } else if g.txBoundary.GetLimitPerAddr(ctx, delegator).DelegateCount >= boundary.TxLimit { - return fmt.Errorf("delegate tx denied, excess tx limit") - } - g.txBoundary.IncrementDelegateCount(ctx, delegator) - return nil -} - -func (g StakingPermissionDecorator) validRedelegateMsg(ctx sdk.Context, msg *stakingtypes.MsgBeginRedelegate) error { - boundary := g.txBoundary.GetRedelegateBoundary(ctx) - delegator, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) - if err != nil { - return err - } - - g.txBoundary.UpdateLimitPerAddr(ctx, delegator) - if boundary.TxLimit == 0 { - return nil - } else if g.txBoundary.GetLimitPerAddr(ctx, delegator).ReledegateCount >= boundary.TxLimit { - return fmt.Errorf("redelegate tx denied, excess tx limit") - } - g.txBoundary.IncrementRedelegateCount(ctx, delegator) - return nil -} - -func (g StakingPermissionDecorator) validAuthz(ctx sdk.Context, execMsg *authz.MsgExec) error { - for _, v := range execMsg.Msgs { - var innerMsg sdk.Msg - if err := g.cdc.UnpackAny(v, &innerMsg); err != nil { - return errorsmod.Wrap(err, "cannot unmarshal authz exec msgs") - } - if err := g.ValidateStakingMsg(ctx, innerMsg); err != nil { - return err - } - } - return nil -} diff --git a/x/tx-boundary/client/cli/query.go b/x/tx-boundary/client/cli/query.go deleted file mode 100644 index 4054769b3..000000000 --- a/x/tx-boundary/client/cli/query.go +++ /dev/null @@ -1,85 +0,0 @@ -package cli - -import ( - "fmt" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/notional-labs/centauri/v5/x/tx-boundary/types" -) - -// GetQueryCmd returns the cli query commands for the tx-boundary module. -func GetQueryCmd() *cobra.Command { - txboundaryQueryCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the tx-boundary module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - txboundaryQueryCmd.AddCommand( - GetCmdQueryDelegateBoundary(), - GetCmdQueryRedelegateBoundary(), - ) - - return txboundaryQueryCmd -} - -// GetCmdQueryDelegateBoundary implements a command to return the current delegate boundary value -func GetCmdQueryDelegateBoundary() *cobra.Command { - cmd := &cobra.Command{ - Use: "delegate-boundary", - Short: "Query the current DelegateBoundary value", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryDelegateBoundaryRequest{} - res, err := queryClient.DelegateBoundary(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintString(fmt.Sprintf("%s\n", &res.Boundary)) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryDelegateBoundary implements a command to return the current delegate boundary value -func GetCmdQueryRedelegateBoundary() *cobra.Command { - cmd := &cobra.Command{ - Use: "redelegate-boundary", - Short: "Query the current RedelegateBoundary value", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryRedelegateBoundaryRequest{} - res, err := queryClient.RedelegateBoundary(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintString(fmt.Sprintf("%s\n", &res.Boundary)) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/tx-boundary/client/cli/tx.go b/x/tx-boundary/client/cli/tx.go deleted file mode 100644 index 9321401d1..000000000 --- a/x/tx-boundary/client/cli/tx.go +++ /dev/null @@ -1,98 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/notional-labs/centauri/v5/x/tx-boundary/types" - "github.com/spf13/cobra" -) - -// GetTxCmd returns the tx commands for tx-boundary -func GetTxCmd() *cobra.Command { - txCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Exp transaction subcommands", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - txCmd.AddCommand( - GetCmdUpdateDelegateBoundary(), - GetCmdQueryRedelegateBoundary(), - ) - return txCmd -} - -func GetCmdUpdateDelegateBoundary() *cobra.Command { - cmd := &cobra.Command{ - Use: "update-delegate [txLimit] [blockPerGeneration]", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - txLimit, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - blockPerGeneration, err := strconv.ParseUint(args[1], 10, 64) - if err != nil { - return err - } - - msg := types.NewMsgUpdateDelegateBoundary( - types.Boundary{ - TxLimit: txLimit, - BlocksPerGeneration: blockPerGeneration, - }, - clientCtx.GetFromAddress().String(), - ) - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -func GetCmdUpdateRedelegateBoundary() *cobra.Command { - cmd := &cobra.Command{ - Use: "update-redelegate [txLimit] [blockPerGeneration]", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - txLimit, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - blockPerGeneration, err := strconv.ParseUint(args[1], 10, 64) - if err != nil { - return err - } - - msg := types.NewMsgUpdateRedelegateBoundary( - types.Boundary{ - TxLimit: txLimit, - BlocksPerGeneration: blockPerGeneration, - }, - clientCtx.GetFromAddress().String(), - ) - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/tx-boundary/keeper/genensis.go b/x/tx-boundary/keeper/genensis.go index 5050809b3..04d89ebe0 100644 --- a/x/tx-boundary/keeper/genensis.go +++ b/x/tx-boundary/keeper/genensis.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/tx-boundary/types" + "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) // InitGenesis initializes the capability module's state from a provided genesis diff --git a/x/tx-boundary/keeper/grpc_query.go b/x/tx-boundary/keeper/grpc_query.go index b10906bc1..3bd29b7ee 100644 --- a/x/tx-boundary/keeper/grpc_query.go +++ b/x/tx-boundary/keeper/grpc_query.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/tx-boundary/types" + "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/tx-boundary/keeper/keeper.go b/x/tx-boundary/keeper/keeper.go index 989ae7f83..145c62807 100644 --- a/x/tx-boundary/keeper/keeper.go +++ b/x/tx-boundary/keeper/keeper.go @@ -9,7 +9,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/notional-labs/centauri/v5/x/tx-boundary/types" + "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) // Keeper struct diff --git a/x/tx-boundary/keeper/keeper_test.go b/x/tx-boundary/keeper/keeper_test.go index d51f5660e..660ee6303 100644 --- a/x/tx-boundary/keeper/keeper_test.go +++ b/x/tx-boundary/keeper/keeper_test.go @@ -8,9 +8,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/notional-labs/centauri/v5/app" - "github.com/notional-labs/centauri/v5/app/helpers" - "github.com/notional-labs/centauri/v5/x/tx-boundary/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" ) type KeeperTestSuite struct { @@ -18,11 +18,11 @@ type KeeperTestSuite struct { ctx sdk.Context // querier sdk.Querier - app *app.CentauriApp + app *app.ComposableApp } func (suite *KeeperTestSuite) SetupTest() { - suite.app = helpers.SetupCentauriAppWithValSet(suite.T()) + suite.app = helpers.SetupComposableAppWithValSet(suite.T()) suite.ctx = suite.app.BaseApp.NewContext(false, tmproto.Header{Height: 1, ChainID: "centauri-1", Time: time.Now().UTC()}) } diff --git a/x/tx-boundary/module.go b/x/tx-boundary/module.go index 4b59cb327..ed712c2fe 100644 --- a/x/tx-boundary/module.go +++ b/x/tx-boundary/module.go @@ -15,9 +15,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/notional-labs/centauri/v5/x/tx-boundary/client/cli" - "github.com/notional-labs/centauri/v5/x/tx-boundary/keeper" - "github.com/notional-labs/centauri/v5/x/tx-boundary/types" + "github.com/notional-labs/composable/v6/x/tx-boundary/keeper" + "github.com/notional-labs/composable/v6/x/tx-boundary/types" ) var ( @@ -76,12 +75,12 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r // GetTxCmd returns no root tx command for the tx-boundary module. func (AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.GetTxCmd() + return nil } // GetQueryCmd returns the root query command for the tx-boundary module. func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() + return nil } // AppModule implements an application module for the tx-boundary module. diff --git a/x/tx-boundary/types/query.pb.go b/x/tx-boundary/types/query.pb.go index 462aaf6d0..196b731b4 100644 --- a/x/tx-boundary/types/query.pb.go +++ b/x/tx-boundary/types/query.pb.go @@ -29,7 +29,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryDelegateBoundaryRequest is the request type for the Query/DelegateBoundary RPC method. +// QueryDelegateBoundaryRequest is the request type for the +// Query/DelegateBoundary RPC method. type QueryDelegateBoundaryRequest struct { } @@ -66,7 +67,8 @@ func (m *QueryDelegateBoundaryRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDelegateBoundaryRequest proto.InternalMessageInfo -// QueryDelegateBoundaryResponse is the response type for the Query/DelegateBoundary RPC method. +// QueryDelegateBoundaryResponse is the response type for the +// Query/DelegateBoundary RPC method. type QueryDelegateBoundaryResponse struct { // boundary defines the boundary for the delegate tx Boundary Boundary `protobuf:"bytes,1,opt,name=boundary,proto3" json:"boundary"` @@ -112,7 +114,8 @@ func (m *QueryDelegateBoundaryResponse) GetBoundary() Boundary { return Boundary{} } -// QueryRedelegateBoundaryRequest is the request type for the Query/ReDelegateBoundary RPC method. +// QueryRedelegateBoundaryRequest is the request type for the +// Query/ReDelegateBoundary RPC method. type QueryRedelegateBoundaryRequest struct { } @@ -149,8 +152,8 @@ func (m *QueryRedelegateBoundaryRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryRedelegateBoundaryRequest proto.InternalMessageInfo -// QueryRedelegateBoundaryResponse is the response type for the Query/ReDelegateBoundary RPC -// method. +// QueryRedelegateBoundaryResponse is the response type for the +// Query/ReDelegateBoundary RPC method. type QueryRedelegateBoundaryResponse struct { // boundary defines the boundary for the redelegate tx Boundary Boundary `protobuf:"bytes,1,opt,name=boundary,proto3" json:"boundary"` diff --git a/x/tx-boundary/types/tx.pb.go b/x/tx-boundary/types/tx.pb.go index e96348dd7..712a41ecc 100644 --- a/x/tx-boundary/types/tx.pb.go +++ b/x/tx-boundary/types/tx.pb.go @@ -92,8 +92,8 @@ func (m *MsgUpdateDelegateBoundary) GetBoundary() Boundary { return Boundary{} } -// MsgUpdateDelegateBoundaryResponse defines the response structure for executing a -// MsgUpdateDelegateBoundary message. +// MsgUpdateDelegateBoundaryResponse defines the response structure for +// executing a MsgUpdateDelegateBoundary message. // // Since: cosmos-sdk 0.47 type MsgUpdateDelegateBoundaryResponse struct { @@ -132,7 +132,8 @@ func (m *MsgUpdateDelegateBoundaryResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateDelegateBoundaryResponse proto.InternalMessageInfo -// MsgUpdateRedelegateBoundary is the Msg/MsgUpdateRedelegateBoundary request type. +// MsgUpdateRedelegateBoundary is the Msg/MsgUpdateRedelegateBoundary request +// type. // // Since: cosmos-sdk 0.47 type MsgUpdateRedelegateBoundary struct { @@ -192,8 +193,8 @@ func (m *MsgUpdateRedelegateBoundary) GetBoundary() Boundary { return Boundary{} } -// MsgUpdateRedelegateBoundaryResponse defines the response structure for executing a -// MsgUpdateRedelegateBoundary message. +// MsgUpdateRedelegateBoundaryResponse defines the response structure for +// executing a MsgUpdateRedelegateBoundary message. // // Since: cosmos-sdk 0.47 type MsgUpdateRedelegateBoundaryResponse struct {