From 096897c03f2b6079736b22e81ac315ba2cbd8c0a Mon Sep 17 00:00:00 2001 From: Jorge Hernandez <3452489+jhernandezb@users.noreply.github.com> Date: Mon, 21 Feb 2022 22:52:15 -0600 Subject: [PATCH] Add CosmWasm smart contract support with the wasmd module (#531) * initial integration * run integration test * fix test and branch * make linter happy * fix branch name * update libwasmvm_muslc * add wasm to upgrade handler * update drone * fix drone.yml * fix missing begin,end blockers * fix download * udpate Dockerfile * v3 upgrade * add v3 upgrade handler and fix upgrade script * add testnet faucet * use latest fix * gov prop not a const * Upload script (#541) * Script to upload contracts * Clean out old scripts * bump proto go package, add custom handler, add claim for message * handle claim for message * clean up custom registry * cleanup * claim * register msg server * update wasmvm * genwasm * update testnet params * add default seed * update genesis creation params * fix genesis prepare * Updated default contract tag * Updated script permissions * Updated default contract tag (#542) * Updated default contract tag * Updated script permissions * Updated minter and added royalty group contract * Fix contract name * address review comments * update ci * add ante tests * claim for tests * add telemetry option * update ci Co-authored-by: Jake Hartnell Co-authored-by: Shane Vitarana --- .drone.yml | 26 +- .gitignore | 1 + Dockerfile | 8 +- Makefile | 4 +- app/ante.go | 56 +- app/app.go | 138 +- app/genesis.go | 19 +- app/upgrades.go | 41 +- cmd/starsd/cmd/genesis.go | 47 +- cmd/starsd/cmd/genwasm.go | 28 + cmd/starsd/cmd/init.go | 6 + cmd/starsd/main.go | 6 + docker/Dockerfile | 2 +- docker/Dockerfile.gaia | 2 +- docker/Dockerfile.go-devtools | 4 +- docker/Dockerfile.osmosis | 2 +- docker/Dockerfile.readiness | 2 +- docker/Dockerfile.test | 2 +- docs/static/openapi.yml | 15803 +++++++++------- go.mod | 23 +- go.sum | 95 +- internal/ante/min_commission.go | 73 + internal/ante/min_commission_test.go | 233 + internal/wasm/distribution.go | 70 + internal/wasm/encoder.go | 51 + internal/wasm/registry.go | 22 + proto/stargaze/alloc/v1beta1/genesis.proto | 6 +- proto/stargaze/alloc/v1beta1/params.proto | 3 +- proto/stargaze/alloc/v1beta1/query.proto | 12 +- proto/stargaze/alloc/v1beta1/tx.proto | 48 +- .../stargaze/claim/v1beta1/claim_record.proto | 5 +- proto/stargaze/claim/v1beta1/genesis.proto | 6 +- proto/stargaze/claim/v1beta1/params.proto | 14 +- proto/stargaze/claim/v1beta1/query.proto | 161 +- proto/stargaze/claim/v1beta1/tx.proto | 31 +- proto/stargaze/mint/v1beta1/genesis.proto | 7 +- proto/stargaze/mint/v1beta1/mint.proto | 13 +- proto/stargaze/mint/v1beta1/query.proto | 13 +- scripts/ci/upgrade/proposal.sh | 6 +- scripts/wasm/README.md | 13 +- scripts/wasm/cw20-bonding.sh | 50 - scripts/wasm/cw721-base.sh | 55 - scripts/wasm/upload-contracts.sh | 59 + testutil/network/network.go | 2 + testutil/simapp/pv.go | 50 + testutil/simapp/simapp.go | 202 +- x/alloc/module.go | 1 + x/alloc/types/codec.go | 3 - x/alloc/types/genesis.pb.go | 12 +- x/alloc/types/params.pb.go | 58 +- x/alloc/types/query.pb.go | 12 +- x/alloc/types/tx.pb.go | 59 +- x/claim/handler.go | 4 + x/claim/keeper/keeper_test.go | 128 +- x/claim/keeper/msg_server_claim_for.go | 49 + x/claim/module.go | 1 + x/claim/types/claim_record.pb.go | 80 +- x/claim/types/codec.go | 7 +- x/claim/types/errors.go | 1 + x/claim/types/genesis.pb.go | 44 +- x/claim/types/message_claim_for.go | 50 + x/claim/types/message_claim_for_test.go | 40 + x/claim/types/params.pb.go | 72 +- x/claim/types/query.pb.go | 98 +- x/claim/types/tx.pb.go | 580 +- x/claim/wasm/encoder.go | 63 + x/mint/keeper/integration_test.go | 6 +- x/mint/types/genesis.pb.go | 12 +- x/mint/types/mint.pb.go | 61 +- x/mint/types/query.pb.go | 12 +- 70 files changed, 11754 insertions(+), 7219 deletions(-) create mode 100644 cmd/starsd/cmd/genwasm.go create mode 100644 internal/ante/min_commission.go create mode 100644 internal/ante/min_commission_test.go create mode 100644 internal/wasm/distribution.go create mode 100644 internal/wasm/encoder.go create mode 100644 internal/wasm/registry.go delete mode 100755 scripts/wasm/cw20-bonding.sh delete mode 100755 scripts/wasm/cw721-base.sh create mode 100755 scripts/wasm/upload-contracts.sh create mode 100644 testutil/simapp/pv.go create mode 100644 x/claim/keeper/msg_server_claim_for.go create mode 100644 x/claim/types/message_claim_for.go create mode 100644 x/claim/types/message_claim_for_test.go create mode 100644 x/claim/wasm/encoder.go diff --git a/.drone.yml b/.drone.yml index 0946159a9..6afbf4a6e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,7 +31,7 @@ steps: - '/go/pkg/mod' - name: test - image: publicawesome/golang:1.17.6-devtooling + image: publicawesome/golang:1.17.7-devtooling volumes: - name: cache path: /go @@ -40,14 +40,14 @@ steps: environment: GOPROXY: http://goproxy - name: build - image: golang:1.17-alpine3.14 + image: golang:1.17-alpine3.15 volumes: - name: cache path: /go commands: - apk add --no-cache ca-certificates build-base git - - wget https://github.com/CosmWasm/wasmvm/releases/download/v1.0.0-beta/libwasmvm_muslc.a -O /lib/libwasmvm_muslc.a - - sha256sum /lib/libwasmvm_muslc.a | grep 2ea10ad5e489b5ede1aa4061d4afa8b2ddd39718ba7b8689690b9c07a41d678e + - wget https://github.com/CosmWasm/wasmvm/releases/download/v1.0.0-beta6/libwasmvm_muslc.a -O /lib/libwasmvm_muslc.a + - echo "e9cb9517585ce3477905e2d4e37553d85f6eac29bdc3b9c25c37c8f5e554045c /lib/libwasmvm_muslc.a" | sha256sum -c - LEDGER_ENABLED=false BUILD_TAGS=muslc make build environment: GOPROXY: http://goproxy @@ -74,7 +74,7 @@ steps: password: from_secret: docker_password tags: - - v2-alpha + - v3-alpha when: event: - push @@ -90,12 +90,12 @@ steps: password: from_secret: docker_password tags: - - develop + - wasm when: event: - push branch: - - develop + - jhernandez/add-wasmd - name: trigger image: plugins/downstream settings: @@ -128,7 +128,7 @@ steps: - tag - name: release - image: golang:1.17.0 + image: golang:1.17.7 environment: GITHUB_TOKEN: from_secret: github_token @@ -209,7 +209,7 @@ steps: environment: GOPROXY: http://goproxy - name: stargaze - image: publicawesome/golang:1.17.6-devtooling + image: publicawesome/golang:1.17.7-devtooling volumes: - name: cache path: /go @@ -289,7 +289,7 @@ steps: mount: - '/go/pkg/mod' - name: build-wrapper - image: publicawesome/golang:1.17.6-devtooling + image: publicawesome/golang:1.17.7-devtooling volumes: - name: cache path: /go @@ -314,7 +314,7 @@ steps: environment: GOPROXY: http://goproxy - name: stargaze - image: publicawesome/stargaze:1.1.3 + image: publicawesome/stargaze:2.0.0 commands: - ./scripts/ci/upgrade/setup-preinstalled-stargaze.sh environment: @@ -348,7 +348,7 @@ steps: commands: - ./scripts/ci/upgrade/proposal.sh - name: stargaze-upgraded - image: publicawesome/stargaze:2.0.0 + image: publicawesome/stargaze:wasm commands: - ./scripts/ci/upgrade/run-upgrade.sh environment: @@ -397,6 +397,6 @@ depends_on: - ibc-integration-test --- kind: signature -hmac: 2afdd67fa7a871d8ff1b9412f304cc7908b029f47f92f184c197e0c4bd0b7efe +hmac: 06d4eea0c6a7033aed5da61ddce082dade980ef159d33fec40a25db483f9e7ef ... diff --git a/.gitignore b/.gitignore index 7de9f423a..56f1fe4fd 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ coverage.txt vue/node_modules vue/dist release/ +mytestnet/ diff --git a/Dockerfile b/Dockerfile index 612e30cde..030c3384b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # docker build . -t cosmwasm/wasmd:latest # docker run --rm -it cosmwasm/wasmd:latest /bin/sh -FROM golang:1.16-alpine3.14 AS go-builder +FROM golang:1.17-alpine3.15 AS go-builder # this comes from standard alpine nightly file # https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile @@ -15,15 +15,15 @@ WORKDIR /code COPY . /code/ # See https://github.com/CosmWasm/wasmvm/releases -ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.14.0/libwasmvm_muslc.a /lib/libwasmvm_muslc.a -RUN sha256sum /lib/libwasmvm_muslc.a | grep 220b85158d1ae72008f099a7ddafe27f6374518816dd5873fd8be272c5418026 +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.0.0-beta5/libwasmvm_muslc.a /lib/libwasmvm_muslc.a +RUN sha256sum /lib/libwasmvm_muslc.a | grep d16a2cab22c75dbe8af32265b9346c6266070bdcf9ed5aa9b7b39a7e32e25fe0 # force it to use static lib (from above) not standard libgo_cosmwasm.so file RUN FAUCET_ENABLED=true LEDGER_ENABLED=false BUILD_TAGS=muslc make build # -------------------------------------------------------- -FROM alpine:3.14 +FROM alpine:3.15 COPY --from=go-builder /code/bin/starsd /usr/bin/starsd RUN apk add -U --no-cache ca-certificates diff --git a/Makefile b/Makefile index b709662a9..a2b7a69ef 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ endif all: install -install: build +install: go install -mod=readonly $(BUILD_FLAGS) ./cmd/starsd build: @@ -109,7 +109,7 @@ docker-test: build-linux test: - go test -v -race github.com/public-awesome/stargaze/x/... + go test -v -race github.com/public-awesome/stargaze/v3/x/... .PHONY: test build-linux docker-test lint build install diff --git a/app/ante.go b/app/ante.go index e692db608..16de2681a 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,52 +1,25 @@ package app import ( + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" channelkeeper "github.com/cosmos/ibc-go/v2/modules/core/04-channel/keeper" ibcante "github.com/cosmos/ibc-go/v2/modules/core/ante" + stargazeante "github.com/public-awesome/stargaze/v3/internal/ante" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC // channel keeper. type HandlerOptions struct { ante.HandlerOptions - - IBCChannelkeeper channelkeeper.Keeper -} - -type MinCommissionDecorator struct{} - -func NewMinCommissionDecorator() MinCommissionDecorator { - return MinCommissionDecorator{} -} - -func (MinCommissionDecorator) AnteHandle( - ctx sdk.Context, tx sdk.Tx, - simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { - msgs := tx.GetMsgs() - for _, m := range msgs { - switch msg := m.(type) { - case *stakingtypes.MsgCreateValidator: - c := msg.Commission - if c.Rate.LT(sdk.NewDecWithPrec(5, 2)) { - return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "commission can't be lower than 5%") - } - case *stakingtypes.MsgEditValidator: - // if commission rate is nil, it means only other fields gets updated and skip - if msg.CommissionRate == nil { - continue - } - if msg.CommissionRate.LT(sdk.NewDecWithPrec(5, 2)) { - return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "commission can't be lower than 5%") - } - default: - continue - } - } - return next(ctx, tx, simulate) + IBCChannelkeeper channelkeeper.Keeper + WasmConfig *wasmTypes.WasmConfig + TXCounterStoreKey sdk.StoreKey + Codec codec.BinaryCodec } // NewAnteHandler returns an AnteHandler that checks and increments sequence @@ -65,6 +38,14 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder") } + if options.WasmConfig == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder") + } + + if options.TXCounterStoreKey == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "tx counter key is required for ante builder") + } + var sigGasConsumer = options.SigGasConsumer if sigGasConsumer == nil { sigGasConsumer = ante.DefaultSigVerificationGasConsumer @@ -72,7 +53,10 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { anteDecorators := []sdk.AnteDecorator{ ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first - NewMinCommissionDecorator(), + // limit simulation gas + wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), + stargazeante.NewMinCommissionDecorator(options.Codec), + wasmkeeper.NewCountTXDecorator(options.TXCounterStoreKey), ante.NewRejectExtensionOptionsDecorator(), ante.NewMempoolFeeDecorator(), ante.NewValidateBasicDecorator(), diff --git a/app/app.go b/app/app.go index 3e9a2252e..93b278e6d 100644 --- a/app/app.go +++ b/app/app.go @@ -1,10 +1,12 @@ package app import ( + "fmt" "io" "net/http" "os" "path/filepath" + "strings" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -75,7 +77,7 @@ import ( ibcporttypes "github.com/cosmos/ibc-go/v2/modules/core/05-port/types" ibchost "github.com/cosmos/ibc-go/v2/modules/core/24-host" ibckeeper "github.com/cosmos/ibc-go/v2/modules/core/keeper" - + "github.com/prometheus/client_golang/prometheus" "github.com/public-awesome/stargaze/v3/x/mint" mintkeeper "github.com/public-awesome/stargaze/v3/x/mint/keeper" minttypes "github.com/public-awesome/stargaze/v3/x/mint/types" @@ -84,6 +86,7 @@ import ( tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/x/authz" @@ -93,14 +96,19 @@ import ( "github.com/tendermint/spm/cosmoscmd" "github.com/tendermint/spm/openapiconsole" + "github.com/CosmWasm/wasmd/x/wasm" + wasmclient "github.com/CosmWasm/wasmd/x/wasm/client" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/public-awesome/stargaze/v3/docs" + sgwasm "github.com/public-awesome/stargaze/v3/internal/wasm" allocmodule "github.com/public-awesome/stargaze/v3/x/alloc" allocmodulekeeper "github.com/public-awesome/stargaze/v3/x/alloc/keeper" allocmoduletypes "github.com/public-awesome/stargaze/v3/x/alloc/types" claimmodule "github.com/public-awesome/stargaze/v3/x/claim" claimmodulekeeper "github.com/public-awesome/stargaze/v3/x/claim/keeper" claimmoduletypes "github.com/public-awesome/stargaze/v3/x/claim/types" + claimwasm "github.com/public-awesome/stargaze/v3/x/claim/wasm" ) const ( @@ -108,10 +116,39 @@ const ( Name = "stargaze" ) +var ( + // If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals. + // If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals. + ProposalsEnabled = "true" + // If set to non-empty string it must be comma-separated list of values that are all a subset + // of "EnableAllProposals" (takes precedence over ProposalsEnabled) + // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 + EnableSpecificProposals = "" + + EmptyWasmOpts []wasm.Option +) + // this line is used by starport scaffolding # stargate/wasm/app/enabledProposals +// GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to +// produce a list of enabled proposals to pass into wasmd app. +func GetEnabledProposals() []wasm.ProposalType { + if EnableSpecificProposals == "" { + if ProposalsEnabled == "true" { + return wasm.EnableAllProposals + } + return wasm.DisableAllProposals + } + chunks := strings.Split(EnableSpecificProposals, ",") + proposals, err := wasm.ConvertToProposals(chunks) + if err != nil { + panic(err) + } + return proposals +} + func getGovProposalHandlers() []govclient.ProposalHandler { - var govProposalHandlers []govclient.ProposalHandler + govProposalHandlers := append(make([]govclient.ProposalHandler, 0), wasmclient.ProposalHandlers...) // this line is used by starport scaffolding # stargate/app/govProposalHandlers govProposalHandlers = append(govProposalHandlers, @@ -122,7 +159,6 @@ func getGovProposalHandlers() []govclient.ProposalHandler { ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, // this line is used by starport scaffolding # stargate/app/govProposalHandler ) - return govProposalHandlers } @@ -154,7 +190,7 @@ var ( vesting.AppModuleBasic{}, claimmodule.AppModuleBasic{}, allocmodule.AppModuleBasic{}, - // this line is used by starport scaffolding # stargate/app/moduleBasic + wasm.AppModuleBasic{}, ) // module account permissions @@ -168,6 +204,7 @@ var ( ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, claimmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking}, allocmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking}, + wasm.ModuleName: {authtypes.Burner}, // this line is used by starport scaffolding # stargate/app/maccPerms } ) @@ -220,13 +257,15 @@ type App struct { TransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.Keeper + WasmKeeper wasm.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper + ScopedWasmKeeper capabilitykeeper.ScopedKeeper + // stargaze modules ClaimKeeper claimmodulekeeper.Keeper - AllocKeeper allocmodulekeeper.Keeper // this line is used by starport scaffolding # stargate/app/keeperDeclaration @@ -245,6 +284,8 @@ func NewStargazeApp( invCheckPeriod uint, encodingConfig cosmoscmd.EncodingConfig, appOpts servertypes.AppOptions, + wasmOpts []wasm.Option, + enabledProposals []wasm.ProposalType, baseAppOptions ...func(*baseapp.BaseApp), ) cosmoscmd.App { appCodec := encodingConfig.Marshaler @@ -264,6 +305,7 @@ func NewStargazeApp( claimmoduletypes.StoreKey, allocmoduletypes.StoreKey, authzkeeper.StoreKey, + wasm.StoreKey, // this line is used by starport scaffolding # stargate/app/storeKey ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) @@ -295,6 +337,8 @@ func NewStargazeApp( // grant capabilities for the ibc and ibc-transfer modules scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) + scopedWasmKeeper := app.CapabilityKeeper.ScopeToModule(wasm.ModuleName) + app.CapabilityKeeper.Seal() // this line is used by starport scaffolding # stargate/app/scopedKeeper // add keepers @@ -386,6 +430,11 @@ func NewStargazeApp( ) transferModule := transfer.NewAppModule(app.TransferKeeper) + // Create static IBC router, add transfer route, then set and seal it + ibcRouter := ibcporttypes.NewRouter() + ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferModule) + // this line is used by starport scaffolding # ibc/app/router + // Create evidence Keeper for to register the IBC light client misbehaviour evidence route evidenceKeeper := evidencekeeper.NewKeeper( appCodec, keys[evidencetypes.StoreKey], &app.StakingKeeper, app.SlashingKeeper, @@ -393,6 +442,60 @@ func NewStargazeApp( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper + // wasm configuration + + wasmDir := filepath.Join(homePath, "wasm") + wasmConfig, err := wasm.ReadWasmConfig(appOpts) + if err != nil { + panic(fmt.Sprintf("error while reading wasm config: %s", err)) + } + + // custom messages + registry := sgwasm.NewEncoderRegistry() + registry.RegisterEncoder(sgwasm.DistributionRoute, sgwasm.CustomDistributionEncoder) + registry.RegisterEncoder(claimmoduletypes.ModuleName, claimwasm.Encoder) + + // The last arguments can contain custom message handlers, and custom query handlers, + // if we want to allow any custom callbacks + supportedFeatures := "iterator,staking,stargate,stargaze" + + if cast.ToBool(appOpts.Get("telemetry.enabled")) { + wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer)) + } + + wasmOpts = append( + wasmOpts, + wasmkeeper.WithMessageEncoders(sgwasm.MessageEncoders(registry)), + wasmkeeper.WithQueryPlugins(nil), + ) + app.WasmKeeper = wasm.NewKeeper( + appCodec, + keys[wasm.StoreKey], + app.GetSubspace(wasm.ModuleName), + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.DistrKeeper, + app.IBCKeeper.ChannelKeeper, + &app.IBCKeeper.PortKeeper, + scopedWasmKeeper, + app.TransferKeeper, + app.MsgServiceRouter(), + app.GRPCQueryRouter(), + wasmDir, + wasmConfig, + supportedFeatures, + wasmOpts..., + ) + + // The gov proposal types can be individually enabled + if len(enabledProposals) != 0 { + govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, enabledProposals)) + } + + ibcRouter.AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper)) + app.IBCKeeper.SetRouter(ibcRouter) + govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, &stakingKeeper, govRouter, @@ -419,12 +522,6 @@ func NewStargazeApp( // this line is used by starport scaffolding # stargate/app/keeperDefinition - // Create static IBC router, add transfer route, then set and seal it - ibcRouter := ibcporttypes.NewRouter() - ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferModule) - // this line is used by starport scaffolding # ibc/app/router - app.IBCKeeper.SetRouter(ibcRouter) - /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment @@ -458,6 +555,7 @@ func NewStargazeApp( transferModule, claimModule, allocModule, + wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper), // this line is used by starport scaffolding # stargate/app/appModule ) @@ -474,6 +572,7 @@ func NewStargazeApp( authtypes.ModuleName, banktypes.ModuleName, govtypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, authz.ModuleName, feegrant.ModuleName, claimmoduletypes.ModuleName, paramstypes.ModuleName, vestingtypes.ModuleName, + wasm.ModuleName, ) app.mm.SetOrderEndBlockers( @@ -485,6 +584,7 @@ func NewStargazeApp( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, ibchost.ModuleName, ibctransfertypes.ModuleName, allocmoduletypes.ModuleName, claimmoduletypes.ModuleName, + wasm.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -511,6 +611,8 @@ func NewStargazeApp( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, claimmoduletypes.ModuleName, allocmoduletypes.ModuleName, + // wasm after ibc transfer + wasm.ModuleName, // this line is used by starport scaffolding # stargate/app/initGenesis ) @@ -535,7 +637,10 @@ func NewStargazeApp( SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), FeegrantKeeper: app.FeeGrantKeeper, SigGasConsumer: ante.DefaultSigVerificationGasConsumer}, - IBCChannelkeeper: app.IBCKeeper.ChannelKeeper, + IBCChannelkeeper: app.IBCKeeper.ChannelKeeper, + WasmConfig: &wasmConfig, + TXCounterStoreKey: keys[wasm.StoreKey], + Codec: app.appCodec, }, ) if err != nil { @@ -550,12 +655,18 @@ func NewStargazeApp( if err := app.LoadLatestVersion(); err != nil { tmos.Exit(err.Error()) } + ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{}) + + // Initialize pinned codes in wasmvm as they are not persisted there + if err := app.WasmKeeper.InitializePinnedCodes(ctx); err != nil { + tmos.Exit(fmt.Sprintf("failed initialize pinned codes %s", err)) + } } app.ScopedIBCKeeper = scopedIBCKeeper app.ScopedTransferKeeper = scopedTransferKeeper + app.ScopedIBCKeeper = scopedWasmKeeper // this line is used by starport scaffolding # stargate/app/beforeInitReturn - return app } @@ -706,6 +817,7 @@ func initParamsKeeper( paramsKeeper.Subspace(ibchost.ModuleName) paramsKeeper.Subspace(claimmoduletypes.ModuleName) paramsKeeper.Subspace(allocmoduletypes.ModuleName) + paramsKeeper.Subspace(wasm.ModuleName) // this line is used by starport scaffolding # stargate/app/paramSubspace return paramsKeeper diff --git a/app/genesis.go b/app/genesis.go index 5bf0c1da8..2e73bb970 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -3,6 +3,8 @@ package app import ( "encoding/json" + "github.com/CosmWasm/wasmd/x/wasm" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/codec" ) @@ -15,7 +17,22 @@ import ( // object provided to it during init. type GenesisState map[string]json.RawMessage +const ( + // DefaultMaxWasmCodeSize limit max bytes read to prevent gzip bombs + + DefaultMaxWasmCodeSize = 1000 * 1024 * 2 +) + // NewDefaultGenesisState generates the default state for the application. func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState { - return ModuleBasics.DefaultGenesis(cdc) + genesis := ModuleBasics.DefaultGenesis(cdc) + wasmGen := wasm.GenesisState{ + Params: wasmtypes.Params{ + CodeUploadAccess: wasmtypes.AllowNobody, + InstantiateDefaultPermission: wasmtypes.AccessTypeEverybody, + MaxWasmCodeSize: DefaultMaxWasmCodeSize, + }, + } + genesis[wasm.ModuleName] = cdc.MustMarshalJSON(&wasmGen) + return genesis } diff --git a/app/upgrades.go b/app/upgrades.go index e42fea828..6a78a114e 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -3,47 +3,28 @@ package app import ( "fmt" + "github.com/CosmWasm/wasmd/x/wasm" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/authz" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) // next upgrade name -const upgradeName = "v2" +const upgradeName = "v3" // RegisterUpgradeHandlers returns upgrade handlers func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) { app.UpgradeKeeper.SetUpgradeHandler(upgradeName, func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - const ( - HumanCoinUnit = "stars" - BaseCoinUnit = "ustars" - StarsExponent = 6 - ) - denomMetadata := banktypes.Metadata{ - Description: "The native token of Stargaze", - DenomUnits: []*banktypes.DenomUnit{ - { - Denom: BaseCoinUnit, - Exponent: 0, - Aliases: []string{"microstars"}, - }, - { - Denom: HumanCoinUnit, - Exponent: StarsExponent, - Aliases: nil, - }, - }, - Base: BaseCoinUnit, - Display: HumanCoinUnit, - Name: "Stargaze STARS", - Symbol: "STARS", + newVM, err := app.mm.RunMigrations(ctx, cfg, vm) + if err != nil { + return newVM, err } - - app.BankKeeper.SetDenomMetaData(ctx, denomMetadata) - return app.mm.RunMigrations(ctx, cfg, vm) + params := app.WasmKeeper.GetParams(ctx) + params.CodeUploadAccess = wasmtypes.AllowNobody + app.WasmKeeper.SetParams(ctx, params) + return newVM, err }) upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() @@ -53,7 +34,7 @@ func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) { if upgradeInfo.Name == upgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { storeUpgrades := store.StoreUpgrades{ - Added: []string{authz.ModuleName}, + Added: []string{wasm.ModuleName}, } // configure store loader that checks if version == upgradeHeight and applies store upgrades app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) diff --git a/cmd/starsd/cmd/genesis.go b/cmd/starsd/cmd/genesis.go index ec9ecdfc9..45c544c66 100644 --- a/cmd/starsd/cmd/genesis.go +++ b/cmd/starsd/cmd/genesis.go @@ -30,6 +30,8 @@ import ( minttypes "github.com/public-awesome/stargaze/v3/x/mint/types" // appParams "github.com/public-awesome/stargaze/app/params" + "github.com/CosmWasm/wasmd/x/wasm" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" alloctypes "github.com/public-awesome/stargaze/v3/x/alloc/types" claimtypes "github.com/public-awesome/stargaze/v3/x/claim/types" ) @@ -80,6 +82,8 @@ type GenesisParams struct { AllocParams alloctypes.Params ClaimParams claimtypes.Params MintParams minttypes.Params + + WasmParams wasmtypes.Params } func PrepareGenesisCmd(defaultNodeHome string, mbm module.BasicManager) *cobra.Command { @@ -283,7 +287,7 @@ func PrepareGenesis( } balances = append(balances, banktypes.Balance{ Address: addr, - Coins: sdk.NewCoins(sdk.NewInt64Coin(BaseCoinUnit, 1)), + Coins: sdk.NewCoins(sdk.NewInt64Coin(BaseCoinUnit, 1_000_000)), }) address, err := sdk.AccAddressFromBech32(addr) @@ -338,6 +342,17 @@ func PrepareGenesis( } appState[alloctypes.ModuleName] = allocGenStateBz + // wasm + // wasm module genesis + wasmGenState := &wasm.GenesisState{ + Params: genesisParams.WasmParams, + } + wasmGenStateBz, err := cdc.MarshalJSON(wasmGenState) + if err != nil { + return nil, nil, fmt.Errorf("failed to marshal wasm genesis state: %w", err) + } + appState[wasm.ModuleName] = wasmGenStateBz + return appState, genDoc, nil } @@ -452,6 +467,8 @@ func MainnetGenesisParams() GenesisParams { genParams.ConsensusParams.Evidence.MaxAgeNumBlocks = int64(genParams.StakingParams.UnbondingTime.Seconds()) / 3 genParams.ConsensusParams.Version.AppVersion = 1 + genParams.WasmParams = wasmtypes.DefaultParams() + return genParams } @@ -459,8 +476,8 @@ func MainnetGenesisParams() GenesisParams { func TestnetGenesisParams() GenesisParams { genParams := MainnetGenesisParams() - genParams.AirdropSupply = sdk.NewInt(250_000_000_000_000) // 250M STARS - genParams.GenesisTime = time.Now() + genParams.AirdropSupply = sdk.NewInt(250_000_000_000_000) // 250M STARS + genParams.GenesisTime = time.Date(2022, 02, 17, 17, 0, 0, 0, time.UTC) // Feb 17 // mint genParams.MintParams.StartTime = genParams.GenesisTime.Add(time.Minute * 5) @@ -468,11 +485,31 @@ func TestnetGenesisParams() GenesisParams { genParams.GovParams.DepositParams.MaxDepositPeriod = time.Hour * 24 * 14 // 2 weeks genParams.GovParams.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin( genParams.NativeCoinMetadatas[0].Base, - sdk.NewInt(1), + sdk.NewInt(1_000_000), )) - genParams.GovParams.TallyParams.Quorum = sdk.MustNewDecFromStr("0.2") // 20% + genParams.GovParams.TallyParams.Quorum = sdk.MustNewDecFromStr("0.1") // 10% genParams.GovParams.VotingParams.VotingPeriod = time.Minute * 15 // 15 min + // alloc + genParams.AllocParams = alloctypes.DefaultParams() + genParams.AllocParams.DistributionProportions = alloctypes.DistributionProportions{ + NftIncentives: sdk.NewDecWithPrec(30, 2), // 30% + DeveloperRewards: sdk.NewDecWithPrec(30, 2), // 30% + } + genParams.AllocParams.WeightedDeveloperRewardsReceivers = []alloctypes.WeightedAddress{ + // faucet + { + Address: "stars1qpeu488858wm3uzqfz9e6m76s5jmjjtcuwr8e2", + Weight: sdk.NewDecWithPrec(80, 2), + }, + { + Address: "stars1fayut6xzyka29zvznsumlgy5pl4vkn4fkmaznc", + Weight: sdk.NewDecWithPrec(20, 2), + }, + } + genParams.WasmParams.CodeUploadAccess = wasmtypes.AllowEverybody + genParams.WasmParams.InstantiateDefaultPermission = wasmtypes.AccessTypeEverybody + genParams.WasmParams.MaxWasmCodeSize = 1000 * 1024 * 2 // 1000kb return genParams } diff --git a/cmd/starsd/cmd/genwasm.go b/cmd/starsd/cmd/genwasm.go new file mode 100644 index 000000000..07e4b29fa --- /dev/null +++ b/cmd/starsd/cmd/genwasm.go @@ -0,0 +1,28 @@ +package cmd + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/spf13/cobra" + + wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli" +) + +func AddGenesisWasmMsgCmd(defaultNodeHome string) *cobra.Command { + txCmd := &cobra.Command{ + Use: "add-wasm-genesis-message", + Short: "Wasm genesis subcommands", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + genesisIO := wasmcli.NewDefaultGenesisIO() + txCmd.AddCommand( + wasmcli.GenesisStoreCodeCmd(defaultNodeHome, genesisIO), + wasmcli.GenesisInstantiateContractCmd(defaultNodeHome, genesisIO), + wasmcli.GenesisExecuteContractCmd(defaultNodeHome, genesisIO), + wasmcli.GenesisListContractsCmd(defaultNodeHome, genesisIO), + wasmcli.GenesisListCodesCmd(defaultNodeHome, genesisIO), + ) + return txCmd + +} diff --git a/cmd/starsd/cmd/init.go b/cmd/starsd/cmd/init.go index 49c6de249..a9235b38c 100644 --- a/cmd/starsd/cmd/init.go +++ b/cmd/starsd/cmd/init.go @@ -96,6 +96,12 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { } } + if chainID == "big-bang-1" { + seeds = []string{ + "69666f77b6a2355fcfc64c9879520a352b62917e@45.55.57.176:36656", + } + } + // Override default settings in config.toml config.P2P.Seeds = strings.Join(seeds, ",") config.P2P.MaxNumInboundPeers = 120 diff --git a/cmd/starsd/main.go b/cmd/starsd/main.go index 3ca638e45..c3df72c75 100644 --- a/cmd/starsd/main.go +++ b/cmd/starsd/main.go @@ -3,9 +3,11 @@ package main import ( "os" + "github.com/CosmWasm/wasmd/x/wasm" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/public-awesome/stargaze/v3/app" "github.com/public-awesome/stargaze/v3/cmd/starsd/cmd" + "github.com/spf13/cobra" "github.com/tendermint/spm/cosmoscmd" tmcmds "github.com/tendermint/tendermint/cmd/tendermint/commands" ) @@ -22,6 +24,10 @@ func main() { cosmoscmd.AddCustomInitCmd(cmd.InitCmd(app.ModuleBasics, app.DefaultNodeHome)), cosmoscmd.AddSubCmd(cmd.PrepareGenesisCmd(app.DefaultNodeHome, app.ModuleBasics)), cosmoscmd.AddSubCmd(tmcmds.RollbackStateCmd), + cosmoscmd.CustomizeStartCmd(func(startCmd *cobra.Command) { + wasm.AddModuleInitFlags(startCmd) + }), + cosmoscmd.AddSubCmd(cmd.AddGenesisWasmMsgCmd(app.DefaultNodeHome)), // this line is used by starport scaffolding # root/arguments ) if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil { diff --git a/docker/Dockerfile b/docker/Dockerfile index 4e581c825..c56506bea 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.14 +FROM alpine:3.15 RUN apk add -U --no-cache ca-certificates WORKDIR /data diff --git a/docker/Dockerfile.gaia b/docker/Dockerfile.gaia index 8453857c6..0d03538d4 100644 --- a/docker/Dockerfile.gaia +++ b/docker/Dockerfile.gaia @@ -16,7 +16,7 @@ RUN cd gaia && git checkout $TAG && CGO_ENABLED=0 LEDGER_ENABLED=false make buil # -------------------------------------------------------- -FROM alpine:3.14 +FROM alpine:3.15 COPY --from=go-builder /code/gaia/build/gaiad /usr/bin/gaiad RUN apk add -U --no-cache ca-certificates diff --git a/docker/Dockerfile.go-devtools b/docker/Dockerfile.go-devtools index 44dc2036a..f53b58e4d 100644 --- a/docker/Dockerfile.go-devtools +++ b/docker/Dockerfile.go-devtools @@ -1,5 +1,5 @@ -# docker build . -t publicawesome/golang:1.17.0-devtooling -f docker/Dockerfile.go-devtools -FROM golang:1.17.6 +# docker build . -t publicawesome/golang:1.17.7-devtooling -f docker/Dockerfile.go-devtools +FROM golang:1.17.7 RUN apt-get update && \ apt-get install -y cmake && \ apt-get -y clean && \ diff --git a/docker/Dockerfile.osmosis b/docker/Dockerfile.osmosis index fefc77422..08503ae6d 100644 --- a/docker/Dockerfile.osmosis +++ b/docker/Dockerfile.osmosis @@ -16,7 +16,7 @@ RUN cd osmosis && git checkout $TAG && CGO_ENABLED=0 LEDGER_ENABLED=false make b # -------------------------------------------------------- -FROM alpine:3.14 +FROM alpine:3.15 COPY --from=go-builder /code/osmosis/build/osmosisd /usr/bin/osmosisd RUN apk add -U --no-cache ca-certificates diff --git a/docker/Dockerfile.readiness b/docker/Dockerfile.readiness index 5a2e1b915..a7a4c9b88 100644 --- a/docker/Dockerfile.readiness +++ b/docker/Dockerfile.readiness @@ -1,4 +1,4 @@ -FROM alpine:3.14 +FROM alpine:3.15 RUN apk add -U --no-cache ca-certificates COPY ./bin/readiness-checker /usr/bin/readiness-checker diff --git a/docker/Dockerfile.test b/docker/Dockerfile.test index 835fd8d77..0ae2b0aff 100644 --- a/docker/Dockerfile.test +++ b/docker/Dockerfile.test @@ -1,4 +1,4 @@ -FROM alpine:3.14 +FROM alpine:3.15 RUN apk add -U --no-cache ca-certificates WORKDIR /root diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 5df64a25d..7e2e9791c 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -11842,37 +11842,30 @@ paths: type: boolean tags: - Query - /ibc/apps/transfer/v1/denom_traces: + /cosmwasm/wasm/v1/code: get: - summary: DenomTraces queries all denomination traces. - operationId: IbcApplicationsTransferV1DenomTraces + summary: Codes gets the metadata for all stored wasm codes + operationId: CosmwasmWasmV1Codes responses: '200': description: A successful response. schema: type: object properties: - denomTraces: + codeInfos: type: array items: type: object properties: - path: + codeId: type: string - description: >- - path defines the chain of port/channel identifiers used - for tracing the - - source of the fungible token. - baseDenom: + format: uint64 + creator: type: string - description: base denomination of the relayed fungible token. - description: >- - DenomTrace contains the base denomination for ICS20 fungible - tokens and the - - source tracing information path. - description: denom_traces returns all denominations trace information. + dataHash: + type: string + format: byte + title: CodeInfoResponse contains code meta data from CodeInfo pagination: description: pagination defines the pagination in the response. type: object @@ -11891,11 +11884,9 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- - QueryConnectionsResponse is the response type for the - Query/DenomTraces RPC - - method. + title: >- + QueryCodesResponse is the response type for the Query/Codes RPC + method default: description: An unexpected error response. schema: @@ -12128,41 +12119,46 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query - '/ibc/apps/transfer/v1/denom_traces/{hash}': + '/cosmwasm/wasm/v1/code/{codeId}': get: - summary: DenomTrace queries a denomination trace information. - operationId: IbcApplicationsTransferV1DenomTrace + summary: Code gets the binary code and metadata for a singe wasm code + operationId: CosmwasmWasmV1Code responses: '200': description: A successful response. schema: type: object properties: - denomTrace: + codeInfo: type: object properties: - path: + codeId: type: string - description: >- - path defines the chain of port/channel identifiers used - for tracing the - - source of the fungible token. - baseDenom: + format: uint64 + creator: type: string - description: base denomination of the relayed fungible token. - description: >- - DenomTrace contains the base denomination for ICS20 fungible - tokens and the - - source tracing information path. - description: >- - QueryDenomTraceResponse is the response type for the - Query/DenomTrace RPC - - method. + dataHash: + type: string + format: byte + title: CodeInfoResponse contains code meta data from CodeInfo + data: + type: string + format: byte + title: >- + QueryCodeResponse is the response type for the Query/Code RPC + method default: description: An unexpected error response. schema: @@ -12349,44 +12345,49 @@ paths: "value": "1.212s" } parameters: - - name: hash - description: hash (in hex format) of the denomination trace information. + - name: codeId in: path required: true type: string + format: uint64 tags: - Query - /ibc/apps/transfer/v1/params: + '/cosmwasm/wasm/v1/code/{codeId}/contracts': get: - summary: Params queries all parameters of the ibc-transfer module. - operationId: IbcApplicationsTransferV1Params + summary: ContractsByCode lists all smart contracts for a code id + operationId: CosmwasmWasmV1ContractsByCode responses: '200': description: A successful response. schema: type: object properties: - params: - description: params defines the parameters of the module. + contracts: + type: array + items: + type: string + title: contracts are a set of contract addresses + pagination: + description: pagination defines the pagination in the response. type: object properties: - sendEnabled: - type: boolean - description: >- - send_enabled enables or disables all cross-chain token - transfers from this - - chain. - receiveEnabled: - type: boolean - description: >- - receive_enabled enables or disables all cross-chain token - transfers to this + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - chain. - description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. + was set, its value is undefined otherwise + title: |- + QueryContractsByCodeResponse is the response type for the + Query/ContractsByCode RPC method default: description: An unexpected error response. schema: @@ -12572,45 +12573,106 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: codeId + in: path + required: true + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.countTotal + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query - /stargaze/alloc/v1beta1/params: + /cosmwasm/wasm/v1/codes/pinned: get: - summary: 'this line is used by starport scaffolding # 2' - operationId: PublicawesomeStargazeAllocV1Beta1Params + summary: PinnedCodes gets the pinned code ids + operationId: CosmwasmWasmV1PinnedCodes responses: '200': description: A successful response. schema: type: object properties: - params: - description: params defines the parameters of the module. + codeIds: + type: array + items: + type: string + format: uint64 + pagination: + description: pagination defines the pagination in the response. type: object properties: - distributionProportions: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 title: >- - distribution_proportions defines the proportion of the - minted denom - type: object - properties: - nftIncentives: - type: string - developerRewards: - type: string - weightedDeveloperRewardsReceivers: - type: array - items: - type: object - properties: - address: - type: string - weight: - type: string - title: address to receive developer rewards - description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: |- + QueryPinnedCodesResponse is the response type for the + Query/PinnedCodes RPC method default: description: An unexpected error response. schema: @@ -12628,3687 +12690,2815 @@ paths: properties: '@type': type: string - additionalProperties: {} - tags: - - Query - '/stargaze/claim/v1beta1/claim_record/{address}': - get: - operationId: PublicawesomeStargazeClaimV1Beta1ClaimRecord - responses: - '200': - description: A successful response. - schema: - type: object - properties: - claimRecord: - type: object - properties: - address: - type: string - title: address of claim user - initialClaimableAmount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string description: >- - Coin defines a token with a denomination and an amount. + A URL/resource name that uniquely identifies the type of + the serialized + protocol buffer message. This string must contain at + least - NOTE: The amount field is an Int which implements the - custom method + one "/" character. The last segment of the URL's path + must represent - signatures required by gogoproto. - title: total initial claimable amount for the user - actionCompleted: - type: array - items: - type: boolean - title: |- - true if action is completed - index of bool in array refers to action enum # - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: address - in: path - required: true - type: string - tags: - - Query - '/stargaze/claim/v1beta1/claimable_for_action/{address}/{action}': - get: - operationId: PublicawesomeStargazeClaimV1Beta1ClaimableForAction - responses: - '200': - description: A successful response. - schema: - type: object - properties: - coins: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in + a canonical form - NOTE: The amount field is an Int which implements the custom - method + (e.g., leading "." is not accepted). - signatures required by gogoproto. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: address - in: path - required: true - type: string - - name: action - in: path - required: true - type: string - enum: - - ActionInitialClaim - - ActionBuySocialToken - - ActionMintNFT - - ActionVote - - ActionDelegateStake - tags: - - Query - /stargaze/claim/v1beta1/module_account_balance: - get: - summary: 'this line is used by starport scaffolding # 2' - operationId: PublicawesomeStargazeClaimV1Beta1ModuleAccountBalance - responses: - '200': - description: A successful response. - schema: - type: object - properties: - moduleAccountBalance: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + In practice, teams usually precompile into the binary + all types that they - NOTE: The amount field is an Int which implements the custom - method + expect it to use in the context of Any. However, for + URLs which use the - signatures required by gogoproto. - description: params defines the parameters of the module. - description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /stargaze/claim/v1beta1/params: - get: - operationId: PublicawesomeStargazeClaimV1Beta1Params - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - airdropEnabled: - type: boolean - airdropStartTime: - type: string - format: date-time - durationUntilDecay: - type: string - durationOfDecay: - type: string - claimDenom: - type: string - title: denom of claimable asset - allowedClaimers: - type: array - items: - type: object - properties: - contractAddress: - type: string - action: - type: string - enum: - - ActionInitialClaim - - ActionBuySocialToken - - ActionMintNFT - - ActionVote - - ActionDelegateStake - default: ActionInitialClaim - title: list of contracts and their allowed claim actions - description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - '/stargaze/claim/v1beta1/total_claimable/{address}': - get: - operationId: PublicawesomeStargazeClaimV1Beta1TotalClaimable - responses: - '200': - description: A successful response. - schema: - type: object - properties: - coins: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + scheme `http`, `https`, or no scheme, one can optionally + set up a type + server that maps type URLs to message definitions as + follows: - NOTE: The amount field is an Int which implements the custom - method - signatures required by gogoproto. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: address - in: path - required: true - type: string - tags: - - Query -definitions: - cosmos.authz.v1beta1.Grant: - type: object - properties: - authorization: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + * If no scheme is provided, `https` is assumed. - protocol buffer message. This string must contain at least + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - one "/" character. The last segment of the URL's path must - represent + Note: this functionality is not currently available in + the official - the fully qualified name of the type (as in + protobuf release, and it is not used for type URLs + beginning with - `path/google.protobuf.Duration`). The name should be in a - canonical form + type.googleapis.com. - (e.g., leading "." is not accepted). + Schemes other than `http`, `https` (or the empty scheme) + might be - In practice, teams usually precompile into the binary all types - that they + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - expect it to use in the context of Any. However, for URLs which - use the + URL that describes the type of the serialized message. - scheme `http`, `https`, or no scheme, one can optionally set up a - type - server that maps type URLs to message definitions as follows: + Protobuf library provides support to pack/unpack Any values + in the form + of utility functions or additional generated methods of the + Any type. - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Example 1: Pack and unpack a message in C++. - Note: this functionality is not currently available in the - official + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - protobuf release, and it is not used for type URLs beginning with + Example 2: Pack and unpack a message in Java. - type.googleapis.com. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. - Schemes other than `http`, `https` (or the empty scheme) might be + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + Example 4: Pack and unpack a message in Go - URL that describes the type of the serialized message. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + The pack methods provided by protobuf library will by + default use - Protobuf library provides support to pack/unpack Any values in the - form + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - of utility functions or additional generated methods of the Any type. + methods only use the fully qualified type name after the + last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - Example 1: Pack and unpack a message in C++. + name "y.z". - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + JSON - Example 3: Pack and unpack a message in Python. + ==== - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + The JSON representation of an `Any` value uses the regular - Example 4: Pack and unpack a message in Go + representation of the deserialized, embedded message, with + an - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + additional field `@type` which contains the type URL. + Example: - The pack methods provided by protobuf library will by default use + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - 'type.googleapis.com/full.type.name' as the type URL and the unpack + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - methods only use the fully qualified type name after the last '/' + If the embedded message type is well-known and has a custom + JSON - in the type URL, for example "foo.bar.com/x/y.z" will yield type + representation, that representation will be embedded adding + a field - name "y.z". + `value` which holds the custom JSON in addition to the + `@type` + field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - JSON + It is less efficient than using key. Only one of offset or key + should - ==== + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. - The JSON representation of an `Any` value uses the regular + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.countTotal + description: >- + count_total is set to true to indicate that the result set should + include - representation of the deserialized, embedded message, with an + a count of the total number of items available for pagination in + UIs. - additional field `@type` which contains the type URL. Example: + count_total is only respected when offset is used. It is ignored + when key - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a custom JSON + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + '/cosmwasm/wasm/v1/contract/{address}': + get: + summary: ContractInfo gets the contract meta data + operationId: CosmwasmWasmV1ContractInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + title: address is the address of the contract + contractInfo: + type: object + properties: + codeId: + type: string + format: uint64 + title: CodeID is the reference to the stored Wasm code + creator: + type: string + title: Creator address who initially instantiated the contract + admin: + type: string + title: Admin is an optional address that can execute migrations + label: + type: string + description: >- + Label is optional metadata to be stored with a contract + instance. + created: + title: >- + Created Tx position when the contract was instantiated. - representation, that representation will be embedded adding a field + This data should kept internal and not be exposed via + query results. Just - `value` which holds the custom JSON in addition to the `@type` + use for sorting + type: object + properties: + blockHeight: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + txIndex: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block + (actual transaction index, - field. Example (for message [google.protobuf.Duration][]): + or gas consumed) + description: >- + AbsoluteTxPosition is a unique transaction position that + allows for global - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: - type: string - format: date-time - description: |- - Grant gives permissions to execute - the provide method with expiration time. - cosmos.authz.v1beta1.MsgExecResponse: - type: object - properties: - results: - type: array - items: - type: string - format: byte - description: MsgExecResponse defines the Msg/MsgExecResponse response type. - cosmos.authz.v1beta1.MsgGrantResponse: - type: object - description: MsgGrantResponse defines the Msg/MsgGrant response type. - cosmos.authz.v1beta1.MsgRevokeResponse: - type: object - description: MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. - cosmos.authz.v1beta1.QueryGrantsResponse: - type: object - properties: - grants: - type: array - items: - type: object - properties: - authorization: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + ordering of transactions. + ibcPortId: + type: string + extension: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be + in a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary + all types that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can + optionally set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in + the official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty + scheme) might be - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in - the form + Protobuf library provides support to pack/unpack Any + values in the form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of + the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default - use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - methods only use the fully qualified type name after the last - '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with + an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a + custom JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded + adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: - type: string - format: date-time - description: |- - Grant gives permissions to execute - the provide method with expiration time. - description: authorizations is a list of grants granted for grantee by granter. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: ContractInfo stores a WASM contract instance title: >- - total is total number of results available if - PageRequest.count_total + QueryContractInfoResponse is the response type for the + Query/ContractInfo RPC - was set, its value is undefined otherwise - description: >- - QueryGrantsResponse is the response type for the Query/Authorizations RPC - method. - cosmos.base.query.v1beta1.PageRequest: - type: object - properties: - key: - type: string - format: byte - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - offset: - type: string - format: uint64 - description: |- - offset is a numeric offset that can be used when key is unavailable. - It is less efficient than using key. Only one of offset or key should - be set. - limit: - type: string - format: uint64 - description: >- - limit is the total number of results to be returned in the result - page. + method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - If left empty it will default to a value to be set by each app. - countTotal: - type: boolean - description: >- - count_total is set to true to indicate that the result set should - include + protocol buffer message. This string must contain at + least - a count of the total number of items available for pagination in UIs. + one "/" character. The last segment of the URL's path + must represent - count_total is only respected when offset is used. It is ignored when - key + the fully qualified name of the type (as in - is set. - reverse: - type: boolean - description: >- - reverse is set to true if results are to be returned in the descending - order. + `path/google.protobuf.Duration`). The name should be in + a canonical form + (e.g., leading "." is not accepted). - Since: cosmos-sdk 0.43 - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } - title: |- - PageRequest is to be embedded in gRPC request messages for efficient - pagination. Ex: - cosmos.base.query.v1beta1.PageResponse: - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: |- - total is total number of results available if PageRequest.count_total - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - google.protobuf.Any: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + In practice, teams usually precompile into the binary + all types that they - protocol buffer message. This string must contain at least + expect it to use in the context of Any. However, for + URLs which use the - one "/" character. The last segment of the URL's path must represent + scheme `http`, `https`, or no scheme, one can optionally + set up a type - the fully qualified name of the type (as in + server that maps type URLs to message definitions as + follows: - `path/google.protobuf.Duration`). The name should be in a canonical - form - (e.g., leading "." is not accepted). + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - In practice, teams usually precompile into the binary all types that - they + Note: this functionality is not currently available in + the official - expect it to use in the context of Any. However, for URLs which use - the + protobuf release, and it is not used for type URLs + beginning with - scheme `http`, `https`, or no scheme, one can optionally set up a type + type.googleapis.com. - server that maps type URLs to message definitions as follows: + Schemes other than `http`, `https` (or the empty scheme) + might be - * If no scheme is provided, `https` is assumed. + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + URL that describes the type of the serialized message. - Note: this functionality is not currently available in the official - protobuf release, and it is not used for type URLs beginning with + Protobuf library provides support to pack/unpack Any values + in the form - type.googleapis.com. + of utility functions or additional generated methods of the + Any type. - Schemes other than `http`, `https` (or the empty scheme) might be + Example 1: Pack and unpack a message in C++. - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along with - a + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - URL that describes the type of the serialized message. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Protobuf library provides support to pack/unpack Any values in the form + Example 3: Pack and unpack a message in Python. - of utility functions or additional generated methods of the Any type. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + Example 4: Pack and unpack a message in Go - Example 1: Pack and unpack a message in C++. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + The pack methods provided by protobuf library will by + default use - Example 2: Pack and unpack a message in Java. + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + methods only use the fully qualified type name after the + last '/' - Example 3: Pack and unpack a message in Python. + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + name "y.z". - Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - The pack methods provided by protobuf library will by default use + JSON - 'type.googleapis.com/full.type.name' as the type URL and the unpack + ==== - methods only use the fully qualified type name after the last '/' + The JSON representation of an `Any` value uses the regular - in the type URL, for example "foo.bar.com/x/y.z" will yield type + representation of the deserialized, embedded message, with + an - name "y.z". + additional field `@type` which contains the type URL. + Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - JSON + If the embedded message type is well-known and has a custom + JSON - ==== + representation, that representation will be embedded adding + a field - The JSON representation of an `Any` value uses the regular + `value` which holds the custom JSON in addition to the + `@type` - representation of the deserialized, embedded message, with an + field. Example (for message [google.protobuf.Duration][]): - additional field `@type` which contains the type URL. Example: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the address of the contract to query + in: path + required: true + type: string + tags: + - Query + '/cosmwasm/wasm/v1/contract/{address}/history': + get: + summary: ContractHistory gets the contract code history + operationId: CosmwasmWasmV1ContractHistory + responses: + '200': + description: A successful response. + schema: + type: object + properties: + entries: + type: array + items: + type: object + properties: + operation: + type: string + enum: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS + default: CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + description: >- + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + ContractCodeHistoryOperationTypeUnspecified placeholder + for empty value + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data + title: >- + ContractCodeHistoryOperationType actions that caused a + code change + codeId: + type: string + format: uint64 + title: CodeID is the reference to the stored WASM code + updated: + description: Updated Tx position when the operation was executed. + type: object + properties: + blockHeight: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + txIndex: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block + (actual transaction index, - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + or gas consumed) + msg: + type: string + format: byte + description: ContractCodeHistoryEntry metadata to a contract. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + was set, its value is undefined otherwise + title: |- + QueryContractHistoryResponse is the response type for the + Query/ContractHistory RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - If the embedded message type is well-known and has a custom JSON + protocol buffer message. This string must contain at + least - representation, that representation will be embedded adding a field + one "/" character. The last segment of the URL's path + must represent - `value` which holds the custom JSON in addition to the `@type` + the fully qualified name of the type (as in - field. Example (for message [google.protobuf.Duration][]): + `path/google.protobuf.Duration`). The name should be in + a canonical form - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - google.rpc.Status: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + (e.g., leading "." is not accepted). - protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + In practice, teams usually precompile into the binary + all types that they - the fully qualified name of the type (as in + expect it to use in the context of Any. However, for + URLs which use the - `path/google.protobuf.Duration`). The name should be in a - canonical form + scheme `http`, `https`, or no scheme, one can optionally + set up a type - (e.g., leading "." is not accepted). + server that maps type URLs to message definitions as + follows: - In practice, teams usually precompile into the binary all types - that they + * If no scheme is provided, `https` is assumed. - expect it to use in the context of Any. However, for URLs which - use the + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - scheme `http`, `https`, or no scheme, one can optionally set up - a type + Note: this functionality is not currently available in + the official - server that maps type URLs to message definitions as follows: + protobuf release, and it is not used for type URLs + beginning with + type.googleapis.com. - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Schemes other than `http`, `https` (or the empty scheme) + might be - Note: this functionality is not currently available in the - official + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - protobuf release, and it is not used for type URLs beginning - with + URL that describes the type of the serialized message. - type.googleapis.com. + Protobuf library provides support to pack/unpack Any values + in the form - Schemes other than `http`, `https` (or the empty scheme) might - be + of utility functions or additional generated methods of the + Any type. - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - URL that describes the type of the serialized message. + Example 1: Pack and unpack a message in C++. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Protobuf library provides support to pack/unpack Any values in the - form + Example 2: Pack and unpack a message in Java. - of utility functions or additional generated methods of the Any - type. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. - Example 1: Pack and unpack a message in C++. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Example 4: Pack and unpack a message in Go - Example 2: Pack and unpack a message in Java. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + The pack methods provided by protobuf library will by + default use - Example 3: Pack and unpack a message in Python. + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + methods only use the fully qualified type name after the + last '/' - Example 4: Pack and unpack a message in Go + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + name "y.z". - The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' + JSON - in the type URL, for example "foo.bar.com/x/y.z" will yield type + ==== - name "y.z". + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with + an + additional field `@type` which contains the type URL. + Example: - JSON + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - ==== + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - The JSON representation of an `Any` value uses the regular + If the embedded message type is well-known and has a custom + JSON - representation of the deserialized, embedded message, with an + representation, that representation will be embedded adding + a field - additional field `@type` which contains the type URL. Example: + `value` which holds the custom JSON in addition to the + `@type` - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the address of the contract to query + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - If the embedded message type is well-known and has a custom JSON + It is less efficient than using key. Only one of offset or key + should - representation, that representation will be embedded adding a field + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. - `value` which holds the custom JSON in addition to the `@type` + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.countTotal + description: >- + count_total is set to true to indicate that the result set should + include - field. Example (for message [google.protobuf.Duration][]): + a count of the total number of items available for pagination in + UIs. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - cosmos.bank.v1beta1.DenomUnit: - type: object - properties: - denom: - type: string - description: denom represents the string name of the given denom unit (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + count_total is only respected when offset is used. It is ignored + when key - raise the base_denom to in order to equal the given DenomUnit's denom + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. - 1 denom = 1^exponent base_denom - (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' - with + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + '/cosmwasm/wasm/v1/contract/{address}/state': + get: + summary: AllContractState gets all raw store data for a single contract + operationId: CosmwasmWasmV1AllContractState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + models: + type: array + items: + type: object + properties: + key: + type: string + format: byte + title: hex-encode key to read it better (this is often ascii) + value: + type: string + format: byte + title: base64-encode raw value + title: Model is a struct that holds a KV pair + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - cosmos.bank.v1beta1.Input: - type: object - properties: - address: - type: string - coins: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + was set, its value is undefined otherwise + title: |- + QueryAllContractStateResponse is the response type for the + Query/AllContractState RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: Input models transaction input. - cosmos.bank.v1beta1.Metadata: - type: object - properties: - description: - type: string - denomUnits: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit (e.g - uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + protocol buffer message. This string must contain at + least - raise the base_denom to in order to equal the given DenomUnit's - denom + one "/" character. The last segment of the URL's path + must represent - 1 denom = 1^exponent base_denom + the fully qualified name of the type (as in - (e.g. with a base_denom of uatom, one can create a DenomUnit of - 'atom' with + `path/google.protobuf.Duration`). The name should be in + a canonical form - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with exponent - = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: ATOM). This - can + (e.g., leading "." is not accepted). - be the same as the display. + In practice, teams usually precompile into the binary + all types that they - Since: cosmos-sdk 0.43 - description: |- - Metadata represents a struct that describes - a basic token. - cosmos.bank.v1beta1.MsgMultiSendResponse: - type: object - description: MsgMultiSendResponse defines the Msg/MultiSend response type. - cosmos.bank.v1beta1.MsgSendResponse: - type: object - description: MsgSendResponse defines the Msg/Send response type. - cosmos.bank.v1beta1.Output: - type: object - properties: - address: - type: string - coins: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + expect it to use in the context of Any. However, for + URLs which use the - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: Output models transaction outputs. - cosmos.bank.v1beta1.Params: - type: object - properties: - sendEnabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is + scheme `http`, `https`, or no scheme, one can optionally + set up a type - sendable). - defaultSendEnabled: - type: boolean - description: Params defines the parameters for the bank module. - cosmos.bank.v1beta1.QueryAllBalancesResponse: - type: object - properties: - balances: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + server that maps type URLs to message definitions as + follows: - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: balances is the balances of all the coins. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - was set, its value is undefined otherwise - description: >- - QueryAllBalancesResponse is the response type for the Query/AllBalances - RPC + * If no scheme is provided, `https` is assumed. - method. - cosmos.bank.v1beta1.QueryBalanceResponse: - type: object - properties: - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: >- - QueryBalanceResponse is the response type for the Query/Balance RPC - method. - cosmos.bank.v1beta1.QueryDenomMetadataResponse: - type: object - properties: - metadata: - type: object - properties: - description: - type: string - denomUnits: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit - (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + Note: this functionality is not currently available in + the official - raise the base_denom to in order to equal the given - DenomUnit's denom + protobuf release, and it is not used for type URLs + beginning with - 1 denom = 1^exponent base_denom + type.googleapis.com. - (e.g. with a base_denom of uatom, one can create a DenomUnit - of 'atom' with - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with - exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: ATOM). - This can + Schemes other than `http`, `https` (or the empty scheme) + might be - be the same as the display. + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + URL that describes the type of the serialized message. - Since: cosmos-sdk 0.43 - description: |- - Metadata represents a struct that describes - a basic token. - description: >- - QueryDenomMetadataResponse is the response type for the - Query/DenomMetadata RPC - method. - cosmos.bank.v1beta1.QueryDenomsMetadataResponse: - type: object - properties: - metadatas: - type: array - items: - type: object - properties: - description: - type: string - denomUnits: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit - (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + Protobuf library provides support to pack/unpack Any values + in the form - raise the base_denom to in order to equal the given - DenomUnit's denom + of utility functions or additional generated methods of the + Any type. - 1 denom = 1^exponent base_denom - (e.g. with a base_denom of uatom, one can create a - DenomUnit of 'atom' with + Example 1: Pack and unpack a message in C++. - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with - exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: - ATOM). This can + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - be the same as the display. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Since: cosmos-sdk 0.43 - description: |- - Metadata represents a struct that describes - a basic token. - description: >- - metadata provides the client information for all the registered - tokens. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + Example 3: Pack and unpack a message in Python. - was set, its value is undefined otherwise - description: >- - QueryDenomsMetadataResponse is the response type for the - Query/DenomsMetadata RPC + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - method. - cosmos.bank.v1beta1.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - sendEnabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is + Example 4: Pack and unpack a message in Go - sendable). - defaultSendEnabled: - type: boolean - description: Params defines the parameters for the bank module. - description: >- - QueryParamsResponse defines the response type for querying x/bank - parameters. - cosmos.bank.v1beta1.QuerySupplyOfResponse: - type: object - properties: - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: >- - QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC - method. - cosmos.bank.v1beta1.QueryTotalSupplyResponse: - type: object - properties: - supply: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + The pack methods provided by protobuf library will by + default use - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - title: supply is the supply of the coins - pagination: - description: |- - pagination defines the pagination in the response. + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Since: cosmos-sdk 0.43 - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + methods only use the fully qualified type name after the + last '/' - was set, its value is undefined otherwise - title: >- - QueryTotalSupplyResponse is the response type for the Query/TotalSupply - RPC + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - method - cosmos.bank.v1beta1.SendEnabled: - type: object - properties: - denom: - type: string - enabled: - type: boolean - description: |- - SendEnabled maps coin denom to a send_enabled status (whether a denom is - sendable). - cosmos.base.v1beta1.Coin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + name "y.z". - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - cosmos.crisis.v1beta1.MsgVerifyInvariantResponse: - type: object - description: MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. - cosmos.base.v1beta1.DecCoin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - cosmos.distribution.v1beta1.DelegationDelegatorReward: - type: object - properties: - validatorAddress: - type: string - reward: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - DelegationDelegatorReward represents the properties - of a delegator's delegation reward. - cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse: - type: object - description: >- - MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response - type. - cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse: - type: object - description: >- - MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response - type. - cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse: - type: object - description: >- - MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward - response type. - cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse: - type: object - description: >- - MsgWithdrawValidatorCommissionResponse defines the - Msg/WithdrawValidatorCommission response type. - cosmos.distribution.v1beta1.Params: - type: object - properties: - communityTax: - type: string - baseProposerReward: - type: string - bonusProposerReward: - type: string - withdrawAddrEnabled: - type: boolean - description: Params defines the set of params for the distribution module. - cosmos.distribution.v1beta1.QueryCommunityPoolResponse: - type: object - properties: - pool: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: pool defines community pool's coins. - description: >- - QueryCommunityPoolResponse is the response type for the - Query/CommunityPool - RPC method. - cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: rewards defines the rewards accrued by a delegation. - description: |- - QueryDelegationRewardsResponse is the response type for the - Query/DelegationRewards RPC method. - cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - validatorAddress: - type: string - reward: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + JSON + ==== - NOTE: The amount field is an Dec which implements the custom - method + The JSON representation of an `Any` value uses the regular - signatures required by gogoproto. - description: |- - DelegationDelegatorReward represents the properties - of a delegator's delegation reward. - description: rewards defines all the rewards accrued by a delegator. - total: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + representation of the deserialized, embedded message, with + an - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: total defines the sum of all the rewards. - description: |- - QueryDelegationTotalRewardsResponse is the response type for the - Query/DelegationTotalRewards RPC method. - cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: - type: object - properties: - validators: - type: array - items: - type: string - description: validators defines the validators a delegator is delegating for. - description: |- - QueryDelegatorValidatorsResponse is the response type for the - Query/DelegatorValidators RPC method. - cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: - type: object - properties: - withdrawAddress: - type: string - description: withdraw_address defines the delegator address to query for. - description: |- - QueryDelegatorWithdrawAddressResponse is the response type for the - Query/DelegatorWithdrawAddress RPC method. - cosmos.distribution.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - communityTax: - type: string - baseProposerReward: - type: string - bonusProposerReward: - type: string - withdrawAddrEnabled: - type: boolean - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: - type: object - properties: - commission: - description: commission defines the commision the validator received. - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + additional field `@type` which contains the type URL. + Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - NOTE: The amount field is an Dec which implements the custom - method + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - signatures required by gogoproto. - title: |- - QueryValidatorCommissionResponse is the response type for the - Query/ValidatorCommission RPC method - cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: - type: object - properties: - rewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + If the embedded message type is well-known and has a custom + JSON + representation, that representation will be embedded adding + a field - NOTE: The amount field is an Dec which implements the custom - method + `value` which holds the custom JSON in addition to the + `@type` - signatures required by gogoproto. - description: >- - ValidatorOutstandingRewards represents outstanding (un-withdrawn) - rewards + field. Example (for message [google.protobuf.Duration][]): - for a validator inexpensive to track, allows simple sanity checks. - description: |- - QueryValidatorOutstandingRewardsResponse is the response type for the - Query/ValidatorOutstandingRewards RPC method. - cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: - type: object - properties: - slashes: - type: array - items: - type: object - properties: - validatorPeriod: - type: string - format: uint64 - fraction: - type: string - description: |- - ValidatorSlashEvent represents a validator slash event. - Height is implicit within the store key. - This is needed to calculate appropriate amount of staking tokens - for delegations which are withdrawn after a slash has occurred. - description: slashes defines the slashes the validator received. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryValidatorSlashesResponse is the response type for the - Query/ValidatorSlashes RPC method. - cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - ValidatorAccumulatedCommission represents accumulated commission - for a validator kept as a running counter, can be withdrawn at any time. - cosmos.distribution.v1beta1.ValidatorOutstandingRewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the address of the contract + in: path + required: true + type: string + - name: pagination.key description: |- - DecCoin defines a token with a denomination and a decimal amount. + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - for a validator inexpensive to track, allows simple sanity checks. - cosmos.distribution.v1beta1.ValidatorSlashEvent: - type: object - properties: - validatorPeriod: - type: string - format: uint64 - fraction: - type: string - description: |- - ValidatorSlashEvent represents a validator slash event. - Height is implicit within the store key. - This is needed to calculate appropriate amount of staking tokens - for delegations which are withdrawn after a slash has occurred. - cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse: - type: object - properties: - hash: - type: string - format: byte - description: hash defines the hash of the evidence. - description: MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. - cosmos.evidence.v1beta1.QueryAllEvidenceResponse: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + It is less efficient than using key. Only one of offset or key + should - protocol buffer message. This string must contain at least + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. - one "/" character. The last segment of the URL's path must - represent + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.countTotal + description: >- + count_total is set to true to indicate that the result set should + include - the fully qualified name of the type (as in + a count of the total number of items available for pagination in + UIs. - `path/google.protobuf.Duration`). The name should be in a - canonical form + count_total is only respected when offset is used. It is ignored + when key - (e.g., leading "." is not accepted). + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. - In practice, teams usually precompile into the binary all types - that they + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + '/wasm/v1/contract/{address}/raw/{queryData}': + get: + summary: RawContractState gets single key from the raw store data of a contract + operationId: CosmwasmWasmV1RawContractState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + data: + type: string + format: byte + title: Data contains the raw store data + title: |- + QueryRawContractStateResponse is the response type for the + Query/RawContractState RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - expect it to use in the context of Any. However, for URLs which - use the + protocol buffer message. This string must contain at + least - scheme `http`, `https`, or no scheme, one can optionally set up - a type + one "/" character. The last segment of the URL's path + must represent - server that maps type URLs to message definitions as follows: + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in + a canonical form - * If no scheme is provided, `https` is assumed. + (e.g., leading "." is not accepted). - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in the - official + In practice, teams usually precompile into the binary + all types that they - protobuf release, and it is not used for type URLs beginning - with + expect it to use in the context of Any. However, for + URLs which use the - type.googleapis.com. + scheme `http`, `https`, or no scheme, one can optionally + set up a type + server that maps type URLs to message definitions as + follows: - Schemes other than `http`, `https` (or the empty scheme) might - be - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Protobuf library provides support to pack/unpack Any values in the - form + Note: this functionality is not currently available in + the official - of utility functions or additional generated methods of the Any - type. + protobuf release, and it is not used for type URLs + beginning with + type.googleapis.com. - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Schemes other than `http`, `https` (or the empty scheme) + might be - Example 2: Pack and unpack a message in Java. + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + URL that describes the type of the serialized message. - Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + Protobuf library provides support to pack/unpack Any values + in the form - Example 4: Pack and unpack a message in Go + of utility functions or additional generated methods of the + Any type. - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - The pack methods provided by protobuf library will by default use + Example 1: Pack and unpack a message in C++. - 'type.googleapis.com/full.type.name' as the type URL and the unpack + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - methods only use the fully qualified type name after the last '/' + Example 2: Pack and unpack a message in Java. - in the type URL, for example "foo.bar.com/x/y.z" will yield type + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - name "y.z". + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + Example 4: Pack and unpack a message in Go - JSON + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - ==== + The pack methods provided by protobuf library will by + default use - The JSON representation of an `Any` value uses the regular + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - representation of the deserialized, embedded message, with an + methods only use the fully qualified type name after the + last '/' - additional field `@type` which contains the type URL. Example: + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + name "y.z". - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field + JSON - `value` which holds the custom JSON in addition to the `@type` + ==== - field. Example (for message [google.protobuf.Duration][]): + The JSON representation of an `Any` value uses the regular - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: evidence returns all evidences. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + representation of the deserialized, embedded message, with + an - was set, its value is undefined otherwise - description: >- - QueryAllEvidenceResponse is the response type for the Query/AllEvidence - RPC + additional field `@type` which contains the type URL. + Example: - method. - cosmos.evidence.v1beta1.QueryEvidenceResponse: - type: object - properties: - evidence: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - protocol buffer message. This string must contain at least + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - one "/" character. The last segment of the URL's path must - represent + If the embedded message type is well-known and has a custom + JSON - the fully qualified name of the type (as in + representation, that representation will be embedded adding + a field - `path/google.protobuf.Duration`). The name should be in a - canonical form + `value` which holds the custom JSON in addition to the + `@type` - (e.g., leading "." is not accepted). + field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the address of the contract + in: path + required: true + type: string + - name: queryData + in: path + required: true + type: string + format: byte + tags: + - Query + '/wasm/v1/contract/{address}/smart/{queryData}': + get: + summary: SmartContractState get smart query result from the contract + operationId: CosmwasmWasmV1SmartContractState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + data: + type: string + format: byte + title: Data contains the json data returned from the smart contract + title: |- + QuerySmartContractStateResponse is the response type for the + Query/SmartContractState RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - In practice, teams usually precompile into the binary all types - that they + protocol buffer message. This string must contain at + least - expect it to use in the context of Any. However, for URLs which - use the + one "/" character. The last segment of the URL's path + must represent - scheme `http`, `https`, or no scheme, one can optionally set up a - type + the fully qualified name of the type (as in - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. + `path/google.protobuf.Duration`). The name should be in + a canonical form + (e.g., leading "." is not accepted). - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + In practice, teams usually precompile into the binary + all types that they - Example 2: Pack and unpack a message in Java. + expect it to use in the context of Any. However, for + URLs which use the - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + scheme `http`, `https`, or no scheme, one can optionally + set up a type - Example 3: Pack and unpack a message in Python. + server that maps type URLs to message definitions as + follows: - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + * If no scheme is provided, `https` is assumed. - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - The pack methods provided by protobuf library will by default use + Note: this functionality is not currently available in + the official - 'type.googleapis.com/full.type.name' as the type URL and the unpack + protobuf release, and it is not used for type URLs + beginning with - methods only use the fully qualified type name after the last '/' + type.googleapis.com. - in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + Schemes other than `http`, `https` (or the empty scheme) + might be + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + URL that describes the type of the serialized message. - JSON - ==== + Protobuf library provides support to pack/unpack Any values + in the form - The JSON representation of an `Any` value uses the regular + of utility functions or additional generated methods of the + Any type. - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + Example 1: Pack and unpack a message in C++. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Example 2: Pack and unpack a message in Java. - If the embedded message type is well-known and has a custom JSON + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - representation, that representation will be embedded adding a field + Example 3: Pack and unpack a message in Python. - `value` which holds the custom JSON in addition to the `@type` + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - field. Example (for message [google.protobuf.Duration][]): + Example 4: Pack and unpack a message in Go - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - QueryEvidenceResponse is the response type for the Query/Evidence RPC - method. - cosmos.feegrant.v1beta1.Grant: - type: object - properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance of their - funds. - grantee: - type: string - description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - protocol buffer message. This string must contain at least + The pack methods provided by protobuf library will by + default use - one "/" character. The last segment of the URL's path must - represent + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - the fully qualified name of the type (as in + methods only use the fully qualified type name after the + last '/' - `path/google.protobuf.Duration`). The name should be in a - canonical form + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - (e.g., leading "." is not accepted). + name "y.z". - In practice, teams usually precompile into the binary all types - that they - expect it to use in the context of Any. However, for URLs which - use the + JSON - scheme `http`, `https`, or no scheme, one can optionally set up a - type + ==== - server that maps type URLs to message definitions as follows: + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with + an - * If no scheme is provided, `https` is assumed. + additional field `@type` which contains the type URL. + Example: - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Note: this functionality is not currently available in the - official + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - protobuf release, and it is not used for type URLs beginning with + If the embedded message type is well-known and has a custom + JSON - type.googleapis.com. + representation, that representation will be embedded adding + a field + `value` which holds the custom JSON in addition to the + `@type` - Schemes other than `http`, `https` (or the empty scheme) might be + field. Example (for message [google.protobuf.Duration][]): - used with implementation specific semantics. - additionalProperties: {} - title: Grant is stored in the KVStore to record a grant with full context - cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse: - type: object - description: >- - MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response - type. - cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse: - type: object - description: >- - MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse - response type. - cosmos.feegrant.v1beta1.QueryAllowanceResponse: - type: object - properties: - allowance: - description: allowance is a allowance granted for grantee by granter. - type: object - properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance of their - funds. - grantee: - type: string + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the address of the contract + in: path + required: true + type: string + - name: queryData + description: QueryData contains the query data passed to the contract + in: path + required: true + type: string + format: byte + tags: + - Query + /ibc/apps/transfer/v1/denom_traces: + get: + summary: DenomTraces queries all denomination traces. + operationId: IbcApplicationsTransferV1DenomTraces + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denomTraces: + type: array + items: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used + for tracing the + + source of the fungible token. + baseDenom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible + tokens and the + + source tracing information path. + description: denom_traces returns all denominations trace information. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. + QueryConnectionsResponse is the response type for the + Query/DenomTraces RPC + + method. + default: + description: An unexpected error response. + schema: type: object properties: - '@type': + code: + type: integer + format: int32 + message: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in + a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary + all types that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in + the official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - additionalProperties: {} - title: Grant is stored in the KVStore to record a grant with full context - description: >- - QueryAllowanceResponse is the response type for the Query/Allowance RPC - method. - cosmos.feegrant.v1beta1.QueryAllowancesResponse: - type: object - properties: - allowances: - type: array - items: - type: object - properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance of - their funds. - grantee: - type: string - description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. - type: object - properties: - '@type': - type: string + used with implementation specific semantics. + additionalProperties: {} description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least + `Any` contains an arbitrary serialized protocol buffer + message along with a - one "/" character. The last segment of the URL's path must - represent + URL that describes the type of the serialized message. - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + Protobuf library provides support to pack/unpack Any values + in the form - (e.g., leading "." is not accepted). + of utility functions or additional generated methods of the + Any type. - In practice, teams usually precompile into the binary all - types that they + Example 1: Pack and unpack a message in C++. - expect it to use in the context of Any. However, for URLs - which use the + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - scheme `http`, `https`, or no scheme, one can optionally set - up a type + Example 2: Pack and unpack a message in Java. - server that maps type URLs to message definitions as - follows: + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - title: Grant is stored in the KVStore to record a grant with full context - description: allowances are allowance's granted for grantee by granter. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryAllowancesResponse is the response type for the Query/Allowances RPC - method. - cosmos.gov.v1beta1.Deposit: - type: object - properties: - proposalId: - type: string - format: uint64 - depositor: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: |- - Deposit defines an amount deposited by an account address to an active - proposal. - cosmos.gov.v1beta1.DepositParams: - type: object - properties: - minDeposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + Example 4: Pack and unpack a message in Go - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: Minimum deposit for a proposal to enter voting period. - maxDepositPeriod: - type: string - description: >- - Maximum period for Atom holders to deposit on a proposal. Initial - value: 2 - months. - description: DepositParams defines the params for deposits on governance proposals. - cosmos.gov.v1beta1.MsgDepositResponse: - type: object - description: MsgDepositResponse defines the Msg/Deposit response type. - cosmos.gov.v1beta1.MsgSubmitProposalResponse: - type: object - properties: - proposalId: - type: string - format: uint64 - description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. - cosmos.gov.v1beta1.MsgVoteResponse: - type: object - description: MsgVoteResponse defines the Msg/Vote response type. - cosmos.gov.v1beta1.MsgVoteWeightedResponse: - type: object - description: |- - MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Since: cosmos-sdk 0.43 - cosmos.gov.v1beta1.Proposal: - type: object - properties: - proposalId: - type: string - format: uint64 - content: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + The pack methods provided by protobuf library will by + default use - protocol buffer message. This string must contain at least + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - one "/" character. The last segment of the URL's path must - represent + methods only use the fully qualified type name after the + last '/' - the fully qualified name of the type (as in + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - `path/google.protobuf.Duration`). The name should be in a - canonical form + name "y.z". - (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + JSON - expect it to use in the context of Any. However, for URLs which - use the + ==== - scheme `http`, `https`, or no scheme, one can optionally set up a - type + The JSON representation of an `Any` value uses the regular - server that maps type URLs to message definitions as follows: + representation of the deserialized, embedded message, with + an + additional field `@type` which contains the type URL. + Example: - * If no scheme is provided, `https` is assumed. + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Note: this functionality is not currently available in the - official + If the embedded message type is well-known and has a custom + JSON - protobuf release, and it is not used for type URLs beginning with + representation, that representation will be embedded adding + a field - type.googleapis.com. + `value` which holds the custom JSON in addition to the + `@type` + field. Example (for message [google.protobuf.Duration][]): - Schemes other than `http`, `https` (or the empty scheme) might be + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + It is less efficient than using key. Only one of offset or key + should - URL that describes the type of the serialized message. + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.countTotal + description: >- + count_total is set to true to indicate that the result set should + include - Protobuf library provides support to pack/unpack Any values in the - form + a count of the total number of items available for pagination in + UIs. - of utility functions or additional generated methods of the Any type. + count_total is only respected when offset is used. It is ignored + when key + is set. + in: query + required: false + type: boolean + tags: + - Query + '/ibc/apps/transfer/v1/denom_traces/{hash}': + get: + summary: DenomTrace queries a denomination trace information. + operationId: IbcApplicationsTransferV1DenomTrace + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denomTrace: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used + for tracing the - Example 1: Pack and unpack a message in C++. + source of the fungible token. + baseDenom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible + tokens and the - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + source tracing information path. + description: >- + QueryDenomTraceResponse is the response type for the + Query/DenomTrace RPC - Example 2: Pack and unpack a message in Java. + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + protocol buffer message. This string must contain at + least - Example 3: Pack and unpack a message in Python. + one "/" character. The last segment of the URL's path + must represent - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + the fully qualified name of the type (as in - Example 4: Pack and unpack a message in Go + `path/google.protobuf.Duration`). The name should be in + a canonical form - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + (e.g., leading "." is not accepted). - The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + In practice, teams usually precompile into the binary + all types that they - methods only use the fully qualified type name after the last '/' + expect it to use in the context of Any. However, for + URLs which use the - in the type URL, for example "foo.bar.com/x/y.z" will yield type + scheme `http`, `https`, or no scheme, one can optionally + set up a type - name "y.z". + server that maps type URLs to message definitions as + follows: + * If no scheme is provided, `https` is assumed. - JSON + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - ==== + Note: this functionality is not currently available in + the official - The JSON representation of an `Any` value uses the regular + protobuf release, and it is not used for type URLs + beginning with - representation of the deserialized, embedded message, with an + type.googleapis.com. - additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Schemes other than `http`, `https` (or the empty scheme) + might be - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - If the embedded message type is well-known and has a custom JSON + URL that describes the type of the serialized message. - representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + Protobuf library provides support to pack/unpack Any values + in the form - field. Example (for message [google.protobuf.Duration][]): + of utility functions or additional generated methods of the + Any type. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - finalTallyResult: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - noWithVeto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - submitTime: - type: string - format: date-time - depositEndTime: - type: string - format: date-time - totalDeposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + Example 1: Pack and unpack a message in C++. - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - votingStartTime: - type: string - format: date-time - votingEndTime: - type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. - cosmos.gov.v1beta1.ProposalStatus: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - cosmos.gov.v1beta1.QueryDepositResponse: - type: object - properties: - deposit: - type: object - properties: - proposalId: - type: string - format: uint64 - depositor: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - description: |- - Deposit defines an amount deposited by an account address to an active - proposal. - description: >- - QueryDepositResponse is the response type for the Query/Deposit RPC - method. - cosmos.gov.v1beta1.QueryDepositsResponse: - type: object - properties: - deposits: - type: array - items: - type: object - properties: - proposalId: - type: string - format: uint64 - depositor: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - description: >- - Deposit defines an amount deposited by an account address to an - active + Example 2: Pack and unpack a message in Java. - proposal. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - was set, its value is undefined otherwise - description: >- - QueryDepositsResponse is the response type for the Query/Deposits RPC - method. - cosmos.gov.v1beta1.QueryParamsResponse: - type: object - properties: - votingParams: - description: voting_params defines the parameters related to voting. - type: object - properties: - votingPeriod: - type: string - description: Length of the voting period. - depositParams: - description: deposit_params defines the parameters related to deposit. - type: object - properties: - minDeposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - NOTE: The amount field is an Int which implements the custom - method + Example 4: Pack and unpack a message in Go - signatures required by gogoproto. - description: Minimum deposit for a proposal to enter voting period. - maxDepositPeriod: - type: string - description: >- - Maximum period for Atom holders to deposit on a proposal. Initial - value: 2 - months. - tallyParams: - description: tally_params defines the parameters related to tally. - type: object - properties: - quorum: - type: string - format: byte - description: >- - Minimum percentage of total stake needed to vote for a result to - be - considered valid. - threshold: - type: string - format: byte - description: >- - Minimum proportion of Yes votes for proposal to pass. Default - value: 0.5. - vetoThreshold: - type: string - format: byte - description: >- - Minimum value of Veto votes to Total votes ratio for proposal to - be - vetoed. Default value: 1/3. - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.gov.v1beta1.QueryProposalResponse: - type: object - properties: - proposal: - type: object - properties: - proposalId: - type: string - format: uint64 - content: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - protocol buffer message. This string must contain at least + The pack methods provided by protobuf library will by + default use - one "/" character. The last segment of the URL's path must - represent + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - the fully qualified name of the type (as in + methods only use the fully qualified type name after the + last '/' - `path/google.protobuf.Duration`). The name should be in a - canonical form + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - (e.g., leading "." is not accepted). + name "y.z". - In practice, teams usually precompile into the binary all - types that they - expect it to use in the context of Any. However, for URLs - which use the + JSON - scheme `http`, `https`, or no scheme, one can optionally set - up a type + ==== - server that maps type URLs to message definitions as follows: + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with + an - * If no scheme is provided, `https` is assumed. + additional field `@type` which contains the type URL. + Example: - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Note: this functionality is not currently available in the - official + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - protobuf release, and it is not used for type URLs beginning - with + If the embedded message type is well-known and has a custom + JSON - type.googleapis.com. + representation, that representation will be embedded adding + a field + `value` which holds the custom JSON in addition to the + `@type` - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. + field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: hash + description: hash (in hex format) of the denomination trace information. + in: path + required: true + type: string + tags: + - Query + /ibc/apps/transfer/v1/params: + get: + summary: Params queries all parameters of the ibc-transfer module. + operationId: IbcApplicationsTransferV1Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + sendEnabled: + type: boolean + description: >- + send_enabled enables or disables all cross-chain token + transfers from this - Protobuf library provides support to pack/unpack Any values in the - form + chain. + receiveEnabled: + type: boolean + description: >- + receive_enabled enables or disables all cross-chain token + transfers to this - of utility functions or additional generated methods of the Any - type. + chain. + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + protocol buffer message. This string must contain at + least - Example 1: Pack and unpack a message in C++. + one "/" character. The last segment of the URL's path + must represent - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + the fully qualified name of the type (as in - Example 2: Pack and unpack a message in Java. + `path/google.protobuf.Duration`). The name should be in + a canonical form - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + (e.g., leading "." is not accepted). - Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + In practice, teams usually precompile into the binary + all types that they - Example 4: Pack and unpack a message in Go + expect it to use in the context of Any. However, for + URLs which use the - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + scheme `http`, `https`, or no scheme, one can optionally + set up a type - The pack methods provided by protobuf library will by default use + server that maps type URLs to message definitions as + follows: - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - methods only use the fully qualified type name after the last '/' + * If no scheme is provided, `https` is assumed. - in the type URL, for example "foo.bar.com/x/y.z" will yield type + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - name "y.z". + Note: this functionality is not currently available in + the official + protobuf release, and it is not used for type URLs + beginning with + type.googleapis.com. - JSON - ==== + Schemes other than `http`, `https` (or the empty scheme) + might be - The JSON representation of an `Any` value uses the regular + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - representation of the deserialized, embedded message, with an + URL that describes the type of the serialized message. - additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Protobuf library provides support to pack/unpack Any values + in the form - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + of utility functions or additional generated methods of the + Any type. - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field + Example 1: Pack and unpack a message in C++. - `value` which holds the custom JSON in addition to the `@type` + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - field. Example (for message [google.protobuf.Duration][]): + Example 2: Pack and unpack a message in Java. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - finalTallyResult: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - noWithVeto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - submitTime: - type: string - format: date-time - depositEndTime: - type: string - format: date-time - totalDeposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - NOTE: The amount field is an Int which implements the custom - method + Example 4: Pack and unpack a message in Go - signatures required by gogoproto. - votingStartTime: - type: string - format: date-time - votingEndTime: - type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. - description: >- - QueryProposalResponse is the response type for the Query/Proposal RPC - method. - cosmos.gov.v1beta1.QueryProposalsResponse: - type: object - properties: - proposals: - type: array - items: - type: object - properties: - proposalId: - type: string - format: uint64 - content: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - protocol buffer message. This string must contain at least + The pack methods provided by protobuf library will by + default use - one "/" character. The last segment of the URL's path must - represent + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - the fully qualified name of the type (as in + methods only use the fully qualified type name after the + last '/' - `path/google.protobuf.Duration`). The name should be in a - canonical form + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - (e.g., leading "." is not accepted). + name "y.z". - In practice, teams usually precompile into the binary all - types that they - expect it to use in the context of Any. However, for URLs - which use the + JSON - scheme `http`, `https`, or no scheme, one can optionally set - up a type + ==== - server that maps type URLs to message definitions as - follows: + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with + an - * If no scheme is provided, `https` is assumed. + additional field `@type` which contains the type URL. + Example: - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Note: this functionality is not currently available in the - official + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - protobuf release, and it is not used for type URLs beginning - with + If the embedded message type is well-known and has a custom + JSON - type.googleapis.com. + representation, that representation will be embedded adding + a field + `value` which holds the custom JSON in addition to the + `@type` - Schemes other than `http`, `https` (or the empty scheme) - might be + field. Example (for message [google.protobuf.Duration][]): - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query +definitions: + cosmos.authz.v1beta1.Grant: + type: object + properties: + authorization: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - URL that describes the type of the serialized message. + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must + represent - Protobuf library provides support to pack/unpack Any values in - the form + the fully qualified name of the type (as in - of utility functions or additional generated methods of the Any - type. + `path/google.protobuf.Duration`). The name should be in a + canonical form + (e.g., leading "." is not accepted). - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + In practice, teams usually precompile into the binary all types + that they - Example 2: Pack and unpack a message in Java. + expect it to use in the context of Any. However, for URLs which + use the - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + scheme `http`, `https`, or no scheme, one can optionally set up a + type - Example 3: Pack and unpack a message in Python. + server that maps type URLs to message definitions as follows: - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + * If no scheme is provided, `https` is assumed. - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - The pack methods provided by protobuf library will by default - use + Note: this functionality is not currently available in the + official - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + protobuf release, and it is not used for type URLs beginning with - methods only use the fully qualified type name after the last - '/' + type.googleapis.com. - in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + URL that describes the type of the serialized message. - JSON - ==== + Protobuf library provides support to pack/unpack Any values in the + form - The JSON representation of an `Any` value uses the regular + of utility functions or additional generated methods of the Any type. - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + Example 1: Pack and unpack a message in C++. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Example 2: Pack and unpack a message in Java. - If the embedded message type is well-known and has a custom JSON + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - representation, that representation will be embedded adding a - field + Example 3: Pack and unpack a message in Python. - `value` which holds the custom JSON in addition to the `@type` + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - field. Example (for message [google.protobuf.Duration][]): + Example 4: Pack and unpack a message in Go - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - finalTallyResult: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - noWithVeto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - submitTime: - type: string - format: date-time - depositEndTime: - type: string - format: date-time - totalDeposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' - NOTE: The amount field is an Int which implements the custom - method + in the type URL, for example "foo.bar.com/x/y.z" will yield type - signatures required by gogoproto. - votingStartTime: - type: string - format: date-time - votingEndTime: - type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + name "y.z". - was set, its value is undefined otherwise + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time description: |- - QueryProposalsResponse is the response type for the Query/Proposals RPC - method. - cosmos.gov.v1beta1.QueryTallyResultResponse: + Grant gives permissions to execute + the provide method with expiration time. + cosmos.authz.v1beta1.MsgExecResponse: type: object properties: - tally: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - noWithVeto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - description: >- - QueryTallyResultResponse is the response type for the Query/Tally RPC - method. - cosmos.gov.v1beta1.QueryVoteResponse: + results: + type: array + items: + type: string + format: byte + description: MsgExecResponse defines the Msg/MsgExecResponse response type. + cosmos.authz.v1beta1.MsgGrantResponse: + type: object + description: MsgGrantResponse defines the Msg/MsgGrant response type. + cosmos.authz.v1beta1.MsgRevokeResponse: + type: object + description: MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. + cosmos.authz.v1beta1.QueryGrantsResponse: type: object properties: - vote: - type: object - properties: - proposalId: - type: string - format: uint64 - voter: - type: string - option: - description: >- - Deprecated: Prefer to use `options` instead. This field is set in - queries - - if and only if `len(options) == 1` and that option has weight 1. - In all - - other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - options: - type: array - items: + grants: + type: array + items: + type: object + properties: + authorization: type: object properties: - option: + '@type': type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. + A URL/resource name that uniquely identifies the type of the + serialized - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string - description: |- - WeightedVoteOption defines a unit of vote for vote split. + protocol buffer message. This string must contain at least - Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' - description: |- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote option. - description: QueryVoteResponse is the response type for the Query/Vote RPC method. - cosmos.gov.v1beta1.QueryVotesResponse: - type: object - properties: - votes: - type: array - items: - type: object - properties: - proposalId: - type: string - format: uint64 - voter: - type: string - option: - description: >- - Deprecated: Prefer to use `options` instead. This field is set - in queries + one "/" character. The last segment of the URL's path must + represent - if and only if `len(options) == 1` and that option has weight 1. - In all + the fully qualified name of the type (as in - other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - options: - type: array - items: - type: object - properties: - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. + `path/google.protobuf.Duration`). The name should be in a + canonical form - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string - description: |- - WeightedVoteOption defines a unit of vote for vote split. + (e.g., leading "." is not accepted). - Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time description: |- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote option. - description: votes defined the queried votes. + Grant gives permissions to execute + the provide method with expiration time. + description: authorizations is a list of grants granted for grantee by granter. pagination: - description: pagination defines the pagination in the response. + description: pagination defines an pagination for the response. type: object properties: nextKey: @@ -16325,1015 +15515,5213 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: QueryVotesResponse is the response type for the Query/Votes RPC method. - cosmos.gov.v1beta1.TallyParams: + description: >- + QueryGrantsResponse is the response type for the Query/Authorizations RPC + method. + cosmos.base.query.v1beta1.PageRequest: type: object properties: - quorum: + key: type: string format: byte description: |- - Minimum percentage of total stake needed to vote for a result to be - considered valid. - threshold: - type: string - format: byte - description: >- - Minimum proportion of Yes votes for proposal to pass. Default value: - 0.5. - vetoThreshold: + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + offset: type: string - format: byte + format: uint64 description: |- - Minimum value of Veto votes to Total votes ratio for proposal to be - vetoed. Default value: 1/3. - description: TallyParams defines the params for tallying votes on governance proposals. - cosmos.gov.v1beta1.TallyResult: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - noWithVeto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - cosmos.gov.v1beta1.Vote: - type: object - properties: - proposalId: + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + limit: type: string format: uint64 - voter: - type: string - option: description: >- - Deprecated: Prefer to use `options` instead. This field is set in - queries + limit is the total number of results to be returned in the result + page. - if and only if `len(options) == 1` and that option has weight 1. In - all + If left empty it will default to a value to be set by each app. + countTotal: + type: boolean + description: >- + count_total is set to true to indicate that the result set should + include - other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - options: - type: array - items: - type: object - properties: - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string - description: |- - WeightedVoteOption defines a unit of vote for vote split. + a count of the total number of items available for pagination in UIs. - Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' - description: |- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote option. - cosmos.gov.v1beta1.VoteOption: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given governance - proposal. + count_total is only respected when offset is used. It is ignored when + key - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - cosmos.gov.v1beta1.VotingParams: - type: object - properties: - votingPeriod: - type: string - description: Length of the voting period. - description: VotingParams defines the params for voting on governance proposals. - cosmos.gov.v1beta1.WeightedVoteOption: - type: object - properties: - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED + is set. + reverse: + type: boolean description: >- - VoteOption enumerates the valid vote options for a given governance - proposal. + reverse is set to true if results are to be returned in the descending + order. - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string - description: |- - WeightedVoteOption defines a unit of vote for vote split. - Since: cosmos-sdk 0.43 - cosmos.slashing.v1beta1.MsgUnjailResponse: - type: object - title: MsgUnjailResponse defines the Msg/Unjail response type - cosmos.slashing.v1beta1.Params: + Since: cosmos-sdk 0.43 + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + cosmos.base.query.v1beta1.PageResponse: type: object properties: - signedBlocksWindow: - type: string - format: int64 - minSignedPerWindow: - type: string - format: byte - downtimeJailDuration: - type: string - slashFractionDoubleSign: + nextKey: type: string format: byte - slashFractionDowntime: + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - format: byte - description: Params represents the parameters used for by the slashing module. - cosmos.slashing.v1beta1.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - signedBlocksWindow: - type: string - format: int64 - minSignedPerWindow: - type: string - format: byte - downtimeJailDuration: - type: string - slashFractionDoubleSign: - type: string - format: byte - slashFractionDowntime: - type: string - format: byte - description: Params represents the parameters used for by the slashing module. - title: QueryParamsResponse is the response type for the Query/Params RPC method - cosmos.slashing.v1beta1.QuerySigningInfoResponse: + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + google.protobuf.Any: type: object properties: - valSigningInfo: - type: object - properties: - address: - type: string - startHeight: - type: string - format: int64 - title: Height at which validator was first a candidate OR was unjailed - indexOffset: - type: string - format: int64 - description: >- - Index which is incremented each time the validator was a bonded + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - in a block and may have signed a precommit or not. This in - conjunction with the + protocol buffer message. This string must contain at least - `SignedBlocksWindow` param determines the index in the - `MissedBlocksBitArray`. - jailedUntil: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - tombstoned: - type: boolean - description: >- - Whether or not a validator has been tombstoned (killed out of - validator set). It is set + one "/" character. The last segment of the URL's path must represent - once the validator commits an equivocation or for any other - configured misbehiavor. - missedBlocksCounter: - type: string - format: int64 - description: >- - A counter kept to avoid unnecessary array reads. + the fully qualified name of the type (as in - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for monitoring - their + `path/google.protobuf.Duration`). The name should be in a canonical + form - liveness activity. - title: val_signing_info is the signing info of requested val cons address - title: >- - QuerySigningInfoResponse is the response type for the Query/SigningInfo - RPC + (e.g., leading "." is not accepted). - method - cosmos.slashing.v1beta1.QuerySigningInfosResponse: - type: object - properties: - info: - type: array - items: - type: object - properties: - address: - type: string - startHeight: - type: string - format: int64 - title: Height at which validator was first a candidate OR was unjailed - indexOffset: - type: string - format: int64 - description: >- - Index which is incremented each time the validator was a bonded - in a block and may have signed a precommit or not. This in - conjunction with the + In practice, teams usually precompile into the binary all types that + they - `SignedBlocksWindow` param determines the index in the - `MissedBlocksBitArray`. - jailedUntil: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - tombstoned: - type: boolean - description: >- - Whether or not a validator has been tombstoned (killed out of - validator set). It is set + expect it to use in the context of Any. However, for URLs which use + the - once the validator commits an equivocation or for any other - configured misbehiavor. - missedBlocksCounter: - type: string - format: int64 - description: >- - A counter kept to avoid unnecessary array reads. + scheme `http`, `https`, or no scheme, one can optionally set up a type - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for - monitoring their + server that maps type URLs to message definitions as follows: - liveness activity. - title: info is the signing info of all validators - pagination: - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + * If no scheme is provided, `https` is assumed. - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QuerySigningInfosResponse is the response type for the Query/SigningInfos - RPC + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - method - cosmos.slashing.v1beta1.ValidatorSigningInfo: - type: object - properties: - address: - type: string - startHeight: - type: string - format: int64 - title: Height at which validator was first a candidate OR was unjailed - indexOffset: - type: string - format: int64 - description: >- - Index which is incremented each time the validator was a bonded + Note: this functionality is not currently available in the official - in a block and may have signed a precommit or not. This in conjunction - with the + protobuf release, and it is not used for type URLs beginning with - `SignedBlocksWindow` param determines the index in the - `MissedBlocksBitArray`. - jailedUntil: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - tombstoned: - type: boolean - description: >- - Whether or not a validator has been tombstoned (killed out of - validator set). It is set + type.googleapis.com. - once the validator commits an equivocation or for any other configured - misbehiavor. - missedBlocksCounter: - type: string - format: int64 - description: >- - A counter kept to avoid unnecessary array reads. - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} description: >- - ValidatorSigningInfo defines a validator's signing info for monitoring - their + `Any` contains an arbitrary serialized protocol buffer message along with + a - liveness activity. - cosmos.staking.v1beta1.BondStatus: - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. + URL that describes the type of the serialized message. - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. - cosmos.staking.v1beta1.Commission: - type: object - properties: - commissionRates: - description: >- - commission_rates defines the initial commission rates to be used for - creating a validator. - type: object - properties: - rate: - type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' - maxRate: - type: string - description: >- - max_rate defines the maximum commission rate which validator can - ever charge, as a fraction. - maxChangeRate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - updateTime: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - description: Commission defines commission parameters for a given validator. - cosmos.staking.v1beta1.CommissionRates: + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + google.rpc.Status: type: object properties: - rate: - type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' - maxRate: - type: string - description: >- - max_rate defines the maximum commission rate which validator can ever - charge, as a fraction. - maxChangeRate: + code: + type: integer + format: int32 + message: type: string - description: >- - max_change_rate defines the maximum daily increase of the validator - commission, as a fraction. - description: >- - CommissionRates defines the initial commission rates to be used for - creating + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - a validator. - cosmos.staking.v1beta1.Delegation: + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + cosmos.bank.v1beta1.DenomUnit: type: object properties: - delegatorAddress: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validatorAddress: - type: string - description: validator_address is the bech32-encoded address of the validator. - shares: + denom: type: string - description: shares define the delegation shares received. + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' + with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom description: |- - Delegation represents the bond with tokens held by an account. It is - owned by one delegator, and is associated with the voting power of one - validator. - cosmos.staking.v1beta1.DelegationResponse: + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + cosmos.bank.v1beta1.Input: type: object properties: - delegation: - type: object - properties: - delegatorAddress: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validatorAddress: - type: string - description: validator_address is the bech32-encoded address of the validator. - shares: - type: string - description: shares define the delegation shares received. - description: |- - Delegation represents the bond with tokens held by an account. It is - owned by one delegator, and is associated with the voting power of one - validator. - balance: + address: + type: string + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Input models transaction input. + cosmos.bank.v1beta1.Metadata: + type: object + properties: + description: + type: string + denomUnits: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent + = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This + can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + description: |- + Metadata represents a struct that describes + a basic token. + cosmos.bank.v1beta1.MsgMultiSendResponse: + type: object + description: MsgMultiSendResponse defines the Msg/MultiSend response type. + cosmos.bank.v1beta1.MsgSendResponse: + type: object + description: MsgSendResponse defines the Msg/Send response type. + cosmos.bank.v1beta1.Output: + type: object + properties: + address: + type: string + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Output models transaction outputs. + cosmos.bank.v1beta1.Params: + type: object + properties: + sendEnabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + defaultSendEnabled: + type: boolean + description: Params defines the parameters for the bank module. + cosmos.bank.v1beta1.QueryAllBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllBalancesResponse is the response type for the Query/AllBalances + RPC + + method. + cosmos.bank.v1beta1.QueryBalanceResponse: + type: object + properties: + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QueryBalanceResponse is the response type for the Query/Balance RPC + method. + cosmos.bank.v1beta1.QueryDenomMetadataResponse: + type: object + properties: + metadata: + type: object + properties: + description: + type: string + denomUnits: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given + DenomUnit's denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit + of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). + This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC + + method. + cosmos.bank.v1beta1.QueryDenomsMetadataResponse: + type: object + properties: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denomUnits: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given + DenomUnit's denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the registered + tokens. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomsMetadataResponse is the response type for the + Query/DenomsMetadata RPC + + method. + cosmos.bank.v1beta1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + sendEnabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + defaultSendEnabled: + type: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + cosmos.bank.v1beta1.QuerySupplyOfResponse: + type: object + properties: + amount: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC + method. + cosmos.bank.v1beta1.QueryTotalSupplyResponse: + type: object + properties: + supply: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: supply is the supply of the coins + pagination: + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: >- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply + RPC + + method + cosmos.bank.v1beta1.SendEnabled: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + cosmos.base.v1beta1.Coin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + cosmos.crisis.v1beta1.MsgVerifyInvariantResponse: + type: object + description: MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. + cosmos.base.v1beta1.DecCoin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + cosmos.distribution.v1beta1.DelegationDelegatorReward: + type: object + properties: + validatorAddress: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse: + type: object + description: >- + MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response + type. + cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse: + type: object + description: >- + MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response + type. + cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse: + type: object + description: >- + MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward + response type. + cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse: + type: object + description: >- + MsgWithdrawValidatorCommissionResponse defines the + Msg/WithdrawValidatorCommission response type. + cosmos.distribution.v1beta1.Params: + type: object + properties: + communityTax: + type: string + baseProposerReward: + type: string + bonusProposerReward: + type: string + withdrawAddrEnabled: + type: boolean + description: Params defines the set of params for the distribution module. + cosmos.distribution.v1beta1.QueryCommunityPoolResponse: + type: object + properties: + pool: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: pool defines community pool's coins. + description: >- + QueryCommunityPoolResponse is the response type for the + Query/CommunityPool + + RPC method. + cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: rewards defines the rewards accrued by a delegation. + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validatorAddress: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + description: rewards defines all the rewards accrued by a delegator. + total: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: total defines the sum of all the rewards. + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: string + description: validators defines the validators a delegator is delegating for. + description: |- + QueryDelegatorValidatorsResponse is the response type for the + Query/DelegatorValidators RPC method. + cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: + type: object + properties: + withdrawAddress: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + cosmos.distribution.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + communityTax: + type: string + baseProposerReward: + type: string + bonusProposerReward: + type: string + withdrawAddrEnabled: + type: boolean + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: + type: object + properties: + commission: + description: commission defines the commision the validator received. + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: + type: object + properties: + rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: >- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) + rewards + + for a validator inexpensive to track, allows simple sanity checks. + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: + type: object + properties: + slashes: + type: array + items: + type: object + properties: + validatorPeriod: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + description: slashes defines the slashes the validator received. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + ValidatorAccumulatedCommission represents accumulated commission + for a validator kept as a running counter, can be withdrawn at any time. + cosmos.distribution.v1beta1.ValidatorOutstandingRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + cosmos.distribution.v1beta1.ValidatorSlashEvent: + type: object + properties: + validatorPeriod: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse: + type: object + properties: + hash: + type: string + format: byte + description: hash defines the hash of the evidence. + description: MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. + cosmos.evidence.v1beta1.QueryAllEvidenceResponse: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: evidence returns all evidences. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllEvidenceResponse is the response type for the Query/AllEvidence + RPC + + method. + cosmos.evidence.v1beta1.QueryEvidenceResponse: + type: object + properties: + evidence: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryEvidenceResponse is the response type for the Query/Evidence RPC + method. + cosmos.feegrant.v1beta1.Grant: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of their + funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic and filtered fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse: + type: object + description: >- + MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response + type. + cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse: + type: object + description: >- + MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse + response type. + cosmos.feegrant.v1beta1.QueryAllowanceResponse: + type: object + properties: + allowance: + description: allowance is a allowance granted for grantee by granter. + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of their + funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic and filtered fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: >- + QueryAllowanceResponse is the response type for the Query/Allowance RPC + method. + cosmos.feegrant.v1beta1.QueryAllowancesResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of + their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic and filtered fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: allowances are allowance's granted for grantee by granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllowancesResponse is the response type for the Query/Allowances RPC + method. + cosmos.gov.v1beta1.Deposit: + type: object + properties: + proposalId: + type: string + format: uint64 + depositor: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + cosmos.gov.v1beta1.DepositParams: + type: object + properties: + minDeposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + maxDepositPeriod: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + months. + description: DepositParams defines the params for deposits on governance proposals. + cosmos.gov.v1beta1.MsgDepositResponse: + type: object + description: MsgDepositResponse defines the Msg/Deposit response type. + cosmos.gov.v1beta1.MsgSubmitProposalResponse: + type: object + properties: + proposalId: + type: string + format: uint64 + description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. + cosmos.gov.v1beta1.MsgVoteResponse: + type: object + description: MsgVoteResponse defines the Msg/Vote response type. + cosmos.gov.v1beta1.MsgVoteWeightedResponse: + type: object + description: |- + MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. + + Since: cosmos-sdk 0.43 + cosmos.gov.v1beta1.Proposal: + type: object + properties: + proposalId: + type: string + format: uint64 + content: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + finalTallyResult: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + noWithVeto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submitTime: + type: string + format: date-time + depositEndTime: + type: string + format: date-time + totalDeposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + votingStartTime: + type: string + format: date-time + votingEndTime: + type: string + format: date-time + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1beta1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1beta1.QueryDepositResponse: + type: object + properties: + deposit: + type: object + properties: + proposalId: + type: string + format: uint64 + depositor: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + cosmos.gov.v1beta1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposalId: + type: string + format: uint64 + depositor: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + Deposit defines an amount deposited by an account address to an + active + + proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDepositsResponse is the response type for the Query/Deposits RPC + method. + cosmos.gov.v1beta1.QueryParamsResponse: + type: object + properties: + votingParams: + description: voting_params defines the parameters related to voting. + type: object + properties: + votingPeriod: + type: string + description: Length of the voting period. + depositParams: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + minDeposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + maxDepositPeriod: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + months. + tallyParams: + description: tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + format: byte + description: >- + Minimum percentage of total stake needed to vote for a result to + be + considered valid. + threshold: + type: string + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + vetoThreshold: + type: string + format: byte + description: >- + Minimum value of Veto votes to Total votes ratio for proposal to + be + vetoed. Default value: 1/3. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.gov.v1beta1.QueryProposalResponse: + type: object + properties: + proposal: + type: object + properties: + proposalId: + type: string + format: uint64 + content: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + finalTallyResult: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + noWithVeto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submitTime: + type: string + format: date-time + depositEndTime: + type: string + format: date-time + totalDeposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + votingStartTime: + type: string + format: date-time + votingEndTime: + type: string + format: date-time + description: Proposal defines the core field members of a governance proposal. + description: >- + QueryProposalResponse is the response type for the Query/Proposal RPC + method. + cosmos.gov.v1beta1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + proposalId: + type: string + format: uint64 + content: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + finalTallyResult: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + noWithVeto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submitTime: + type: string + format: date-time + depositEndTime: + type: string + format: date-time + totalDeposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + votingStartTime: + type: string + format: date-time + votingEndTime: + type: string + format: date-time + description: Proposal defines the core field members of a governance proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + cosmos.gov.v1beta1.QueryTallyResultResponse: + type: object + properties: + tally: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + noWithVeto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + cosmos.gov.v1beta1.QueryVoteResponse: + type: object + properties: + vote: + type: object + properties: + proposalId: + type: string + format: uint64 + voter: + type: string + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set in + queries + + if and only if `len(options) == 1` and that option has weight 1. + In all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given + governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + cosmos.gov.v1beta1.QueryVotesResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposalId: + type: string + format: uint64 + voter: + type: string + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set + in queries + + if and only if `len(options) == 1` and that option has weight 1. + In all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given + governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defined the queried votes. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + cosmos.gov.v1beta1.TallyParams: + type: object + properties: + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + vetoThreshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + description: TallyParams defines the params for tallying votes on governance proposals. + cosmos.gov.v1beta1.TallyResult: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + noWithVeto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + cosmos.gov.v1beta1.Vote: + type: object + properties: + proposalId: + type: string + format: uint64 + voter: + type: string + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set in + queries + + if and only if `len(options) == 1` and that option has weight 1. In + all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given + governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + cosmos.gov.v1beta1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given governance + proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.gov.v1beta1.VotingParams: + type: object + properties: + votingPeriod: + type: string + description: Length of the voting period. + description: VotingParams defines the params for voting on governance proposals. + cosmos.gov.v1beta1.WeightedVoteOption: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given governance + proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + cosmos.slashing.v1beta1.MsgUnjailResponse: + type: object + title: MsgUnjailResponse defines the Msg/Unjail response type + cosmos.slashing.v1beta1.Params: + type: object + properties: + signedBlocksWindow: + type: string + format: int64 + minSignedPerWindow: + type: string + format: byte + downtimeJailDuration: + type: string + slashFractionDoubleSign: + type: string + format: byte + slashFractionDowntime: + type: string + format: byte + description: Params represents the parameters used for by the slashing module. + cosmos.slashing.v1beta1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + signedBlocksWindow: + type: string + format: int64 + minSignedPerWindow: + type: string + format: byte + downtimeJailDuration: + type: string + slashFractionDoubleSign: + type: string + format: byte + slashFractionDowntime: + type: string + format: byte + description: Params represents the parameters used for by the slashing module. + title: QueryParamsResponse is the response type for the Query/Params RPC method + cosmos.slashing.v1beta1.QuerySigningInfoResponse: + type: object + properties: + valSigningInfo: + type: object + properties: + address: + type: string + startHeight: + type: string + format: int64 + title: Height at which validator was first a candidate OR was unjailed + indexOffset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in + conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailedUntil: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set + + once the validator commits an equivocation or for any other + configured misbehiavor. + missedBlocksCounter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for monitoring + their + + liveness activity. + title: val_signing_info is the signing info of requested val cons address + title: >- + QuerySigningInfoResponse is the response type for the Query/SigningInfo + RPC + + method + cosmos.slashing.v1beta1.QuerySigningInfosResponse: + type: object + properties: + info: + type: array + items: + type: object + properties: + address: + type: string + startHeight: + type: string + format: int64 + title: Height at which validator was first a candidate OR was unjailed + indexOffset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in + conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailedUntil: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set + + once the validator commits an equivocation or for any other + configured misbehiavor. + missedBlocksCounter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their + + liveness activity. + title: info is the signing info of all validators + pagination: + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QuerySigningInfosResponse is the response type for the Query/SigningInfos + RPC + + method + cosmos.slashing.v1beta1.ValidatorSigningInfo: + type: object + properties: + address: + type: string + startHeight: + type: string + format: int64 + title: Height at which validator was first a candidate OR was unjailed + indexOffset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in conjunction + with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailedUntil: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set + + once the validator commits an equivocation or for any other configured + misbehiavor. + missedBlocksCounter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for monitoring + their + + liveness activity. + cosmos.staking.v1beta1.BondStatus: + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. + cosmos.staking.v1beta1.Commission: + type: object + properties: + commissionRates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: 'rate is the commission rate charged to delegators, as a fraction.' + maxRate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + maxChangeRate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + updateTime: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + description: Commission defines commission parameters for a given validator. + cosmos.staking.v1beta1.CommissionRates: + type: object + properties: + rate: + type: string + description: 'rate is the commission rate charged to delegators, as a fraction.' + maxRate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + maxChangeRate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + description: >- + CommissionRates defines the initial commission rates to be used for + creating + + a validator. + cosmos.staking.v1beta1.Delegation: + type: object + properties: + delegatorAddress: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validatorAddress: + type: string + description: validator_address is the bech32-encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + cosmos.staking.v1beta1.DelegationResponse: + type: object + properties: + delegation: + type: object + properties: + delegatorAddress: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validatorAddress: + type: string + description: validator_address is the bech32-encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + cosmos.staking.v1beta1.Description: + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + securityContact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + description: Description defines a validator description. + cosmos.staking.v1beta1.HistoricalInfo: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chainId: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + lastBlockId: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + partSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + lastCommitHash: + type: string + format: byte + title: hashes of block data + dataHash: + type: string + format: byte + validatorsHash: + type: string + format: byte + title: hashes from the app output from the prev block + nextValidatorsHash: + type: string + format: byte + consensusHash: + type: string + format: byte + appHash: + type: string + format: byte + lastResultsHash: + type: string + format: byte + evidenceHash: + type: string + format: byte + title: consensus info + proposerAddress: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + valset: + type: array + items: + type: object + properties: + operatorAddress: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensusPubkey: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegatorShares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + securityContact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbondingHeight: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbondingTime: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commissionRates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + maxRate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + maxChangeRate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + updateTime: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + minSelfDelegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: >- + HistoricalInfo contains header and validator information for a given + block. + + It is stored as part of staking module's state, which persists the `n` + most + + recent HistoricalInfo + + (`n` is set by the staking module's `historical_entries` parameter). + cosmos.staking.v1beta1.MsgBeginRedelegateResponse: + type: object + properties: + completionTime: + type: string + format: date-time + description: MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. + cosmos.staking.v1beta1.MsgCreateValidatorResponse: + type: object + description: MsgCreateValidatorResponse defines the Msg/CreateValidator response type. + cosmos.staking.v1beta1.MsgDelegateResponse: + type: object + description: MsgDelegateResponse defines the Msg/Delegate response type. + cosmos.staking.v1beta1.MsgEditValidatorResponse: + type: object + description: MsgEditValidatorResponse defines the Msg/EditValidator response type. + cosmos.staking.v1beta1.MsgUndelegateResponse: + type: object + properties: + completionTime: + type: string + format: date-time + description: MsgUndelegateResponse defines the Msg/Undelegate response type. + cosmos.staking.v1beta1.Params: + type: object + properties: + unbondingTime: + type: string + description: unbonding_time is the time duration of unbonding. + maxValidators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + maxEntries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historicalEntries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bondDenom: + type: string + description: bond_denom defines the bondable coin denomination. + description: Params defines the parameters for the staking module. + cosmos.staking.v1beta1.Pool: + type: object + properties: + notBondedTokens: + type: string + bondedTokens: + type: string + description: |- + Pool is used for tracking bonded and not-bonded token supply of the bond + denomination. + cosmos.staking.v1beta1.QueryDelegationResponse: + type: object + properties: + delegationResponse: + type: object + properties: + delegation: + type: object + properties: + delegatorAddress: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validatorAddress: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. + description: >- + Delegation represents the bond with tokens held by an account. It + is + + owned by one delegator, and is associated with the voting power of + one + + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it contains + a + + balance in addition to shares which is more suitable for client + responses. + description: >- + QueryDelegationResponse is response type for the Query/Delegation RPC + method. + cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: + type: object + properties: + delegationResponses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegatorAddress: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validatorAddress: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. + description: >- + Delegation represents the bond with tokens held by an account. + It is + + owned by one delegator, and is associated with the voting power + of one + + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it + contains a + + balance in addition to shares which is more suitable for client + responses. + description: delegation_responses defines all the delegations' info of a delegator. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: + type: object + properties: + unbondingResponses: + type: array + items: + type: object + properties: + delegatorAddress: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validatorAddress: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creationHeight: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completionTime: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initialBalance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's unbonding + bonds + + for a single validator in an time-ordered list. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryUnbondingDelegatorDelegationsResponse is response type for the + Query/UnbondingDelegatorDelegations RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: + type: object + properties: + validator: + type: object + properties: + operatorAddress: + type: string + description: >- + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensusPubkey: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegatorShares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + securityContact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbondingHeight: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbondingTime: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commissionRates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + maxRate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + maxChangeRate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + updateTime: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + minSelfDelegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operatorAddress: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensusPubkey: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegatorShares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + securityContact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbondingHeight: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbondingTime: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commissionRates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + maxRate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + maxChangeRate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + updateTime: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + minSelfDelegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of + future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: validators defines the the validators' info of a delegator. + pagination: + description: pagination defines the pagination in the response. type: object properties: - denom: + nextKey: type: string - amount: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - description: |- - Coin defines a token with a denomination and an amount. + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. + was set, its value is undefined otherwise description: |- - DelegationResponse is equivalent to Delegation except that it contains a - balance in addition to shares which is more suitable for client responses. - cosmos.staking.v1beta1.Description: - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - securityContact: - type: string - description: security_contact defines an optional email for security contact. - details: - type: string - description: details define other optional details. - description: Description defines a validator description. - cosmos.staking.v1beta1.HistoricalInfo: + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. + cosmos.staking.v1beta1.QueryHistoricalInfoResponse: type: object properties: - header: + hist: + description: hist defines the historical info at the given height. type: object properties: - version: - title: basic block info + header: type: object properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, - including all blockchain data structures and the rules of the - application's + including all blockchain data structures and the rules of the + application's - state transition machine. - chainId: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - lastBlockId: - title: prev block info - type: object - properties: - hash: + state transition machine. + chainId: type: string - format: byte - partSetHeader: + height: + type: string + format: int64 + time: + type: string + format: date-time + lastBlockId: + title: prev block info type: object properties: - total: - type: integer - format: int64 hash: type: string format: byte - title: PartsetHeader - lastCommitHash: - type: string - format: byte - title: hashes of block data - dataHash: - type: string - format: byte - validatorsHash: - type: string - format: byte - title: hashes from the app output from the prev block - nextValidatorsHash: - type: string - format: byte - consensusHash: - type: string - format: byte - appHash: - type: string - format: byte - lastResultsHash: - type: string - format: byte - evidenceHash: - type: string - format: byte - title: consensus info - proposerAddress: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - valset: - type: array - items: - type: object - properties: - operatorAddress: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensusPubkey: + partSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + lastCommitHash: + type: string + format: byte + title: hashes of block data + dataHash: + type: string + format: byte + validatorsHash: + type: string + format: byte + title: hashes from the app output from the prev block + nextValidatorsHash: + type: string + format: byte + consensusHash: + type: string + format: byte + appHash: + type: string + format: byte + lastResultsHash: + type: string + format: byte + evidenceHash: + type: string + format: byte + title: consensus info + proposerAddress: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + valset: + type: array + items: type: object properties: - '@type': + operatorAddress: type: string description: >- - A URL/resource name that uniquely identifies the type of the - serialized + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensusPubkey: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in + a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary + all types that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in + the official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in - the form + Protobuf library provides support to pack/unpack Any values + in the form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the + Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default - use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the last - '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with + an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom + JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding + a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegatorShares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: - type: string - description: website defines an optional website link. - securityContact: - type: string + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbondingHeight: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbondingTime: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commissionRates: + jailed defined whether the validator has been jailed from + bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegatorShares: + type: string description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: description defines the description terms for the validator. type: object properties: - rate: + moniker: type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - maxRate: + description: moniker defines a human-readable name for the validator. + identity: type: string description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - maxChangeRate: + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + securityContact: type: string description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - updateTime: + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbondingHeight: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which + this validator has begun unbonding. + unbondingTime: type: string format: date-time description: >- - update_time is the last time the commission rate was - changed. - minSelfDelegation: - type: string + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commissionRates: + description: >- + commission_rates defines the initial commission rates to + be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, + as a fraction. + maxRate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + maxChangeRate: + type: string + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. + updateTime: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + minSelfDelegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - description: >- - Validator defines a validator, together with the total amount of the + Validator defines a validator, together with the total amount of + the - Validator's bond shares and their exchange rate to coins. Slashing - results in + Validator's bond shares and their exchange rate to coins. + Slashing results in - a decrease in the exchange rate, allowing correct calculation of - future + a decrease in the exchange rate, allowing correct calculation of + future - undelegations without iterating over delegators. When coins are - delegated to + undelegations without iterating over delegators. When coins are + delegated to - this validator, the validator is credited with a delegation whose - number of + this validator, the validator is credited with a delegation + whose number of - bond shares is based on the amount of coins delegated divided by the - current + bond shares is based on the amount of coins delegated divided by + the current - exchange rate. Voting power can be calculated as total bonded shares + exchange rate. Voting power can be calculated as total bonded + shares - multiplied by exchange rate. + multiplied by exchange rate. description: >- - HistoricalInfo contains header and validator information for a given - block. - - It is stored as part of staking module's state, which persists the `n` - most - - recent HistoricalInfo + QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo + RPC - (`n` is set by the staking module's `historical_entries` parameter). - cosmos.staking.v1beta1.MsgBeginRedelegateResponse: - type: object - properties: - completionTime: - type: string - format: date-time - description: MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. - cosmos.staking.v1beta1.MsgCreateValidatorResponse: - type: object - description: MsgCreateValidatorResponse defines the Msg/CreateValidator response type. - cosmos.staking.v1beta1.MsgDelegateResponse: - type: object - description: MsgDelegateResponse defines the Msg/Delegate response type. - cosmos.staking.v1beta1.MsgEditValidatorResponse: - type: object - description: MsgEditValidatorResponse defines the Msg/EditValidator response type. - cosmos.staking.v1beta1.MsgUndelegateResponse: - type: object - properties: - completionTime: - type: string - format: date-time - description: MsgUndelegateResponse defines the Msg/Undelegate response type. - cosmos.staking.v1beta1.Params: - type: object - properties: - unbondingTime: - type: string - description: unbonding_time is the time duration of unbonding. - maxValidators: - type: integer - format: int64 - description: max_validators is the maximum number of validators. - maxEntries: - type: integer - format: int64 - description: >- - max_entries is the max entries for either unbonding delegation or - redelegation (per pair/trio). - historicalEntries: - type: integer - format: int64 - description: historical_entries is the number of historical entries to persist. - bondDenom: - type: string - description: bond_denom defines the bondable coin denomination. - description: Params defines the parameters for the staking module. - cosmos.staking.v1beta1.Pool: - type: object - properties: - notBondedTokens: - type: string - bondedTokens: - type: string - description: |- - Pool is used for tracking bonded and not-bonded token supply of the bond - denomination. - cosmos.staking.v1beta1.QueryDelegationResponse: + method. + cosmos.staking.v1beta1.QueryParamsResponse: type: object properties: - delegationResponse: + params: + description: params holds all the parameters of this module. type: object properties: - delegation: - type: object - properties: - delegatorAddress: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validatorAddress: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - shares: - type: string - description: shares define the delegation shares received. - description: >- - Delegation represents the bond with tokens held by an account. It - is - - owned by one delegator, and is associated with the voting power of - one - - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - description: >- - DelegationResponse is equivalent to Delegation except that it contains - a - - balance in addition to shares which is more suitable for client - responses. - description: >- - QueryDelegationResponse is response type for the Query/Delegation RPC - method. - cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: + unbondingTime: + type: string + description: unbonding_time is the time duration of unbonding. + maxValidators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + maxEntries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historicalEntries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bondDenom: + type: string + description: bond_denom defines the bondable coin denomination. + description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.staking.v1beta1.QueryPoolResponse: type: object properties: - delegationResponses: + pool: + description: pool defines the pool info. + type: object + properties: + notBondedTokens: + type: string + bondedTokens: + type: string + description: QueryPoolResponse is response type for the Query/Pool RPC method. + cosmos.staking.v1beta1.QueryRedelegationsResponse: + type: object + properties: + redelegationResponses: type: array items: type: object properties: - delegation: + redelegation: type: object properties: delegatorAddress: @@ -17341,44 +20729,104 @@ definitions: description: >- delegator_address is the bech32-encoded address of the delegator. - validatorAddress: + validatorSrcAddress: type: string description: >- - validator_address is the bech32-encoded address of the - validator. - shares: + validator_src_address is the validator redelegation source + operator address. + validatorDstAddress: type: string - description: shares define the delegation shares received. + description: >- + validator_dst_address is the validator redelegation + destination operator address. + entries: + type: array + items: + type: object + properties: + creationHeight: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completionTime: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initialBalance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + sharesDst: + type: string + description: >- + shares_dst is the amount of destination-validator + shares created by redelegation. + description: >- + RedelegationEntry defines a redelegation object with + relevant metadata. + description: entries are the redelegation entries. description: >- - Delegation represents the bond with tokens held by an account. - It is - - owned by one delegator, and is associated with the voting power - of one + Redelegation contains the list of a particular delegator's + redelegating bonds + from a particular source validator to a particular destination validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - + entries: + type: array + items: + type: object + properties: + redelegationEntry: + type: object + properties: + creationHeight: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completionTime: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initialBalance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + sharesDst: + type: string + description: >- + shares_dst is the amount of destination-validator + shares created by redelegation. + description: >- + RedelegationEntry defines a redelegation object with + relevant metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry + except that it - NOTE: The amount field is an Int which implements the custom - method + contains a balance in addition to shares which is more + suitable for client - signatures required by gogoproto. + responses. description: >- - DelegationResponse is equivalent to Delegation except that it - contains a + RedelegationResponse is equivalent to a Redelegation except that its + entries + + contain a balance in addition to shares which is more suitable for + client - balance in addition to shares which is more suitable for client responses. - description: delegation_responses defines all the delegations' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object @@ -17397,59 +20845,109 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise + description: >- + QueryRedelegationsResponse is response type for the Query/Redelegations + RPC + + method. + cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: + type: object + properties: + unbond: + type: object + properties: + delegatorAddress: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validatorAddress: + type: string + description: validator_address is the bech32-encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creationHeight: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completionTime: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initialBalance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the unbonding delegation entries. + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. description: |- - QueryDelegatorDelegationsResponse is response type for the - Query/DelegatorDelegations RPC method. - cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: + QueryDelegationResponse is response type for the Query/UnbondingDelegation + RPC method. + cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: type: object properties: - unbondingResponses: + delegationResponses: type: array items: type: object properties: - delegatorAddress: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validatorAddress: - type: string + delegation: + type: object + properties: + delegatorAddress: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validatorAddress: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. description: >- - validator_address is the bech32-encoded address of the - validator. - entries: - type: array - items: - type: object - properties: - creationHeight: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding took - place. - completionTime: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initialBalance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: entries are the unbonding delegation entries. + Delegation represents the bond with tokens held by an account. + It is + + owned by one delegator, and is associated with the voting power + of one + + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. description: >- - UnbondingDelegation stores all of a single delegator's unbonding - bonds + DelegationResponse is equivalent to Delegation except that it + contains a - for a single validator in an time-ordered list. + balance in addition to shares which is more suitable for client + responses. pagination: description: pagination defines the pagination in the response. type: object @@ -17468,593 +20966,346 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- - QueryUnbondingDelegatorDelegationsResponse is response type for the - Query/UnbondingDelegatorDelegations RPC method. - cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + cosmos.staking.v1beta1.QueryValidatorResponse: type: object properties: - validator: - type: object - properties: - operatorAddress: - type: string - description: >- - operator_address defines the address of the validator's operator; - bech encoded in JSON. - consensusPubkey: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegatorShares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - securityContact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbondingHeight: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbondingTime: + validator: + type: object + properties: + operatorAddress: type: string - format: date-time description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensusPubkey: type: object properties: - commissionRates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - maxRate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - maxChangeRate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - updateTime: + '@type': type: string - format: date-time - description: update_time is the last time the commission rate was changed. - minSelfDelegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum self - delegation. - description: >- - Validator defines a validator, together with the total amount of the + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - Validator's bond shares and their exchange rate to coins. Slashing - results in + protocol buffer message. This string must contain at least - a decrease in the exchange rate, allowing correct calculation of - future + one "/" character. The last segment of the URL's path must + represent - undelegations without iterating over delegators. When coins are - delegated to + the fully qualified name of the type (as in - this validator, the validator is credited with a delegation whose - number of + `path/google.protobuf.Duration`). The name should be in a + canonical form - bond shares is based on the amount of coins delegated divided by the - current + (e.g., leading "." is not accepted). - exchange rate. Voting power can be calculated as total bonded shares - multiplied by exchange rate. - description: |- - QueryDelegatorValidatorResponse response type for the - Query/DelegatorValidator RPC method. - cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: - type: object - properties: - validators: - type: array - items: - type: object - properties: - operatorAddress: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensusPubkey: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + In practice, teams usually precompile into the binary all + types that they - protocol buffer message. This string must contain at least + expect it to use in the context of Any. However, for URLs + which use the - one "/" character. The last segment of the URL's path must - represent + scheme `http`, `https`, or no scheme, one can optionally set + up a type - the fully qualified name of the type (as in + server that maps type URLs to message definitions as follows: - `path/google.protobuf.Duration`). The name should be in a - canonical form - (e.g., leading "." is not accepted). + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - In practice, teams usually precompile into the binary all - types that they + Note: this functionality is not currently available in the + official - expect it to use in the context of Any. However, for URLs - which use the + protobuf release, and it is not used for type URLs beginning + with - scheme `http`, `https`, or no scheme, one can optionally set - up a type + type.googleapis.com. - server that maps type URLs to message definitions as - follows: + Schemes other than `http`, `https` (or the empty scheme) might + be - * If no scheme is provided, `https` is assumed. + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + URL that describes the type of the serialized message. - Note: this functionality is not currently available in the - official - protobuf release, and it is not used for type URLs beginning - with + Protobuf library provides support to pack/unpack Any values in the + form - type.googleapis.com. + of utility functions or additional generated methods of the Any + type. - Schemes other than `http`, `https` (or the empty scheme) - might be + Example 1: Pack and unpack a message in C++. - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - URL that describes the type of the serialized message. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Protobuf library provides support to pack/unpack Any values in - the form + Example 3: Pack and unpack a message in Python. - of utility functions or additional generated methods of the Any - type. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + Example 4: Pack and unpack a message in Go - Example 1: Pack and unpack a message in C++. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + The pack methods provided by protobuf library will by default use - Example 2: Pack and unpack a message in Java. + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + methods only use the fully qualified type name after the last '/' - Example 3: Pack and unpack a message in Python. + in the type URL, for example "foo.bar.com/x/y.z" will yield type - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + name "y.z". - Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - The pack methods provided by protobuf library will by default - use + JSON - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + ==== - methods only use the fully qualified type name after the last - '/' + The JSON representation of an `Any` value uses the regular - in the type URL, for example "foo.bar.com/x/y.z" will yield type + representation of the deserialized, embedded message, with an - name "y.z". + additional field `@type` which contains the type URL. Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - JSON + If the embedded message type is well-known and has a custom JSON - ==== + representation, that representation will be embedded adding a + field - The JSON representation of an `Any` value uses the regular + `value` which holds the custom JSON in addition to the `@type` - representation of the deserialized, embedded message, with an + field. Example (for message [google.protobuf.Duration][]): - additional field `@type` which contains the type URL. Example: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegatorShares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + securityContact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbondingHeight: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbondingTime: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commissionRates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + maxRate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + maxChangeRate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + updateTime: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + minSelfDelegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + description: >- + Validator defines a validator, together with the total amount of the - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Validator's bond shares and their exchange rate to coins. Slashing + results in - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + a decrease in the exchange rate, allowing correct calculation of + future - If the embedded message type is well-known and has a custom JSON + undelegations without iterating over delegators. When coins are + delegated to - representation, that representation will be embedded adding a - field + this validator, the validator is credited with a delegation whose + number of - `value` which holds the custom JSON in addition to the `@type` + bond shares is based on the amount of coins delegated divided by the + current - field. Example (for message [google.protobuf.Duration][]): + exchange rate. Voting power can be calculated as total bonded shares - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegatorShares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: - type: string - description: website defines an optional website link. - securityContact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbondingHeight: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbondingTime: + multiplied by exchange rate. + title: QueryValidatorResponse is response type for the Query/Validator RPC method + cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: + type: object + properties: + unbondingResponses: + type: array + items: + type: object + properties: + delegatorAddress: type: string - format: date-time description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commissionRates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - maxRate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - maxChangeRate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - updateTime: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - minSelfDelegation: + delegator_address is the bech32-encoded address of the + delegator. + validatorAddress: type: string description: >- - min_self_delegation is the validator's self declared minimum - self delegation. + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creationHeight: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completionTime: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initialBalance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the unbonding delegation entries. description: >- - Validator defines a validator, together with the total amount of the - - Validator's bond shares and their exchange rate to coins. Slashing - results in - - a decrease in the exchange rate, allowing correct calculation of - future - - undelegations without iterating over delegators. When coins are - delegated to - - this validator, the validator is credited with a delegation whose - number of - - bond shares is based on the amount of coins delegated divided by the - current - - exchange rate. Voting power can be calculated as total bonded shares + UnbondingDelegation stores all of a single delegator's unbonding + bonds - multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. + for a single validator in an time-ordered list. pagination: description: pagination defines the pagination in the response. type: object @@ -18074,585 +21325,453 @@ definitions: was set, its value is undefined otherwise description: |- - QueryDelegatorValidatorsResponse is response type for the - Query/DelegatorValidators RPC method. - cosmos.staking.v1beta1.QueryHistoricalInfoResponse: + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + cosmos.staking.v1beta1.QueryValidatorsResponse: type: object properties: - hist: - description: hist defines the historical info at the given height. - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chainId: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - lastBlockId: - title: prev block info - type: object - properties: - hash: - type: string - format: byte - partSetHeader: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - lastCommitHash: - type: string - format: byte - title: hashes of block data - dataHash: - type: string - format: byte - validatorsHash: - type: string - format: byte - title: hashes from the app output from the prev block - nextValidatorsHash: - type: string - format: byte - consensusHash: - type: string - format: byte - appHash: - type: string - format: byte - lastResultsHash: - type: string - format: byte - evidenceHash: - type: string - format: byte - title: consensus info - proposerAddress: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - valset: - type: array - items: + validators: + type: array + items: + type: object + properties: + operatorAddress: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensusPubkey: type: object properties: - operatorAddress: + '@type': type: string description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensusPubkey: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values - in the form + Protobuf library provides support to pack/unpack Any values in + the form - of utility functions or additional generated methods of the - Any type. + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by default + use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the last + '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom - JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding - a field + representation, that representation will be embedded adding a + field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from - bonded status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegatorShares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegatorShares: + description: moniker defines a human-readable name for the validator. + identity: type: string description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. - UPort or Keybase). - website: - type: string - description: website defines an optional website link. - securityContact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbondingHeight: + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + securityContact: type: string - format: int64 description: >- - unbonding_height defines, if unbonding, the height at which - this validator has begun unbonding. - unbondingTime: + security_contact defines an optional email for security + contact. + details: type: string - format: date-time + description: details define other optional details. + unbondingHeight: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbondingTime: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commissionRates: description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. + commission_rates defines the initial commission rates to be + used for creating a validator. type: object - properties: - commissionRates: - description: >- - commission_rates defines the initial commission rates to - be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, - as a fraction. - maxRate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - maxChangeRate: - type: string - description: >- - max_change_rate defines the maximum daily increase - of the validator commission, as a fraction. - updateTime: + properties: + rate: type: string - format: date-time description: >- - update_time is the last time the commission rate was - changed. - minSelfDelegation: + rate is the commission rate charged to delegators, as a + fraction. + maxRate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + maxChangeRate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + updateTime: type: string + format: date-time description: >- - min_self_delegation is the validator's self declared minimum - self delegation. + update_time is the last time the commission rate was + changed. + minSelfDelegation: + type: string description: >- - Validator defines a validator, together with the total amount of - the - - Validator's bond shares and their exchange rate to coins. - Slashing results in + min_self_delegation is the validator's self declared minimum + self delegation. + description: >- + Validator defines a validator, together with the total amount of the - a decrease in the exchange rate, allowing correct calculation of - future + Validator's bond shares and their exchange rate to coins. Slashing + results in - undelegations without iterating over delegators. When coins are - delegated to + a decrease in the exchange rate, allowing correct calculation of + future - this validator, the validator is credited with a delegation - whose number of + undelegations without iterating over delegators. When coins are + delegated to - bond shares is based on the amount of coins delegated divided by - the current + this validator, the validator is credited with a delegation whose + number of - exchange rate. Voting power can be calculated as total bonded - shares + bond shares is based on the amount of coins delegated divided by the + current - multiplied by exchange rate. - description: >- - QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo - RPC + exchange rate. Voting power can be calculated as total bonded shares - method. - cosmos.staking.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - unbondingTime: - type: string - description: unbonding_time is the time duration of unbonding. - maxValidators: - type: integer - format: int64 - description: max_validators is the maximum number of validators. - maxEntries: - type: integer - format: int64 - description: >- - max_entries is the max entries for either unbonding delegation or - redelegation (per pair/trio). - historicalEntries: - type: integer - format: int64 - description: historical_entries is the number of historical entries to persist. - bondDenom: - type: string - description: bond_denom defines the bondable coin denomination. - description: QueryParamsResponse is response type for the Query/Params RPC method. - cosmos.staking.v1beta1.QueryPoolResponse: - type: object - properties: - pool: - description: pool defines the pool info. + multiplied by exchange rate. + description: validators contains all the queried validators. + pagination: + description: pagination defines the pagination in the response. type: object properties: - notBondedTokens: + nextKey: type: string - bondedTokens: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - description: QueryPoolResponse is response type for the Query/Pool RPC method. - cosmos.staking.v1beta1.QueryRedelegationsResponse: + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: >- + QueryValidatorsResponse is response type for the Query/Validators RPC + method + cosmos.staking.v1beta1.Redelegation: type: object properties: - redelegationResponses: + delegatorAddress: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validatorSrcAddress: + type: string + description: >- + validator_src_address is the validator redelegation source operator + address. + validatorDstAddress: + type: string + description: >- + validator_dst_address is the validator redelegation destination + operator address. + entries: type: array items: type: object properties: - redelegation: - type: object - properties: - delegatorAddress: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validatorSrcAddress: - type: string - description: >- - validator_src_address is the validator redelegation source - operator address. - validatorDstAddress: - type: string - description: >- - validator_dst_address is the validator redelegation - destination operator address. - entries: - type: array - items: - type: object - properties: - creationHeight: - type: string - format: int64 - description: >- - creation_height defines the height which the - redelegation took place. - completionTime: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initialBalance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - sharesDst: - type: string - description: >- - shares_dst is the amount of destination-validator - shares created by redelegation. - description: >- - RedelegationEntry defines a redelegation object with - relevant metadata. - description: entries are the redelegation entries. + creationHeight: + type: string + format: int64 description: >- - Redelegation contains the list of a particular delegator's - redelegating bonds - - from a particular source validator to a particular destination - validator. - entries: - type: array - items: - type: object - properties: - redelegationEntry: - type: object - properties: - creationHeight: - type: string - format: int64 - description: >- - creation_height defines the height which the - redelegation took place. - completionTime: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initialBalance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - sharesDst: - type: string - description: >- - shares_dst is the amount of destination-validator - shares created by redelegation. - description: >- - RedelegationEntry defines a redelegation object with - relevant metadata. - balance: - type: string - description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry - except that it - - contains a balance in addition to shares which is more - suitable for client - - responses. + creation_height defines the height which the redelegation took + place. + completionTime: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initialBalance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + sharesDst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created + by redelegation. description: >- - RedelegationResponse is equivalent to a Redelegation except that its - entries - - contain a balance in addition to shares which is more suitable for - client + RedelegationEntry defines a redelegation object with relevant + metadata. + description: entries are the redelegation entries. + description: >- + Redelegation contains the list of a particular delegator's redelegating + bonds - responses. - pagination: - description: pagination defines the pagination in the response. + from a particular source validator to a particular destination validator. + cosmos.staking.v1beta1.RedelegationEntry: + type: object + properties: + creationHeight: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completionTime: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initialBalance: + type: string + description: initial_balance defines the initial balance when redelegation started. + sharesDst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + description: RedelegationEntry defines a redelegation object with relevant metadata. + cosmos.staking.v1beta1.RedelegationEntryResponse: + type: object + properties: + redelegationEntry: type: object properties: - nextKey: + creationHeight: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + format: int64 + description: >- + creation_height defines the height which the redelegation took + place. + completionTime: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise + format: date-time + description: completion_time defines the unix time for redelegation completion. + initialBalance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + sharesDst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created + by redelegation. + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + balance: + type: string description: >- - QueryRedelegationsResponse is response type for the Query/Redelegations - RPC + RedelegationEntryResponse is equivalent to a RedelegationEntry except that + it - method. - cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: + contains a balance in addition to shares which is more suitable for client + + responses. + cosmos.staking.v1beta1.RedelegationResponse: type: object properties: - unbond: + redelegation: type: object properties: delegatorAddress: type: string description: delegator_address is the bech32-encoded address of the delegator. - validatorAddress: + validatorSrcAddress: type: string - description: validator_address is the bech32-encoded address of the validator. + description: >- + validator_src_address is the validator redelegation source + operator address. + validatorDstAddress: + type: string + description: >- + validator_dst_address is the validator redelegation destination + operator address. entries: type: array items: @@ -18662,757 +21781,942 @@ definitions: type: string format: int64 description: >- - creation_height is the height which the unbonding took - place. + creation_height defines the height which the redelegation + took place. completionTime: type: string format: date-time - description: completion_time is the unix time for unbonding completion. + description: >- + completion_time defines the unix time for redelegation + completion. initialBalance: type: string description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: + initial_balance defines the initial balance when + redelegation started. + sharesDst: type: string - description: balance defines the tokens to receive at completion. + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: entries are the unbonding delegation entries. - description: |- - UnbondingDelegation stores all of a single delegator's unbonding bonds - for a single validator in an time-ordered list. - description: |- - QueryDelegationResponse is response type for the Query/UnbondingDelegation - RPC method. - cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: - type: object - properties: - delegationResponses: + RedelegationEntry defines a redelegation object with relevant + metadata. + description: entries are the redelegation entries. + description: >- + Redelegation contains the list of a particular delegator's + redelegating bonds + + from a particular source validator to a particular destination + validator. + entries: type: array items: type: object properties: - delegation: + redelegationEntry: type: object properties: - delegatorAddress: + creationHeight: type: string + format: int64 description: >- - delegator_address is the bech32-encoded address of the - delegator. - validatorAddress: + creation_height defines the height which the redelegation + took place. + completionTime: type: string + format: date-time description: >- - validator_address is the bech32-encoded address of the - validator. - shares: - type: string - description: shares define the delegation shares received. - description: >- - Delegation represents the bond with tokens held by an account. - It is - - owned by one delegator, and is associated with the voting power - of one - - validator. - balance: - type: object - properties: - denom: + completion_time defines the unix time for redelegation + completion. + initialBalance: type: string - amount: + description: >- + initial_balance defines the initial balance when + redelegation started. + sharesDst: type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. + RedelegationEntry defines a redelegation object with relevant + metadata. + balance: + type: string description: >- - DelegationResponse is equivalent to Delegation except that it - contains a + RedelegationEntryResponse is equivalent to a RedelegationEntry + except that it + + contains a balance in addition to shares which is more suitable for + client - balance in addition to shares which is more suitable for client responses. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - nextKey: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + RedelegationResponse is equivalent to a Redelegation except that its + entries - was set, its value is undefined otherwise - title: |- - QueryValidatorDelegationsResponse is response type for the - Query/ValidatorDelegations RPC method - cosmos.staking.v1beta1.QueryValidatorResponse: + contain a balance in addition to shares which is more suitable for client + + responses. + cosmos.staking.v1beta1.UnbondingDelegation: + type: object + properties: + delegatorAddress: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validatorAddress: + type: string + description: validator_address is the bech32-encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creationHeight: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completionTime: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initialBalance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + description: entries are the unbonding delegation entries. + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + cosmos.staking.v1beta1.UnbondingDelegationEntry: type: object properties: - validator: + creationHeight: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completionTime: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initialBalance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + cosmos.staking.v1beta1.Validator: + type: object + properties: + operatorAddress: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensusPubkey: type: object properties: - operatorAddress: + '@type': type: string description: >- - operator_address defines the address of the validator's operator; - bech encoded in JSON. - consensusPubkey: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set up a + type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form + Protobuf library provides support to pack/unpack Any values in the + form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegatorShares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). + identity defines an optional identity signature (ex. UPort or + Keybase). + website: type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: + description: website defines an optional website link. + securityContact: type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegatorShares: + description: security_contact defines an optional email for security contact. + details: type: string + description: details define other optional details. + unbondingHeight: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbondingTime: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator + to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commissionRates: description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. + commission_rates defines the initial commission rates to be used + for creating a validator. type: object properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: + rate: type: string description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - securityContact: + rate is the commission rate charged to delegators, as a + fraction. + maxRate: type: string description: >- - security_contact defines an optional email for security - contact. - details: + max_rate defines the maximum commission rate which validator + can ever charge, as a fraction. + maxChangeRate: type: string - description: details define other optional details. - unbondingHeight: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbondingTime: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commissionRates: description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - maxRate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - maxChangeRate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - updateTime: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - minSelfDelegation: + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + updateTime: type: string - description: >- - min_self_delegation is the validator's self declared minimum self - delegation. + format: date-time + description: update_time is the last time the commission rate was changed. + minSelfDelegation: + type: string description: >- - Validator defines a validator, together with the total amount of the + min_self_delegation is the validator's self declared minimum self + delegation. + description: >- + Validator defines a validator, together with the total amount of the - Validator's bond shares and their exchange rate to coins. Slashing - results in + Validator's bond shares and their exchange rate to coins. Slashing results + in - a decrease in the exchange rate, allowing correct calculation of - future + a decrease in the exchange rate, allowing correct calculation of future - undelegations without iterating over delegators. When coins are - delegated to + undelegations without iterating over delegators. When coins are delegated + to - this validator, the validator is credited with a delegation whose - number of + this validator, the validator is credited with a delegation whose number + of - bond shares is based on the amount of coins delegated divided by the - current + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + tendermint.types.BlockID: + type: object + properties: + hash: + type: string + format: byte + partSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + tendermint.types.Header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chainId: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + lastBlockId: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + partSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + lastCommitHash: + type: string + format: byte + title: hashes of block data + dataHash: + type: string + format: byte + validatorsHash: + type: string + format: byte + title: hashes from the app output from the prev block + nextValidatorsHash: + type: string + format: byte + consensusHash: + type: string + format: byte + appHash: + type: string + format: byte + lastResultsHash: + type: string + format: byte + evidenceHash: + type: string + format: byte + title: consensus info + proposerAddress: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + tendermint.types.PartSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + tendermint.version.Consensus: + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, - exchange rate. Voting power can be calculated as total bonded shares + including all blockchain data structures and the rules of the + application's - multiplied by exchange rate. - title: QueryValidatorResponse is response type for the Query/Validator RPC method - cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: + state transition machine. + cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse: + type: object + description: >- + MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount + response type. + cosmwasm.wasm.v1.AbsoluteTxPosition: type: object properties: - unbondingResponses: - type: array - items: - type: object - properties: - delegatorAddress: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validatorAddress: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - entries: - type: array - items: - type: object - properties: - creationHeight: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding took - place. - completionTime: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initialBalance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: entries are the unbonding delegation entries. - description: >- - UnbondingDelegation stores all of a single delegator's unbonding - bonds + blockHeight: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + txIndex: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual transaction + index, - for a single validator in an time-ordered list. - pagination: - description: pagination defines the pagination in the response. + or gas consumed) + description: |- + AbsoluteTxPosition is a unique transaction position that allows for global + ordering of transactions. + cosmwasm.wasm.v1.AccessConfig: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_ONLY_ADDRESS + - ACCESS_TYPE_EVERYBODY + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty + value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_ONLY_ADDRESS: AccessTypeOnlyAddress restricted to an address + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + title: AccessType permission types + address: + type: string + description: AccessConfig access control type. + cosmwasm.wasm.v1.AccessType: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_ONLY_ADDRESS + - ACCESS_TYPE_EVERYBODY + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty + value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_ONLY_ADDRESS: AccessTypeOnlyAddress restricted to an address + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + title: AccessType permission types + cosmwasm.wasm.v1.CodeInfoResponse: + type: object + properties: + codeId: + type: string + format: uint64 + creator: + type: string + dataHash: + type: string + format: byte + title: CodeInfoResponse contains code meta data from CodeInfo + cosmwasm.wasm.v1.ContractCodeHistoryEntry: + type: object + properties: + operation: + type: string + enum: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS + default: CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + description: >- + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + ContractCodeHistoryOperationTypeUnspecified placeholder for empty + value + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data + title: ContractCodeHistoryOperationType actions that caused a code change + codeId: + type: string + format: uint64 + title: CodeID is the reference to the stored WASM code + updated: + description: Updated Tx position when the operation was executed. type: object properties: - nextKey: + blockHeight: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + format: uint64 + title: BlockHeight is the block the contract was created at + txIndex: type: string format: uint64 title: >- - total is total number of results available if - PageRequest.count_total + TxIndex is a monotonic counter within the block (actual + transaction index, - was set, its value is undefined otherwise - description: |- - QueryValidatorUnbondingDelegationsResponse is response type for the - Query/ValidatorUnbondingDelegations RPC method. - cosmos.staking.v1beta1.QueryValidatorsResponse: + or gas consumed) + msg: + type: string + format: byte + description: ContractCodeHistoryEntry metadata to a contract. + cosmwasm.wasm.v1.ContractCodeHistoryOperationType: + type: string + enum: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS + default: CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + description: >- + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + ContractCodeHistoryOperationTypeUnspecified placeholder for empty value + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data + title: ContractCodeHistoryOperationType actions that caused a code change + cosmwasm.wasm.v1.ContractInfo: type: object properties: - validators: - type: array - items: - type: object - properties: - operatorAddress: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensusPubkey: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). + codeId: + type: string + format: uint64 + title: CodeID is the reference to the stored Wasm code + creator: + type: string + title: Creator address who initially instantiated the contract + admin: + type: string + title: Admin is an optional address that can execute migrations + label: + type: string + description: Label is optional metadata to be stored with a contract instance. + created: + title: >- + Created Tx position when the contract was instantiated. + This data should kept internal and not be exposed via query results. + Just - In practice, teams usually precompile into the binary all - types that they + use for sorting + type: object + properties: + blockHeight: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + txIndex: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual + transaction index, - expect it to use in the context of Any. However, for URLs - which use the + or gas consumed) + description: >- + AbsoluteTxPosition is a unique transaction position that allows for + global - scheme `http`, `https`, or no scheme, one can optionally set - up a type + ordering of transactions. + ibcPortId: + type: string + extension: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - server that maps type URLs to message definitions as - follows: + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must + represent - * If no scheme is provided, `https` is assumed. + the fully qualified name of the type (as in - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + `path/google.protobuf.Duration`). The name should be in a + canonical form - Note: this functionality is not currently available in the - official + (e.g., leading "." is not accepted). - protobuf release, and it is not used for type URLs beginning - with - type.googleapis.com. + In practice, teams usually precompile into the binary all types + that they + expect it to use in the context of Any. However, for URLs which + use the - Schemes other than `http`, `https` (or the empty scheme) - might be + scheme `http`, `https`, or no scheme, one can optionally set up a + type - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + server that maps type URLs to message definitions as follows: - URL that describes the type of the serialized message. + * If no scheme is provided, `https` is assumed. - Protobuf library provides support to pack/unpack Any values in - the form + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - of utility functions or additional generated methods of the Any - type. + Note: this functionality is not currently available in the + official + protobuf release, and it is not used for type URLs beginning with - Example 1: Pack and unpack a message in C++. + type.googleapis.com. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + Schemes other than `http`, `https` (or the empty scheme) might be - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - Example 3: Pack and unpack a message in Python. + URL that describes the type of the serialized message. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Protobuf library provides support to pack/unpack Any values in the + form - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + of utility functions or additional generated methods of the Any type. - The pack methods provided by protobuf library will by default - use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + Example 1: Pack and unpack a message in C++. - methods only use the fully qualified type name after the last - '/' + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - in the type URL, for example "foo.bar.com/x/y.z" will yield type + Example 2: Pack and unpack a message in Java. - name "y.z". + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - JSON + Example 4: Pack and unpack a message in Go - ==== + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The JSON representation of an `Any` value uses the regular + The pack methods provided by protobuf library will by default use - representation of the deserialized, embedded message, with an + 'type.googleapis.com/full.type.name' as the type URL and the unpack - additional field `@type` which contains the type URL. Example: + methods only use the fully qualified type name after the last '/' - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + in the type URL, for example "foo.bar.com/x/y.z" will yield type - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + name "y.z". - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field - `value` which holds the custom JSON in addition to the `@type` + JSON - field. Example (for message [google.protobuf.Duration][]): + ==== - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegatorShares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: - type: string - description: website defines an optional website link. - securityContact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbondingHeight: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbondingTime: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commissionRates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - maxRate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - maxChangeRate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - updateTime: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - minSelfDelegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - description: >- - Validator defines a validator, together with the total amount of the + The JSON representation of an `Any` value uses the regular - Validator's bond shares and their exchange rate to coins. Slashing - results in + representation of the deserialized, embedded message, with an - a decrease in the exchange rate, allowing correct calculation of - future + additional field `@type` which contains the type URL. Example: - undelegations without iterating over delegators. When coins are - delegated to + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - this validator, the validator is credited with a delegation whose - number of + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - bond shares is based on the amount of coins delegated divided by the - current + If the embedded message type is well-known and has a custom JSON - exchange rate. Voting power can be calculated as total bonded shares + representation, that representation will be embedded adding a field - multiplied by exchange rate. - description: validators contains all the queried validators. + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: ContractInfo stores a WASM contract instance + cosmwasm.wasm.v1.Model: + type: object + properties: + key: + type: string + format: byte + title: hex-encode key to read it better (this is often ascii) + value: + type: string + format: byte + title: base64-encode raw value + title: Model is a struct that holds a KV pair + cosmwasm.wasm.v1.MsgClearAdminResponse: + type: object + title: MsgClearAdminResponse returns empty data + cosmwasm.wasm.v1.MsgExecuteContractResponse: + type: object + properties: + data: + type: string + format: byte + title: Data contains base64-encoded bytes to returned from the contract + description: MsgExecuteContractResponse returns execution result data. + cosmwasm.wasm.v1.MsgInstantiateContractResponse: + type: object + properties: + address: + type: string + description: Address is the bech32 address of the new contract instance. + data: + type: string + format: byte + title: Data contains base64-encoded bytes to returned from the contract + title: MsgInstantiateContractResponse return instantiation result data + cosmwasm.wasm.v1.MsgMigrateContractResponse: + type: object + properties: + data: + type: string + format: byte + title: |- + Data contains same raw bytes returned as data from the wasm contract. + (May be empty) + description: MsgMigrateContractResponse returns contract migration result data. + cosmwasm.wasm.v1.MsgStoreCodeResponse: + type: object + properties: + codeId: + type: string + format: uint64 + title: CodeID is the reference to the stored WASM code + description: MsgStoreCodeResponse returns store result data. + cosmwasm.wasm.v1.MsgUpdateAdminResponse: + type: object + title: MsgUpdateAdminResponse returns empty data + cosmwasm.wasm.v1.QueryAllContractStateResponse: + type: object + properties: + models: + type: array + items: + type: object + properties: + key: + type: string + format: byte + title: hex-encode key to read it better (this is often ascii) + value: + type: string + format: byte + title: base64-encode raw value + title: Model is a struct that holds a KV pair pagination: description: pagination defines the pagination in the response. type: object @@ -19431,684 +22735,433 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - title: >- - QueryValidatorsResponse is response type for the Query/Validators RPC - method - cosmos.staking.v1beta1.Redelegation: - type: object - properties: - delegatorAddress: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validatorSrcAddress: - type: string - description: >- - validator_src_address is the validator redelegation source operator - address. - validatorDstAddress: - type: string - description: >- - validator_dst_address is the validator redelegation destination - operator address. - entries: - type: array - items: - type: object - properties: - creationHeight: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation took - place. - completionTime: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initialBalance: - type: string - description: >- - initial_balance defines the initial balance when redelegation - started. - sharesDst: - type: string - description: >- - shares_dst is the amount of destination-validator shares created - by redelegation. - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - description: entries are the redelegation entries. - description: >- - Redelegation contains the list of a particular delegator's redelegating - bonds - - from a particular source validator to a particular destination validator. - cosmos.staking.v1beta1.RedelegationEntry: - type: object - properties: - creationHeight: - type: string - format: int64 - description: creation_height defines the height which the redelegation took place. - completionTime: - type: string - format: date-time - description: completion_time defines the unix time for redelegation completion. - initialBalance: - type: string - description: initial_balance defines the initial balance when redelegation started. - sharesDst: - type: string - description: >- - shares_dst is the amount of destination-validator shares created by - redelegation. - description: RedelegationEntry defines a redelegation object with relevant metadata. - cosmos.staking.v1beta1.RedelegationEntryResponse: + title: |- + QueryAllContractStateResponse is the response type for the + Query/AllContractState RPC method + cosmwasm.wasm.v1.QueryCodeResponse: type: object properties: - redelegationEntry: + codeInfo: type: object properties: - creationHeight: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation took - place. - completionTime: + codeId: type: string - format: date-time - description: completion_time defines the unix time for redelegation completion. - initialBalance: + format: uint64 + creator: type: string - description: >- - initial_balance defines the initial balance when redelegation - started. - sharesDst: + dataHash: type: string - description: >- - shares_dst is the amount of destination-validator shares created - by redelegation. - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - balance: + format: byte + title: CodeInfoResponse contains code meta data from CodeInfo + data: type: string - description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry except that - it - - contains a balance in addition to shares which is more suitable for client - - responses. - cosmos.staking.v1beta1.RedelegationResponse: + format: byte + title: QueryCodeResponse is the response type for the Query/Code RPC method + cosmwasm.wasm.v1.QueryCodesResponse: type: object properties: - redelegation: - type: object - properties: - delegatorAddress: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validatorSrcAddress: - type: string - description: >- - validator_src_address is the validator redelegation source - operator address. - validatorDstAddress: - type: string - description: >- - validator_dst_address is the validator redelegation destination - operator address. - entries: - type: array - items: - type: object - properties: - creationHeight: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation - took place. - completionTime: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initialBalance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - sharesDst: - type: string - description: >- - shares_dst is the amount of destination-validator shares - created by redelegation. - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - description: entries are the redelegation entries. - description: >- - Redelegation contains the list of a particular delegator's - redelegating bonds - - from a particular source validator to a particular destination - validator. - entries: + codeInfos: type: array items: type: object properties: - redelegationEntry: - type: object - properties: - creationHeight: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation - took place. - completionTime: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initialBalance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - sharesDst: - type: string - description: >- - shares_dst is the amount of destination-validator shares - created by redelegation. - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - balance: + codeId: type: string - description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry - except that it - - contains a balance in addition to shares which is more suitable for - client - - responses. - description: >- - RedelegationResponse is equivalent to a Redelegation except that its - entries - - contain a balance in addition to shares which is more suitable for client + format: uint64 + creator: + type: string + dataHash: + type: string + format: byte + title: CodeInfoResponse contains code meta data from CodeInfo + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - responses. - cosmos.staking.v1beta1.UnbondingDelegation: - type: object - properties: - delegatorAddress: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validatorAddress: - type: string - description: validator_address is the bech32-encoded address of the validator. + was set, its value is undefined otherwise + title: QueryCodesResponse is the response type for the Query/Codes RPC method + cosmwasm.wasm.v1.QueryContractHistoryResponse: + type: object + properties: entries: type: array items: type: object properties: - creationHeight: - type: string - format: int64 - description: creation_height is the height which the unbonding took place. - completionTime: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initialBalance: + operation: type: string + enum: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS + default: CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + ContractCodeHistoryOperationTypeUnspecified placeholder for + empty value + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data + title: >- + ContractCodeHistoryOperationType actions that caused a code + change + codeId: type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object with relevant - metadata. - description: entries are the unbonding delegation entries. - description: |- - UnbondingDelegation stores all of a single delegator's unbonding bonds - for a single validator in an time-ordered list. - cosmos.staking.v1beta1.UnbondingDelegationEntry: - type: object - properties: - creationHeight: - type: string - format: int64 - description: creation_height is the height which the unbonding took place. - completionTime: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initialBalance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to receive at - completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object with relevant - metadata. - cosmos.staking.v1beta1.Validator: + format: uint64 + title: CodeID is the reference to the stored WASM code + updated: + description: Updated Tx position when the operation was executed. + type: object + properties: + blockHeight: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + txIndex: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual + transaction index, + + or gas consumed) + msg: + type: string + format: byte + description: ContractCodeHistoryEntry metadata to a contract. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: |- + QueryContractHistoryResponse is the response type for the + Query/ContractHistory RPC method + cosmwasm.wasm.v1.QueryContractInfoResponse: type: object properties: - operatorAddress: + address: type: string - description: >- - operator_address defines the address of the validator's operator; bech - encoded in JSON. - consensusPubkey: + title: address is the address of the contract + contractInfo: type: object properties: - '@type': + codeId: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent + format: uint64 + title: CodeID is the reference to the stored Wasm code + creator: + type: string + title: Creator address who initially instantiated the contract + admin: + type: string + title: Admin is an optional address that can execute migrations + label: + type: string + description: Label is optional metadata to be stored with a contract instance. + created: + title: >- + Created Tx position when the contract was instantiated. - the fully qualified name of the type (as in + This data should kept internal and not be exposed via query + results. Just - `path/google.protobuf.Duration`). The name should be in a - canonical form + use for sorting + type: object + properties: + blockHeight: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + txIndex: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual + transaction index, - (e.g., leading "." is not accepted). + or gas consumed) + description: >- + AbsoluteTxPosition is a unique transaction position that allows + for global + ordering of transactions. + ibcPortId: + type: string + extension: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - In practice, teams usually precompile into the binary all types - that they + protocol buffer message. This string must contain at least - expect it to use in the context of Any. However, for URLs which - use the + one "/" character. The last segment of the URL's path must + represent - scheme `http`, `https`, or no scheme, one can optionally set up a - type + the fully qualified name of the type (as in - server that maps type URLs to message definitions as follows: + `path/google.protobuf.Duration`). The name should be in a + canonical form + (e.g., leading "." is not accepted). - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + In practice, teams usually precompile into the binary all + types that they - Note: this functionality is not currently available in the - official + expect it to use in the context of Any. However, for URLs + which use the - protobuf release, and it is not used for type URLs beginning with + scheme `http`, `https`, or no scheme, one can optionally set + up a type - type.googleapis.com. + server that maps type URLs to message definitions as follows: - Schemes other than `http`, `https` (or the empty scheme) might be + * If no scheme is provided, `https` is assumed. - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - URL that describes the type of the serialized message. + Note: this functionality is not currently available in the + official + protobuf release, and it is not used for type URLs beginning + with - Protobuf library provides support to pack/unpack Any values in the - form + type.googleapis.com. - of utility functions or additional generated methods of the Any type. + Schemes other than `http`, `https` (or the empty scheme) might + be - Example 1: Pack and unpack a message in C++. + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + URL that describes the type of the serialized message. - Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Protobuf library provides support to pack/unpack Any values in the + form - Example 3: Pack and unpack a message in Python. + of utility functions or additional generated methods of the Any + type. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 1: Pack and unpack a message in C++. - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - The pack methods provided by protobuf library will by default use + Example 2: Pack and unpack a message in Java. - 'type.googleapis.com/full.type.name' as the type URL and the unpack + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - methods only use the fully qualified type name after the last '/' + Example 3: Pack and unpack a message in Python. - in the type URL, for example "foo.bar.com/x/y.z" will yield type + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - name "y.z". + Example 4: Pack and unpack a message in Go + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + The pack methods provided by protobuf library will by default use - JSON + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - ==== + methods only use the fully qualified type name after the last '/' - The JSON representation of an `Any` value uses the regular + in the type URL, for example "foo.bar.com/x/y.z" will yield type - representation of the deserialized, embedded message, with an + name "y.z". - additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + JSON - If the embedded message type is well-known and has a custom JSON + ==== - representation, that representation will be embedded adding a field + The JSON representation of an `Any` value uses the regular - `value` which holds the custom JSON in addition to the `@type` + representation of the deserialized, embedded message, with an - field. Example (for message [google.protobuf.Duration][]): + additional field `@type` which contains the type URL. Example: - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegatorShares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - securityContact: - type: string - description: security_contact defines an optional email for security contact. - details: - type: string - description: details define other optional details. - unbondingHeight: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbondingTime: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the validator - to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commissionRates: - description: >- - commission_rates defines the initial commission rates to be used - for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - maxRate: - type: string - description: >- - max_rate defines the maximum commission rate which validator - can ever charge, as a fraction. - maxChangeRate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - updateTime: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - minSelfDelegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum self - delegation. - description: >- - Validator defines a validator, together with the total amount of the + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Validator's bond shares and their exchange rate to coins. Slashing results - in + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - a decrease in the exchange rate, allowing correct calculation of future + If the embedded message type is well-known and has a custom JSON - undelegations without iterating over delegators. When coins are delegated - to + representation, that representation will be embedded adding a + field - this validator, the validator is credited with a delegation whose number - of + `value` which holds the custom JSON in addition to the `@type` - bond shares is based on the amount of coins delegated divided by the - current + field. Example (for message [google.protobuf.Duration][]): - exchange rate. Voting power can be calculated as total bonded shares + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: ContractInfo stores a WASM contract instance + title: >- + QueryContractInfoResponse is the response type for the Query/ContractInfo + RPC - multiplied by exchange rate. - tendermint.types.BlockID: + method + cosmwasm.wasm.v1.QueryContractsByCodeResponse: type: object properties: - hash: - type: string - format: byte - partSetHeader: + contracts: + type: array + items: + type: string + title: contracts are a set of contract addresses + pagination: + description: pagination defines the pagination in the response. type: object properties: - total: - type: integer - format: int64 - hash: + nextKey: type: string format: byte - title: PartsetHeader - title: BlockID - tendermint.types.Header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chainId: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - lastBlockId: - title: prev block info - type: object - properties: - hash: - type: string - format: byte - partSetHeader: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - lastCommitHash: - type: string - format: byte - title: hashes of block data - dataHash: - type: string - format: byte - validatorsHash: - type: string - format: byte - title: hashes from the app output from the prev block - nextValidatorsHash: - type: string - format: byte - consensusHash: - type: string - format: byte - appHash: - type: string - format: byte - lastResultsHash: - type: string - format: byte - evidenceHash: - type: string - format: byte - title: consensus info - proposerAddress: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - tendermint.types.PartSetHeader: + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: |- + QueryContractsByCodeResponse is the response type for the + Query/ContractsByCode RPC method + cosmwasm.wasm.v1.QueryPinnedCodesResponse: type: object properties: - total: - type: integer - format: int64 - hash: + codeIds: + type: array + items: + type: string + format: uint64 + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + nextKey: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: |- + QueryPinnedCodesResponse is the response type for the + Query/PinnedCodes RPC method + cosmwasm.wasm.v1.QueryRawContractStateResponse: + type: object + properties: + data: type: string format: byte - title: PartsetHeader - tendermint.version.Consensus: + title: Data contains the raw store data + title: |- + QueryRawContractStateResponse is the response type for the + Query/RawContractState RPC method + cosmwasm.wasm.v1.QuerySmartContractStateResponse: type: object properties: - block: - type: string - format: uint64 - app: + data: type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse: - type: object - description: >- - MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount - response type. + format: byte + title: Data contains the json data returned from the smart contract + title: |- + QuerySmartContractStateResponse is the response type for the + Query/SmartContractState RPC method ibc.applications.transfer.v1.DenomTrace: type: object properties: @@ -20274,297 +23327,5 @@ definitions: and freezing clients - publicawesome.stargaze.alloc.v1beta1.DistributionProportions: - type: object - properties: - nftIncentives: - type: string - developerRewards: - type: string - publicawesome.stargaze.alloc.v1beta1.MsgCreateVestingAccountResponse: - type: object - description: >- - MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount - response type. - publicawesome.stargaze.alloc.v1beta1.Params: - type: object - properties: - distributionProportions: - title: distribution_proportions defines the proportion of the minted denom - type: object - properties: - nftIncentives: - type: string - developerRewards: - type: string - weightedDeveloperRewardsReceivers: - type: array - items: - type: object - properties: - address: - type: string - weight: - type: string - title: address to receive developer rewards - publicawesome.stargaze.alloc.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - distributionProportions: - title: >- - distribution_proportions defines the proportion of the minted - denom - type: object - properties: - nftIncentives: - type: string - developerRewards: - type: string - weightedDeveloperRewardsReceivers: - type: array - items: - type: object - properties: - address: - type: string - weight: - type: string - title: address to receive developer rewards - description: QueryParamsResponse is the response type for the Query/Params RPC method. - publicawesome.stargaze.alloc.v1beta1.WeightedAddress: - type: object - properties: - address: - type: string - weight: - type: string - publicawesome.stargaze.claim.v1beta1.Action: - type: string - enum: - - ActionInitialClaim - - ActionBuySocialToken - - ActionMintNFT - - ActionVote - - ActionDelegateStake - default: ActionInitialClaim - publicawesome.stargaze.claim.v1beta1.ClaimAuthorization: - type: object - properties: - contractAddress: - type: string - action: - type: string - enum: - - ActionInitialClaim - - ActionBuySocialToken - - ActionMintNFT - - ActionVote - - ActionDelegateStake - default: ActionInitialClaim - publicawesome.stargaze.claim.v1beta1.ClaimRecord: - type: object - properties: - address: - type: string - title: address of claim user - initialClaimableAmount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - title: total initial claimable amount for the user - actionCompleted: - type: array - items: - type: boolean - title: |- - true if action is completed - index of bool in array refers to action enum # - publicawesome.stargaze.claim.v1beta1.MsgInitialClaimResponse: - type: object - properties: - claimedAmount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - title: total initial claimable amount for the user - publicawesome.stargaze.claim.v1beta1.Params: - type: object - properties: - airdropEnabled: - type: boolean - airdropStartTime: - type: string - format: date-time - durationUntilDecay: - type: string - durationOfDecay: - type: string - claimDenom: - type: string - title: denom of claimable asset - allowedClaimers: - type: array - items: - type: object - properties: - contractAddress: - type: string - action: - type: string - enum: - - ActionInitialClaim - - ActionBuySocialToken - - ActionMintNFT - - ActionVote - - ActionDelegateStake - default: ActionInitialClaim - title: list of contracts and their allowed claim actions - description: Params defines the claim module's parameters. - publicawesome.stargaze.claim.v1beta1.QueryClaimRecordResponse: - type: object - properties: - claimRecord: - type: object - properties: - address: - type: string - title: address of claim user - initialClaimableAmount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - title: total initial claimable amount for the user - actionCompleted: - type: array - items: - type: boolean - title: |- - true if action is completed - index of bool in array refers to action enum # - publicawesome.stargaze.claim.v1beta1.QueryClaimableForActionResponse: - type: object - properties: - coins: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - publicawesome.stargaze.claim.v1beta1.QueryModuleAccountBalanceResponse: - type: object - properties: - moduleAccountBalance: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: params defines the parameters of the module. - description: QueryParamsResponse is the response type for the Query/Params RPC method. - publicawesome.stargaze.claim.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - airdropEnabled: - type: boolean - airdropStartTime: - type: string - format: date-time - durationUntilDecay: - type: string - durationOfDecay: - type: string - claimDenom: - type: string - title: denom of claimable asset - allowedClaimers: - type: array - items: - type: object - properties: - contractAddress: - type: string - action: - type: string - enum: - - ActionInitialClaim - - ActionBuySocialToken - - ActionMintNFT - - ActionVote - - ActionDelegateStake - default: ActionInitialClaim - title: list of contracts and their allowed claim actions - description: QueryParamsResponse is the response type for the Query/Params RPC method. - publicawesome.stargaze.claim.v1beta1.QueryTotalClaimableResponse: + publicawesome.stargaze.claim.MsgClaimForResponse: type: object - properties: - coins: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. diff --git a/go.mod b/go.mod index 29f577352..789d5905f 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,8 @@ module github.com/public-awesome/stargaze/v3 go 1.17 require ( + github.com/CosmWasm/wasmd v0.23.0 + github.com/CosmWasm/wasmvm v1.0.0-beta5 github.com/armon/go-metrics v0.3.10 github.com/cosmos/cosmos-sdk v0.45.1 github.com/cosmos/go-bip39 v1.0.0 @@ -18,7 +20,7 @@ require ( github.com/tendermint/spm v0.1.9 github.com/tendermint/tendermint v0.34.15 github.com/tendermint/tm-db v0.6.6 - google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 + google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 google.golang.org/grpc v1.43.0 google.golang.org/protobuf v1.27.1 gopkg.in/yaml.v2 v2.4.0 @@ -58,6 +60,8 @@ require ( github.com/gogo/gateway v1.1.0 // indirect github.com/golang/snappy v0.0.3 // indirect github.com/google/btree v1.0.0 // indirect + github.com/google/go-cmp v0.5.7 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.4.2 // indirect @@ -81,25 +85,25 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.2 // indirect - github.com/mitchellh/mapstructure v1.4.2 // indirect + github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_golang v1.12.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.30.0 // indirect + github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rs/cors v1.8.0 // indirect - github.com/rs/zerolog v1.23.0 // indirect + github.com/rs/zerolog v1.26.0 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/spf13/afero v1.6.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.9.0 // indirect + github.com/spf13/viper v1.10.1 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect @@ -110,19 +114,20 @@ require ( go.etcd.io/bbolt v1.3.6 // indirect golang.org/x/crypto v0.0.0-20210915214749-c084706c2272 // indirect golang.org/x/net v0.0.0-20211005001312-d4b1ae081e3b // indirect - golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef // indirect + golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect golang.org/x/text v0.3.7 // indirect - gopkg.in/ini.v1 v1.63.2 // indirect + gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect nhooyr.io/websocket v1.8.6 // indirect ) replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 + github.com/CosmWasm/wasmvm => github.com/CosmWasm/wasmvm v1.0.0-beta6 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/tecbot/gorocksdb => github.com/cosmos/gorocksdb v1.2.0 - github.com/tendermint/spm => github.com/public-awesome/spm v0.1.9-stargaze.0.20220204003814-ae3609c0fda3 + github.com/tendermint/spm => github.com/public-awesome/spm v0.1.9-stargaze.0.20220218155531-af173fcd55c7 google.golang.org/grpc => google.golang.org/grpc v1.33.2 ) diff --git a/go.sum b/go.sum index 4f1b5b52a..8bb0785a6 100644 --- a/go.sum +++ b/go.sum @@ -23,6 +23,9 @@ cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSU cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -33,6 +36,7 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -66,6 +70,10 @@ github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/CosmWasm/wasmd v0.23.0 h1:yOksa/TORt2BtXjUKKqcJ67d6O+Jv2Y6wT1Ekm1Como= +github.com/CosmWasm/wasmd v0.23.0/go.mod h1:kNDnMAQDJyVek9k6SxCNijMCzOROzzUGBRT8r/vr7oY= +github.com/CosmWasm/wasmvm v1.0.0-beta6 h1:JYh9Z7qF6h9a2sOOx9hZRwCVS4aFdd+aiwrIXznLn8k= +github.com/CosmWasm/wasmvm v1.0.0-beta6/go.mod h1:mtwKxbmsko1zdwpaKiRkRwxijMmIAtnLaX5/UT2nPFk= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= @@ -160,6 +168,7 @@ github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEe github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -177,6 +186,10 @@ github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5P github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go v0.6.10/go.mod h1:J/JFMsfcePrjJZkwQFLh+hJErkAmdm9Iyy3D5Y0LfXo= @@ -202,6 +215,7 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= github.com/cosmos/cosmos-sdk v0.44.5/go.mod h1:maUA6m2TBxOJZkbwl0eRtEBgTX37kcaiOWU5t1HEGaY= +github.com/cosmos/cosmos-sdk v0.45.0/go.mod h1:XXS/asyCqWNWkx2rW6pSuen+EVcpAFxq6khrhnZgHaQ= github.com/cosmos/cosmos-sdk v0.45.1 h1:PY79YxPea5qlRLExRnzg8/rT1Scc8GGgRs22p7DX99Q= github.com/cosmos/cosmos-sdk v0.45.1/go.mod h1:XXS/asyCqWNWkx2rW6pSuen+EVcpAFxq6khrhnZgHaQ= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= @@ -265,7 +279,9 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= @@ -280,6 +296,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -396,8 +413,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -430,6 +448,7 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -468,6 +487,7 @@ github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIv github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= @@ -477,6 +497,7 @@ github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -502,10 +523,13 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUjLpLt6bVvZ72SQc/B4dXcPBw4Vgd7soowdRl52qEM= github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= @@ -514,6 +538,7 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= @@ -587,6 +612,7 @@ github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoR github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= @@ -596,6 +622,8 @@ github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -614,6 +642,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= @@ -631,8 +660,9 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -754,8 +784,9 @@ github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeD github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.0 h1:C+UIj/QWtmqY13Arb8kwMt5j34/0Z2iKamrJ+ryC0Gg= +github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -774,8 +805,9 @@ github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16 github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -789,8 +821,8 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/public-awesome/spm v0.1.9-stargaze.0.20220204003814-ae3609c0fda3 h1:hmvJzZO0iqguHUUZXKCprz65mcUBe1oBKWxykWs/O7E= -github.com/public-awesome/spm v0.1.9-stargaze.0.20220204003814-ae3609c0fda3/go.mod h1:6E+cbuzUHJPPuMbty9wce+OTYPmrns/HS39MKeU7QuI= +github.com/public-awesome/spm v0.1.9-stargaze.0.20220218155531-af173fcd55c7 h1:gREyabF5pvMOXbYUtzVQy3qsZLqGppwElvUTuzXw1gQ= +github.com/public-awesome/spm v0.1.9-stargaze.0.20220218155531-af173fcd55c7/go.mod h1:nWdsWsUUXUl/VjUlaOUp/xOZlG/tzJ02P6MAPYAIuKE= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -810,12 +842,15 @@ github.com/rs/cors v1.8.0 h1:P2KMzcFwrPoSjkF1WLRPsp3UMLyql8L4v9hQpVeK5so= github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.23.0 h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= +github.com/rs/zerolog v1.26.0 h1:ORM4ibhEZeTeQlCojCK2kPz1ogAY4bGs4tD+SaAdGaE= +github.com/rs/zerolog v1.26.0/go.mod h1:yBiM87lvSqX8h0Ww4sdzNSkVYZ8dL2xjZJG1lAuGZEo= 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/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= @@ -840,6 +875,7 @@ 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.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -864,8 +900,9 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.9.0 h1:yR6EXjTp0y0cLN8OZg1CRZmOBdI88UcGkhgyJhu6nZk= github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= +github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= @@ -935,6 +972,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -944,8 +982,11 @@ go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -956,6 +997,7 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1039,6 +1081,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1089,10 +1132,13 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211005001312-d4b1ae081e3b h1:SXy8Ld8oKlcogOvUAh0J5Pm5RKzgYBMMxLxt6n5XW50= @@ -1113,6 +1159,8 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 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= @@ -1210,11 +1258,19 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef h1:fPxZ3Umkct3LZ8gK9nbk+DWDJ9fstZa2grBn+lWVKPs= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1299,6 +1355,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1336,7 +1393,12 @@ google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtuk google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= 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= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1402,8 +1464,18 @@ google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 h1:ysnBoUyeL/H6RCvNRhWHjKoDEmguI+mPU+qHgK8qv/w= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1435,8 +1507,9 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.63.2 h1:tGK/CyBg7SMzb60vP1M03vNZ3VDu3wGQJwn7Sxi9r3c= gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= diff --git a/internal/ante/min_commission.go b/internal/ante/min_commission.go new file mode 100644 index 000000000..15eaf97a3 --- /dev/null +++ b/internal/ante/min_commission.go @@ -0,0 +1,73 @@ +package ante + +import ( + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/cosmos/cosmos-sdk/x/authz" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +type MinCommissionDecorator struct { + codec codec.BinaryCodec +} + +func NewMinCommissionDecorator(codec codec.BinaryCodec) MinCommissionDecorator { + return MinCommissionDecorator{ + codec, + } +} +func checkCommission(m sdk.Msg) error { + switch msg := m.(type) { + case *stakingtypes.MsgCreateValidator: + c := msg.Commission + if c.Rate.LT(sdk.NewDecWithPrec(5, 2)) { + return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "commission can not be lower than 5%") + } + case *stakingtypes.MsgEditValidator: + // if commission rate is nil, it means only other fields are being update and we must skip this validation + if msg.CommissionRate == nil { + return nil + } + if msg.CommissionRate.LT(sdk.NewDecWithPrec(5, 2)) { + return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "commission can not be lower than 5%") + } + default: + return nil + } + return nil +} +func (dec MinCommissionDecorator) Validate(m sdk.Msg) error { + err := checkCommission(m) + if err != nil { + return err + } + if msg, ok := m.(*authz.MsgExec); ok { + for _, v := range msg.Msgs { + var wrappedMsg sdk.Msg + err := dec.codec.UnpackAny(v, &wrappedMsg) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "error decoding authz messages") + } + err = checkCommission(wrappedMsg) + if err != nil { + return err + } + } + } + return nil +} + +func (dec MinCommissionDecorator) AnteHandle( + ctx sdk.Context, tx sdk.Tx, + simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + msgs := tx.GetMsgs() + for _, m := range msgs { + err := dec.Validate(m) + if err != nil { + return ctx, err + } + } + return next(ctx, tx, simulate) +} diff --git a/internal/ante/min_commission_test.go b/internal/ante/min_commission_test.go new file mode 100644 index 000000000..a5481fe1b --- /dev/null +++ b/internal/ante/min_commission_test.go @@ -0,0 +1,233 @@ +package ante_test + +import ( + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/authz" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/staking/types" + stargazeapp "github.com/public-awesome/stargaze/v3/app" + "github.com/public-awesome/stargaze/v3/testutil/simapp" + "github.com/stretchr/testify/require" + "github.com/tendermint/spm/cosmoscmd" + + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +) + +func TestMinCommissionAnteHandler(t *testing.T) { + priv1 := secp256k1.GenPrivKey() + pub1 := priv1.PubKey() + addr1 := sdk.AccAddress(pub1.Address()) + + pub2 := secp256k1.GenPrivKey().PubKey() + addr2 := sdk.AccAddress(pub2.Address()) + + genTokens := sdk.TokensFromConsensusPower(42, sdk.DefaultPowerReduction) + bondTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + genCoin := sdk.NewCoin(sdk.DefaultBondDenom, genTokens) + bondCoin := sdk.NewCoin(sdk.DefaultBondDenom, bondTokens) + + acc1 := &authtypes.BaseAccount{Address: addr1.String()} + acc2 := &authtypes.BaseAccount{Address: addr2.String()} + accs := authtypes.GenesisAccounts{acc1, acc2} + balances := []banktypes.Balance{ + { + Address: addr1.String(), + Coins: sdk.Coins{genCoin}, + }, + { + Address: addr2.String(), + Coins: sdk.Coins{genCoin}, + }, + } + + valKey := ed25519.GenPrivKey() + // valAddr := sdk.AccAddress(valKey.PubKey().Address()) + + commissionRates := types.NewCommissionRates(sdk.MustNewDecFromStr("0.04"), sdk.MustNewDecFromStr("0.10"), sdk.MustNewDecFromStr("0.01")) + app := simapp.SetupWithGenesisAccounts(t, t.TempDir(), accs, balances...) + + key := valKey.PubKey() + // create validator + description := types.NewDescription("foo_moniker", "", "", "", "") + createValidatorMsg, err := types.NewMsgCreateValidator( + sdk.ValAddress(addr1), key, bondCoin, description, commissionRates, sdk.OneInt(), + ) + require.NoError(t, err) + header := tmproto.Header{Height: app.LastBlockHeight() + 1} + encoding := cosmoscmd.MakeEncodingConfig(stargazeapp.ModuleBasics) + txGen := encoding.TxConfig + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{createValidatorMsg}, "", []uint64{0}, []uint64{0}, true, false, false, priv1) + require.EqualError(t, err, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "commission can not be lower than 5%").Error()) + + // valid + commissionRates = types.NewCommissionRates(sdk.MustNewDecFromStr("0.05"), sdk.MustNewDecFromStr("0.20"), sdk.MustNewDecFromStr("0.1")) + createValidatorMsg, err = types.NewMsgCreateValidator( + sdk.ValAddress(addr1), key, bondCoin, description, commissionRates, sdk.OneInt(), + ) + + require.NoError(t, err) + header = tmproto.Header{Height: app.LastBlockHeight() + 1} + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{createValidatorMsg}, "", []uint64{0}, []uint64{0}, true, true, true, priv1) + require.NoError(t, err) + validator := checkValidator(t, app, sdk.ValAddress(addr1), true) + require.Equal(t, description, validator.Description) + + // edit the validator to 1% + description = types.NewDescription("low commission", "", "", "", "") + com := sdk.MustNewDecFromStr("0.01") + editValidatorMsg := types.NewMsgEditValidator(sdk.ValAddress(addr1), description, &com, nil) + + header = tmproto.Header{Height: app.LastBlockHeight() + 1} + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{editValidatorMsg}, "", []uint64{0}, []uint64{1}, true, false, false, priv1) + require.EqualError(t, err, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "commission can not be lower than 5%").Error()) + + validator = checkValidator(t, app, sdk.ValAddress(addr1), true) + require.Equal(t, commissionRates.Rate, validator.Commission.Rate) + + // edit the validator to 10% + description = types.NewDescription("increase commission", "", "", "", "") + com = sdk.MustNewDecFromStr("0.1") + editValidatorMsg = types.NewMsgEditValidator(sdk.ValAddress(addr1), description, &com, nil) + + header = tmproto.Header{Height: app.LastBlockHeight() + 1, Time: time.Now().Add(time.Hour * 25)} + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{editValidatorMsg}, "", []uint64{0}, []uint64{1}, false, true, true, priv1) + require.NoError(t, err) + + validator = checkValidator(t, app, sdk.ValAddress(addr1), true) + require.Equal(t, com, validator.Commission.Rate) + +} +func TestMinCommissionAuthzAnteHandler(t *testing.T) { + priv1 := secp256k1.GenPrivKey() + pub1 := priv1.PubKey() + addr1 := sdk.AccAddress(pub1.Address()) + + priv2 := secp256k1.GenPrivKey() + pub2 := priv2.PubKey() + addr2 := sdk.AccAddress(pub2.Address()) + + genTokens := sdk.TokensFromConsensusPower(42, sdk.DefaultPowerReduction) + bondTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + genCoin := sdk.NewCoin(sdk.DefaultBondDenom, genTokens) + bondCoin := sdk.NewCoin(sdk.DefaultBondDenom, bondTokens) + + acc1 := &authtypes.BaseAccount{Address: addr1.String()} + acc2 := &authtypes.BaseAccount{Address: addr2.String()} + accs := authtypes.GenesisAccounts{acc1, acc2} + balances := []banktypes.Balance{ + { + Address: addr1.String(), + Coins: sdk.Coins{genCoin}, + }, + { + Address: addr2.String(), + Coins: sdk.Coins{genCoin}, + }, + } + + valKey := ed25519.GenPrivKey() + // valAddr := sdk.AccAddress(valKey.PubKey().Address()) + + commissionRates := types.NewCommissionRates(sdk.MustNewDecFromStr("0.04"), sdk.MustNewDecFromStr("0.10"), sdk.MustNewDecFromStr("0.01")) + app := simapp.SetupWithGenesisAccounts(t, t.TempDir(), accs, balances...) + + key := valKey.PubKey() + + auth1 := authz.NewGenericAuthorization("/cosmos.staking.v1beta1.MsgCreateValidator") + + msg1, err := authz.NewMsgGrant(addr1, addr2, auth1, time.Now().Add(time.Hour*72)) + require.NotNil(t, msg1) + require.NoError(t, err) + + auth2 := authz.NewGenericAuthorization("/cosmos.staking.v1beta1.MsgEditValidator") + + msg2, err := authz.NewMsgGrant(addr1, addr2, auth2, time.Now().Add(time.Hour*72)) + require.NoError(t, err) + + header := tmproto.Header{Height: app.LastBlockHeight() + 1} + encoding := cosmoscmd.MakeEncodingConfig(stargazeapp.ModuleBasics) + txGen := encoding.TxConfig + + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{msg1, msg2}, "", + []uint64{0}, []uint64{0}, true, true, true, priv1) + require.NoError(t, err) + + // create 2 authorization + + // create validator + description := types.NewDescription("foo_moniker", "", "", "", "") + createValidatorMsg, err := types.NewMsgCreateValidator( + sdk.ValAddress(addr1), key, bondCoin, description, commissionRates, sdk.OneInt(), + ) + require.NotNil(t, createValidatorMsg) + require.NoError(t, err) + + execMsg := authz.NewMsgExec(addr2, []sdk.Msg{createValidatorMsg}) + + header = tmproto.Header{Height: app.LastBlockHeight() + 1} + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{&execMsg}, "", + []uint64{1}, []uint64{0}, true, false, false, priv2) + require.EqualError(t, err, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "commission can not be lower than 5%").Error()) + + // valid + commissionRates = types.NewCommissionRates(sdk.MustNewDecFromStr("0.05"), sdk.MustNewDecFromStr("0.20"), sdk.MustNewDecFromStr("0.1")) + createValidatorMsg, err = types.NewMsgCreateValidator( + sdk.ValAddress(addr1), key, bondCoin, description, commissionRates, sdk.OneInt(), + ) + + require.NoError(t, err) + header = tmproto.Header{Height: app.LastBlockHeight() + 1} + + // wrapped tx + execMsg = authz.NewMsgExec(addr2, []sdk.Msg{createValidatorMsg}) + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{&execMsg}, "", []uint64{1}, []uint64{0}, true, true, true, priv2) + require.NoError(t, err) + validator := checkValidator(t, app, sdk.ValAddress(addr1), true) + require.Equal(t, description, validator.Description) + require.Equal(t, commissionRates.Rate, validator.Commission.Rate) + + // edit the validator to 1% + description = types.NewDescription("low commission", "", "", "", "") + com := sdk.MustNewDecFromStr("0.01") + editValidatorMsg := types.NewMsgEditValidator(sdk.ValAddress(addr1), description, &com, nil) + + header = tmproto.Header{Height: app.LastBlockHeight() + 1} + + // wrapped tx + execMsg = authz.NewMsgExec(addr2, []sdk.Msg{editValidatorMsg}) + + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{&execMsg}, "", []uint64{1}, []uint64{1}, true, false, false, priv2) + require.EqualError(t, err, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "commission can not be lower than 5%").Error()) + + validator = checkValidator(t, app, sdk.ValAddress(addr1), true) + require.Equal(t, commissionRates.Rate, validator.Commission.Rate) + + // edit the validator to 10% + description = types.NewDescription("increase commission", "", "", "", "") + com = sdk.MustNewDecFromStr("0.09") + editValidatorMsg = types.NewMsgEditValidator(sdk.ValAddress(addr1), description, &com, nil) + + header = tmproto.Header{Height: app.LastBlockHeight() + 1, Time: time.Now().Add(time.Hour * 25)} + + // wrapped tx + execMsg = authz.NewMsgExec(addr2, []sdk.Msg{editValidatorMsg}) + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{&execMsg}, "", []uint64{1}, []uint64{1}, false, true, true, priv2) + require.NoError(t, err) + + validator = checkValidator(t, app, sdk.ValAddress(addr1), true) + require.Equal(t, sdk.MustNewDecFromStr("0.09"), validator.Commission.Rate) +} + +func checkValidator(t *testing.T, app *stargazeapp.App, addr sdk.ValAddress, expFound bool) types.Validator { + ctxCheck := app.BaseApp.NewContext(true, tmproto.Header{}) + validator, found := app.StakingKeeper.GetValidator(ctxCheck, addr) + require.Equal(t, expFound, found) + return validator +} diff --git a/internal/wasm/distribution.go b/internal/wasm/distribution.go new file mode 100644 index 000000000..a0d84b31a --- /dev/null +++ b/internal/wasm/distribution.go @@ -0,0 +1,70 @@ +package wasm + +import ( + "encoding/json" + "fmt" + + wasmvmtypes "github.com/CosmWasm/wasmvm/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" +) + +const ( + DistributionRoute = "distribution" +) + +var _ Encoder = CustomDistributionEncoder + +type FundCommunityPool struct { + Amount wasmvmtypes.Coins `json:"amount"` +} + +func (fcp FundCommunityPool) Encode(contract sdk.AccAddress) ([]sdk.Msg, error) { + amount, err := convertWasmCoinsToSdkCoins(fcp.Amount) + if err != nil { + return nil, err + } + msg := distributiontypes.NewMsgFundCommunityPool(amount, contract) + return []sdk.Msg{msg}, nil +} + +type DistributionMsg struct { + FundCommunityPool *FundCommunityPool `json:"fund_community_pool,omitempty"` +} + +func CustomDistributionEncoder(contract sdk.AccAddress, data json.RawMessage, version string) ([]sdk.Msg, error) { + msg := &DistributionMsg{} + err := json.Unmarshal(data, msg) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) + } + if msg.FundCommunityPool != nil { + return msg.FundCommunityPool.Encode(contract) + } + return nil, fmt.Errorf("wasm: invalid custom distribution message") +} + +func convertWasmCoinsToSdkCoins(coins []wasmvmtypes.Coin) (sdk.Coins, error) { + var toSend sdk.Coins + for _, coin := range coins { + c, err := convertWasmCoinToSdkCoin(coin) + if err != nil { + return nil, err + } + toSend = append(toSend, c) + } + return toSend, nil +} + +func convertWasmCoinToSdkCoin(coin wasmvmtypes.Coin) (sdk.Coin, error) { + amount, ok := sdk.NewIntFromString(coin.Amount) + if !ok { + return sdk.Coin{}, sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, coin.Amount+coin.Denom) + } + r := sdk.Coin{ + Denom: coin.Denom, + Amount: amount, + } + return r, r.Validate() +} diff --git a/internal/wasm/encoder.go b/internal/wasm/encoder.go new file mode 100644 index 000000000..9a258df28 --- /dev/null +++ b/internal/wasm/encoder.go @@ -0,0 +1,51 @@ +package wasm + +import ( + "encoding/json" + + "github.com/CosmWasm/wasmd/x/wasm" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Encoder describes behavior for Stargaze smart contract message encoding. +// The contract address must ALWAYS be set as the Msg signer. +type Encoder func(contract sdk.AccAddress, data json.RawMessage, version string) ([]sdk.Msg, error) + +// MessageEncoders provides stargaze custom encoder for contracts +func MessageEncoders(registry *EncoderRegistry) *wasm.MessageEncoders { + return &wasm.MessageEncoders{ + Custom: customEncoders(registry), + } +} + +type MessageEncodeRequest struct { + Route string `json:"route"` + MsgData json.RawMessage `json:"msg_data"` + Version string `json:"version"` +} + +func customEncoders(registry *EncoderRegistry) wasm.CustomEncoder { + return func(sender sdk.AccAddress, m json.RawMessage) ([]sdk.Msg, error) { + encodeRequest := &MessageEncodeRequest{} + err := json.Unmarshal(m, encodeRequest) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) + } + encode, exists := registry.encoders[encodeRequest.Route] + if !exists { + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "encoder not found for route: %s", encodeRequest.Route) + } + + msgs, err := encode(sender, encodeRequest.MsgData, encodeRequest.Version) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + } + for _, msg := range msgs { + if err := msg.ValidateBasic(); err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + } + } + return msgs, nil + } +} diff --git a/internal/wasm/registry.go b/internal/wasm/registry.go new file mode 100644 index 000000000..013cd0927 --- /dev/null +++ b/internal/wasm/registry.go @@ -0,0 +1,22 @@ +package wasm + +import "fmt" + +type EncoderRegistry struct { + encoders map[string]Encoder +} + +// NewEncoderRegistry creates a new registry for message encoders. +func NewEncoderRegistry() *EncoderRegistry { + return &EncoderRegistry{ + encoders: make(map[string]Encoder), + } +} + +// RegisterEncoder adds a message encoder for the given route. +func (qr *EncoderRegistry) RegisterEncoder(route string, encoder Encoder) { + if _, exists := qr.encoders[route]; exists { + panic(fmt.Sprintf("wasm: encoder already registered for route: %s", route)) + } + qr.encoders[route] = encoder +} diff --git a/proto/stargaze/alloc/v1beta1/genesis.proto b/proto/stargaze/alloc/v1beta1/genesis.proto index c055fde48..7621972e1 100644 --- a/proto/stargaze/alloc/v1beta1/genesis.proto +++ b/proto/stargaze/alloc/v1beta1/genesis.proto @@ -5,10 +5,10 @@ import "gogoproto/gogo.proto"; import "stargaze/alloc/v1beta1/params.proto"; // this line is used by starport scaffolding # genesis/proto/import -option go_package = "github.com/public-awesome/stargaze/x/alloc/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/alloc/types"; // GenesisState defines the alloc module's genesis state. message GenesisState { - // this line is used by starport scaffolding # genesis/proto/state - Params params = 1 [ (gogoproto.nullable) = false ]; + // this line is used by starport scaffolding # genesis/proto/state + Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/proto/stargaze/alloc/v1beta1/params.proto b/proto/stargaze/alloc/v1beta1/params.proto index ace9d49fb..1cab90f81 100644 --- a/proto/stargaze/alloc/v1beta1/params.proto +++ b/proto/stargaze/alloc/v1beta1/params.proto @@ -2,11 +2,10 @@ syntax = "proto3"; package publicawesome.stargaze.alloc.v1beta1; -option go_package = "github.com/public-awesome/stargaze/x/alloc/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/alloc/types"; import "gogoproto/gogo.proto"; - message WeightedAddress { string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; string weight = 2 [ diff --git a/proto/stargaze/alloc/v1beta1/query.proto b/proto/stargaze/alloc/v1beta1/query.proto index 96f79921a..37f6e7416 100644 --- a/proto/stargaze/alloc/v1beta1/query.proto +++ b/proto/stargaze/alloc/v1beta1/query.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "stargaze/alloc/v1beta1/params.proto"; // this line is used by starport scaffolding # 1 -option go_package = "github.com/public-awesome/stargaze/x/alloc/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/alloc/types"; // QueryParamsRequest is the request type for the Query/Params RPC method. message QueryParamsRequest {} @@ -17,14 +17,12 @@ message QueryParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } - - // Query defines the gRPC querier service. service Query { - // this line is used by starport scaffolding # 2 - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/stargaze/alloc/v1beta1/params"; - } + // this line is used by starport scaffolding # 2 + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/stargaze/alloc/v1beta1/params"; + } } // this line is used by starport scaffolding # 3 diff --git a/proto/stargaze/alloc/v1beta1/tx.proto b/proto/stargaze/alloc/v1beta1/tx.proto index 58dd0ef42..43ef19cab 100644 --- a/proto/stargaze/alloc/v1beta1/tx.proto +++ b/proto/stargaze/alloc/v1beta1/tx.proto @@ -6,29 +6,33 @@ import "cosmos/base/v1beta1/coin.proto"; // this line is used by starport scaffolding # proto/tx/import -option go_package = "github.com/public-awesome/stargaze/x/alloc/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/alloc/types"; // Msg defines the alloc Msg service. service Msg { - // CreateVestingAccount defines a method that enables creating a vesting - // account. - rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); - } - - // MsgCreateVestingAccount defines a message that enables creating a vesting + // CreateVestingAccount defines a method that enables creating a vesting // account. - message MsgCreateVestingAccount { - option (gogoproto.equal) = true; - - string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; - string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - int64 start_time = 4 [(gogoproto.moretags) = "yaml:\"start_time\""]; - int64 end_time = 5 [(gogoproto.moretags) = "yaml:\"end_time\""]; - bool delayed = 6; - } - - // MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. - message MsgCreateVestingAccountResponse {} + rpc CreateVestingAccount(MsgCreateVestingAccount) + returns (MsgCreateVestingAccountResponse); +} + +// MsgCreateVestingAccount defines a message that enables creating a vesting +// account. +message MsgCreateVestingAccount { + option (gogoproto.equal) = true; + + string from_address = 1 [ (gogoproto.moretags) = "yaml:\"from_address\"" ]; + string to_address = 2 [ (gogoproto.moretags) = "yaml:\"to_address\"" ]; + repeated cosmos.base.v1beta1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + int64 start_time = 4 [ (gogoproto.moretags) = "yaml:\"start_time\"" ]; + int64 end_time = 5 [ (gogoproto.moretags) = "yaml:\"end_time\"" ]; + bool delayed = 6; +} + +// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response +// type. +message MsgCreateVestingAccountResponse {} diff --git a/proto/stargaze/claim/v1beta1/claim_record.proto b/proto/stargaze/claim/v1beta1/claim_record.proto index abf9792b9..ef4cec22f 100644 --- a/proto/stargaze/claim/v1beta1/claim_record.proto +++ b/proto/stargaze/claim/v1beta1/claim_record.proto @@ -1,17 +1,16 @@ syntax = "proto3"; package publicawesome.stargaze.claim.v1beta1; - import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/public-awesome/stargaze/x/claim/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/claim/types"; enum Action { option (gogoproto.goproto_enum_prefix) = false; ActionInitialClaim = 0; - ActionBuySocialToken = 1; + ActionBidNFT = 1; ActionMintNFT = 2; ActionVote = 3; ActionDelegateStake = 4; diff --git a/proto/stargaze/claim/v1beta1/genesis.proto b/proto/stargaze/claim/v1beta1/genesis.proto index 5cb9bc709..7f20d184f 100644 --- a/proto/stargaze/claim/v1beta1/genesis.proto +++ b/proto/stargaze/claim/v1beta1/genesis.proto @@ -7,12 +7,12 @@ import "cosmos/base/v1beta1/coin.proto"; import "stargaze/claim/v1beta1/claim_record.proto"; import "stargaze/claim/v1beta1/params.proto"; -option go_package = "github.com/public-awesome/stargaze/x/claim/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/claim/types"; // GenesisState defines the claim module's genesis state. message GenesisState { - // this line is used by starport scaffolding # genesis/proto/state -// balance of the claim module's account + // this line is used by starport scaffolding # genesis/proto/state + // balance of the claim module's account cosmos.base.v1beta1.Coin module_account_balance = 1 [ (gogoproto.moretags) = "yaml:\"module_account_balance\"", (gogoproto.nullable) = false diff --git a/proto/stargaze/claim/v1beta1/params.proto b/proto/stargaze/claim/v1beta1/params.proto index fa4b4e055..5ceb11859 100644 --- a/proto/stargaze/claim/v1beta1/params.proto +++ b/proto/stargaze/claim/v1beta1/params.proto @@ -6,16 +6,12 @@ import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "stargaze/claim/v1beta1/claim_record.proto"; -option go_package = "github.com/public-awesome/stargaze/x/claim/types"; - +option go_package = "github.com/public-awesome/stargaze/v3/x/claim/types"; message ClaimAuthorization { - string contract_address = 1 [ - (gogoproto.moretags) = "yaml:\"contract_address\"" - ]; - Action action = 2 [ - (gogoproto.moretags) = "yaml:\"action\"" - ]; + string contract_address = 1 + [ (gogoproto.moretags) = "yaml:\"contract_address\"" ]; + Action action = 2 [ (gogoproto.moretags) = "yaml:\"action\"" ]; } // Params defines the claim module's parameters. @@ -40,7 +36,7 @@ message Params { (gogoproto.jsontag) = "duration_of_decay,omitempty", (gogoproto.moretags) = "yaml:\"duration_of_decay\"" ]; - + // denom of claimable asset string claim_denom = 5; diff --git a/proto/stargaze/claim/v1beta1/query.proto b/proto/stargaze/claim/v1beta1/query.proto index 1eee974b4..92ab3329e 100644 --- a/proto/stargaze/claim/v1beta1/query.proto +++ b/proto/stargaze/claim/v1beta1/query.proto @@ -8,93 +8,90 @@ import "stargaze/claim/v1beta1/claim_record.proto"; import "stargaze/claim/v1beta1/params.proto"; // this line is used by starport scaffolding # 1 -option go_package = "github.com/public-awesome/stargaze/x/claim/types"; - - +option go_package = "github.com/public-awesome/stargaze/v3/x/claim/types"; // Query defines the gRPC querier service. service Query { - // this line is used by starport scaffolding # 2 - rpc ModuleAccountBalance(QueryModuleAccountBalanceRequest) - returns (QueryModuleAccountBalanceResponse) { - option (google.api.http).get = - "/stargaze/claim/v1beta1/module_account_balance"; - } - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/stargaze/claim/v1beta1/params"; - } - rpc ClaimRecord(QueryClaimRecordRequest) returns (QueryClaimRecordResponse) { - option (google.api.http).get = - "/stargaze/claim/v1beta1/claim_record/{address}"; - } - rpc ClaimableForAction(QueryClaimableForActionRequest) - returns (QueryClaimableForActionResponse) { - option (google.api.http).get = - "/stargaze/claim/v1beta1/claimable_for_action/{address}/{action}"; - } - rpc TotalClaimable(QueryTotalClaimableRequest) - returns (QueryTotalClaimableResponse) { - option (google.api.http).get = - "/stargaze/claim/v1beta1/total_claimable/{address}"; - } - } - // this line is used by starport scaffolding # 3 - - // QueryParamsRequest is the request type for the Query/Params RPC method. - message QueryModuleAccountBalanceRequest {} - - // QueryParamsResponse is the response type for the Query/Params RPC method. - message QueryModuleAccountBalanceResponse { - // params defines the parameters of the module. - repeated cosmos.base.v1beta1.Coin moduleAccountBalance = 1 [ - (gogoproto.moretags) = "yaml:\"coins\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - } - - // QueryParamsRequest is the request type for the Query/Params RPC method. - message QueryParamsRequest {} - - // QueryParamsResponse is the response type for the Query/Params RPC method. - message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; + // this line is used by starport scaffolding # 2 + rpc ModuleAccountBalance(QueryModuleAccountBalanceRequest) + returns (QueryModuleAccountBalanceResponse) { + option (google.api.http).get = + "/stargaze/claim/v1beta1/module_account_balance"; } - - message QueryClaimRecordRequest { - string address = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/stargaze/claim/v1beta1/params"; } - - message QueryClaimRecordResponse { - ClaimRecord claim_record = 1 [ - (gogoproto.moretags) = "yaml:\"claim_record\"", - (gogoproto.nullable) = false - ]; + rpc ClaimRecord(QueryClaimRecordRequest) returns (QueryClaimRecordResponse) { + option (google.api.http).get = + "/stargaze/claim/v1beta1/claim_record/{address}"; } - - message QueryClaimableForActionRequest { - string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - Action action = 2 [ (gogoproto.moretags) = "yaml:\"action\"" ]; + rpc ClaimableForAction(QueryClaimableForActionRequest) + returns (QueryClaimableForActionResponse) { + option (google.api.http).get = + "/stargaze/claim/v1beta1/claimable_for_action/{address}/{action}"; } - - message QueryClaimableForActionResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.moretags) = "yaml:\"coins\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; + rpc TotalClaimable(QueryTotalClaimableRequest) + returns (QueryTotalClaimableResponse) { + option (google.api.http).get = + "/stargaze/claim/v1beta1/total_claimable/{address}"; } - - message QueryTotalClaimableRequest { - string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; - } - - message QueryTotalClaimableResponse { - repeated cosmos.base.v1beta1.Coin coins = 1 [ - (gogoproto.moretags) = "yaml:\"coins\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - } - \ No newline at end of file +} +// this line is used by starport scaffolding # 3 + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryModuleAccountBalanceRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryModuleAccountBalanceResponse { + // params defines the parameters of the module. + repeated cosmos.base.v1beta1.Coin moduleAccountBalance = 1 [ + (gogoproto.moretags) = "yaml:\"coins\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [ (gogoproto.nullable) = false ]; +} + +message QueryClaimRecordRequest { + string address = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; +} + +message QueryClaimRecordResponse { + ClaimRecord claim_record = 1 [ + (gogoproto.moretags) = "yaml:\"claim_record\"", + (gogoproto.nullable) = false + ]; +} + +message QueryClaimableForActionRequest { + string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; + Action action = 2 [ (gogoproto.moretags) = "yaml:\"action\"" ]; +} + +message QueryClaimableForActionResponse { + repeated cosmos.base.v1beta1.Coin coins = 1 [ + (gogoproto.moretags) = "yaml:\"coins\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +message QueryTotalClaimableRequest { + string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; +} + +message QueryTotalClaimableResponse { + repeated cosmos.base.v1beta1.Coin coins = 1 [ + (gogoproto.moretags) = "yaml:\"coins\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} diff --git a/proto/stargaze/claim/v1beta1/tx.proto b/proto/stargaze/claim/v1beta1/tx.proto index 3de5a1760..20e19f083 100644 --- a/proto/stargaze/claim/v1beta1/tx.proto +++ b/proto/stargaze/claim/v1beta1/tx.proto @@ -1,29 +1,44 @@ syntax = "proto3"; package publicawesome.stargaze.claim.v1beta1; - import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "stargaze/claim/v1beta1/claim_record.proto"; // this line is used by starport scaffolding # proto/tx/import -option go_package = "github.com/public-awesome/stargaze/x/claim/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/claim/types"; // Msg defines the Msg service. service Msg { - rpc InitialClaim(MsgInitialClaim) returns (MsgInitialClaimResponse); - // this line is used by starport scaffolding # proto/tx/rpc + rpc InitialClaim(MsgInitialClaim) returns (MsgInitialClaimResponse); + // this line is used by starport scaffolding # proto/tx/rpc + rpc ClaimFor(MsgClaimFor) returns (MsgClaimForResponse); } -message MsgInitialClaim { -string sender = 1; -} +message MsgInitialClaim { string sender = 1; } message MsgInitialClaimResponse { - // total initial claimable amount for the user + // total initial claimable amount for the user repeated cosmos.base.v1beta1.Coin claimed_amount = 2 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"claimed_amount\"" ]; } + +message MsgClaimFor { + string sender = 1; + string address = 2; + Action action = 3; +} + +message MsgClaimForResponse { + string address = 1; + // total initial claimable amount for the user + repeated cosmos.base.v1beta1.Coin claimed_amount = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"claimed_amount\"" + ]; +} \ No newline at end of file diff --git a/proto/stargaze/mint/v1beta1/genesis.proto b/proto/stargaze/mint/v1beta1/genesis.proto index c8ab09a80..425c828e0 100644 --- a/proto/stargaze/mint/v1beta1/genesis.proto +++ b/proto/stargaze/mint/v1beta1/genesis.proto @@ -4,14 +4,13 @@ package stargaze.mint.v1beta1; import "gogoproto/gogo.proto"; import "stargaze/mint/v1beta1/mint.proto"; - -option go_package = "github.com/public-awesome/stargaze/x/mint/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/mint/types"; // GenesisState defines the mint module's genesis state. message GenesisState { // minter is a space for holding current inflation information. - Minter minter = 1 [(gogoproto.nullable) = false]; + Minter minter = 1 [ (gogoproto.nullable) = false ]; // params defines all the paramaters of the module. - Params params = 2 [(gogoproto.nullable) = false]; + Params params = 2 [ (gogoproto.nullable) = false ]; } diff --git a/proto/stargaze/mint/v1beta1/mint.proto b/proto/stargaze/mint/v1beta1/mint.proto index 4ada882a2..0c7684765 100644 --- a/proto/stargaze/mint/v1beta1/mint.proto +++ b/proto/stargaze/mint/v1beta1/mint.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package stargaze.mint.v1beta1; -option go_package = "github.com/public-awesome/stargaze/x/mint/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/mint/types"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; @@ -10,9 +10,9 @@ import "google/protobuf/timestamp.proto"; message Minter { // current annual expected provisions string annual_provisions = 1 [ - (gogoproto.moretags) = "yaml:\"annual_provisions\"", + (gogoproto.moretags) = "yaml:\"annual_provisions\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; } @@ -36,10 +36,11 @@ message Params { ]; // factor to reduce inflation by each year string reduction_factor = 4 [ - (gogoproto.moretags) = "yaml:\"reduction_factor\"", + (gogoproto.moretags) = "yaml:\"reduction_factor\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; // expected blocks per year - uint64 blocks_per_year = 5 [(gogoproto.moretags) = "yaml:\"blocks_per_year\""]; + uint64 blocks_per_year = 5 + [ (gogoproto.moretags) = "yaml:\"blocks_per_year\"" ]; } diff --git a/proto/stargaze/mint/v1beta1/query.proto b/proto/stargaze/mint/v1beta1/query.proto index 1dc2995b2..144ca7006 100644 --- a/proto/stargaze/mint/v1beta1/query.proto +++ b/proto/stargaze/mint/v1beta1/query.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "stargaze/mint/v1beta1/mint.proto"; -option go_package = "github.com/public-awesome/stargaze/x/mint/types"; +option go_package = "github.com/public-awesome/stargaze/v3/x/mint/types"; // Query provides defines the gRPC querier service. service Query { @@ -15,7 +15,8 @@ service Query { } // AnnualProvisions current minting annual provisions value. - rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) { + rpc AnnualProvisions(QueryAnnualProvisionsRequest) + returns (QueryAnnualProvisionsResponse) { option (google.api.http).get = "/stargaze/mint/v1beta1/annual_provisions"; } } @@ -26,7 +27,7 @@ message QueryParamsRequest {} // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; + Params params = 1 [ (gogoproto.nullable) = false ]; } // QueryAnnualProvisionsRequest is the request type for the @@ -37,6 +38,8 @@ message QueryAnnualProvisionsRequest {} // Query/AnnualProvisions RPC method. message QueryAnnualProvisionsResponse { // annual_provisions is the current minting annual provisions value. - bytes annual_provisions = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + bytes annual_provisions = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } diff --git a/scripts/ci/upgrade/proposal.sh b/scripts/ci/upgrade/proposal.sh index 1ecc75a12..39b0ac74d 100755 --- a/scripts/ci/upgrade/proposal.sh +++ b/scripts/ci/upgrade/proposal.sh @@ -13,10 +13,10 @@ tree -L 2 /stargaze/starsd/ echo "current height $HEIGHT" HEIGHT=$(expr $HEIGHT + 20) echo "submit with height $HEIGHT" -starsd tx gov submit-proposal software-upgrade v2 --upgrade-height $HEIGHT \ +starsd tx gov submit-proposal software-upgrade v3 --upgrade-height $HEIGHT \ --deposit 10000000ustars \ ---description "Upgrade contains fix for claiming airdrop with Keplr and Ledger" \ ---title "V2 Upgrade" \ +--description "Add cosmwasm" \ +--title "V3 Upgrade" \ --gas-prices 0.025ustars --gas auto --gas-adjustment 1.5 --from validator \ --chain-id stargaze -b block --yes --node http://stargaze:26657 --home $STARGAZE_HOME --keyring-backend test diff --git a/scripts/wasm/README.md b/scripts/wasm/README.md index d7c1e5196..b230d4a42 100644 --- a/scripts/wasm/README.md +++ b/scripts/wasm/README.md @@ -6,12 +6,13 @@ ../../startnode.sh ``` -## Upload and test contract - -In another terminal window: +## Upload contracts ```sh -./cw20-bonding.sh -``` +BINARY='starsd' +DENOM='ustarx' +CHAIN_ID='localnet-1' +NODE='http://localhost:26657' -NOTE: Contract scripts can't be run consecutively yet. Please reset and restart the chain between each. +bash upload-contracts.sh +``` diff --git a/scripts/wasm/cw20-bonding.sh b/scripts/wasm/cw20-bonding.sh deleted file mode 100755 index a58696796..000000000 --- a/scripts/wasm/cw20-bonding.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -TXFLAG="--gas-prices 0.01ustars --gas auto --gas-adjustment 1.3 -y -b block" - -CREATOR=$(starsd keys show creator -a) -INVESTOR=$(starsd keys show investor -a) - -# see contracts code that have been uploaded -starsd q wasm list-code - -# download cw20-bonding contract code -curl -LO https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.9.0/cw20_bonding.wasm - -# upload contract code -starsd tx wasm store cw20_bonding.wasm --from validator $TXFLAG - -# instantiate contract -INIT='{ - "name": "sirbobo", - "symbol": "BOBO", - "decimals": 2, - "reserve_denom": "ustars", - "reserve_decimals": 8, - "curve_type": { "linear": { "slope": "1", "scale": 1 } } -}' -starsd tx wasm instantiate 1 "$INIT" --from creator --label "social token" $TXFLAG - -# get contract address -starsd q wasm list-contract-by-code 1 --output json -CONTRACT=$(starsd q wasm list-contract-by-code 1 --output json | jq -r '.contracts[-1]') - -# query contract -starsd q wasm contract-state smart $CONTRACT '{"token_info":{}}' -starsd q wasm contract-state smart $CONTRACT '{"curve_info":{}}' -starsd q wasm contract-state smart $CONTRACT "{\"balance\":{\"address\":\"$INVESTOR\"}}" - -# execute a buy order -BUY='{"buy":{}}' -starsd tx wasm execute $CONTRACT $BUY --from investor --amount=500000000ustars $TXFLAG - -# check balances -starsd q bank balances $INVESTOR -starsd q wasm contract-state smart $CONTRACT "{\"balance\":{\"address\":\"$INVESTOR\"}}" - -# execute a burn / sell order -SELL='{"burn":{"amount":"500"}}' -starsd tx wasm execute $CONTRACT $SELL --from investor $TXFLAG -starsd q wasm contract-state smart $CONTRACT "{\"balance\":{\"address\":\"$INVESTOR\"}}" -starsd q bank balances $INVESTOR - diff --git a/scripts/wasm/cw721-base.sh b/scripts/wasm/cw721-base.sh deleted file mode 100755 index 7ad94b305..000000000 --- a/scripts/wasm/cw721-base.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -TXFLAG="--gas-prices 0.01ustars --gas auto --gas-adjustment 1.3 -y -b block" - -CREATOR=$(starsd keys show creator -a) -INVESTOR=$(starsd keys show investor -a) - -# see contracts code that have been uploaded -starsd q wasm list-code - -curl -LO https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.9.0/cw721_base.wasm - -# upload contract code -starsd tx wasm store cw721_base.wasm --from validator $TXFLAG - -# instantiate contract -INIT="{ - \"name\": \"usernames\", - \"symbol\": \"USER\", - \"minter\": \"$CREATOR\" -}" -starsd tx wasm instantiate 1 "$INIT" --from creator --label "register username" $TXFLAG - -# get contract address -starsd q wasm list-contract-by-code 1 --output json -CONTRACT=$(starsd q wasm list-contract-by-code 1 --output json | jq -r '.contracts[-1]') - -# query contract -starsd q wasm contract-state smart $CONTRACT '{"num_tokens":{}}' -starsd q wasm contract-state smart $CONTRACT '{"contract_info":{}}' - -# execute a mint operation -MINT1="{\"mint\":{\"token_id\":\"1\",\"owner\":\"$INVESTOR\",\"name\":\"bobo1\",\"description\":\"Ape556\",\"image\":\"https://lh3.googleusercontent.com/Xv5i9YaUJO73claDwpJ-cqkx6-xhrrZnF9QAD_Qn4aPJHSxklQp4anlJuV-GABs4ZkB1lIsmkodUT3V8ER0wivNrwBswUHZzrpVOaQ=h1328\"}}" -MINT2="{\"mint\":{\"token_id\":\"2\",\"owner\":\"$INVESTOR\",\"name\":\"bobo2\",\"description\":\"Ape557\",\"image\":\"https://images.squarespace-cdn.com/content/v1/5c12933f365f02733c923e4e/1623457826739-RFS8YBP06I1W5WW2CSCG/tyler-hobbs-fidenza-612.png?format=750w\"}}" -MINT3="{\"mint\":{\"token_id\":\"3\",\"owner\":\"$INVESTOR\",\"name\":\"bobo3\",\"description\":\"Ape558\",\"image\":\"https://miro.medium.com/max/1400/1*Fg9-AmnE5X_929CqE1xp9w.png\"}}" -MINT4="{\"mint\":{\"token_id\":\"4\",\"owner\":\"$INVESTOR\",\"name\":\"bobo4\",\"description\":\"Ape559\",\"image\":\"https://lh3.googleusercontent.com/Zau-70Ga57u021g4xxx9UqHyiwwpxuFI-W1q0BWetxhmhm8_rTERCPsCfQled_nxBDIN40U7x1hDX3CvVkMeLe4Pxg=w600\"}}" -MINT5="{\"mint\":{\"token_id\":\"5\",\"owner\":\"$INVESTOR\",\"name\":\"bobo5\",\"description\":\"Ape554\",\"image\":\"https://lh3.googleusercontent.com/sjXMZ1J39uU7UlpXjm8TmGclwNbC6YiITFZXAmj0brUE9Yw_cLKeyFPTMRur2etRGfifYdIFdDpN7qZ9Vn9I3GTfUTP8DX0S05mv8w=w600\"}}" -starsd tx wasm execute $CONTRACT $MINT1 --from creator $TXFLAG -starsd tx wasm execute $CONTRACT $MINT2 --from creator $TXFLAG -starsd tx wasm execute $CONTRACT $MINT3 --from creator $TXFLAG -starsd tx wasm execute $CONTRACT $MINT4 --from creator $TXFLAG -starsd tx wasm execute $CONTRACT $MINT5 --from creator $TXFLAG - -# query contract -starsd q wasm contract-state smart $CONTRACT '{"owner_of":{"token_id":"1"}}' -starsd q wasm contract-state smart $CONTRACT '{"num_tokens":{}}' -starsd q wasm contract-state smart $CONTRACT '{"nft_info":{"token_id":"1"}}' -starsd q wasm contract-state smart $CONTRACT "{\"tokens\":{\"owner\":\"$INVESTOR\"}}" - -# execute an NFT transfer -TRANSFER="{\"transfer_nft\":{\"recipient\":\"$CREATOR\",\"token_id\":\"1\"}}" -starsd tx wasm execute $CONTRACT $TRANSFER --from investor $TXFLAG - -# owner should change from investor to creator -starsd q wasm contract-state smart $CONTRACT '{"owner_of":{"token_id":"1"}}' diff --git a/scripts/wasm/upload-contracts.sh b/scripts/wasm/upload-contracts.sh new file mode 100755 index 000000000..3e91bbd7b --- /dev/null +++ b/scripts/wasm/upload-contracts.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +## CONFIG +BINARY="${BINARY:-starsd}" +DENOM="${DENOM:-ustars}" +CHAIN_ID="${CHAIN_ID:-stargaze-devnet-1}" +NODE="${NODE:-https://rpc.devnet.publicawesome.dev:443}" + +if [ "$1" = "" ] +then + echo "Usage: $0 1 arg required, address or key name." + exit +fi + +TXFLAG="--gas-prices 0.01$DENOM --gas auto --gas-adjustment 1.3 -y -b block --chain-id $CHAIN_ID --node $NODE --output json" + +REPO=https://github.com/public-awesome/contracts +TAG=v0.1.8 + +if [[ -z "$GITHUB_OAUTH_TOKEN" ]]; then + echo "Must set GITHUB_OAUTH_TOKEN in environment" 1>&2 + exit 1 +fi + +if ! command -v fetch &> /dev/null +then + echo "fetch could not be found: https://github.com/gruntwork-io/fetch" + exit 1 +fi + +# Fetch contract wasm binaries +fetch --repo=$REPO --tag=$TAG --release-asset="collection_factory.wasm" . +fetch --repo=$REPO --tag=$TAG --release-asset="sg_marketplace.wasm" . +fetch --repo=$REPO --tag=$TAG --release-asset="sg721.wasm" . +fetch --repo=$REPO --tag=$TAG --release-asset="minter.wasm" . +fetch --repo=$REPO --tag=$TAG --release-asset="royalty_group.wasm" . +fetch --repo=https://github.com/CosmWasm/cw-nfts --tag=v0.11.0 --release-asset="cw721_metadata_onchain.wasm" . +fetch --repo=https://github.com/CosmWasm/cw-plus --tag=v0.11.1 --release-asset="cw4_group.wasm" . + +# Store code on chain +CW721_CODE=$($BINARY tx wasm store cw721_metadata_onchain.wasm --from $1 $TXFLAG | jq -r '.logs[0].events[-1].attributes[0].value') +MARKETPLACE_CODE=$($BINARY tx wasm store sg_marketplace.wasm --from $1 $TXFLAG | jq -r '.logs[0].events[-1].attributes[0].value') +FACTORY_CODE=$($BINARY tx wasm store collection_factory.wasm --from $1 $TXFLAG | jq -r '.logs[0].events[-1].attributes[0].value') +SG721_CODE=$($BINARY tx wasm store sg721.wasm --from $1 $TXFLAG | jq -r '.logs[0].events[-1].attributes[0].value') +MINTER_CODE=$($BINARY tx wasm store minter.wasm --from $1 $TXFLAG | jq -r '.logs[0].events[-1].attributes[0].value') +CW4_GROUP_CODE=$($BINARY tx wasm store cw4_group.wasm --from $1 $TXFLAG | jq -r '.logs[0].events[-1].attributes[0].value') + +# Clean up +rm collection_factory.wasm cw721_metadata_onchain.wasm sg_marketplace.wasm sg721.wasm sg721_sale.wasm cw4_group.wasm + +# Print out Code IDs +printf "\n ------------------------ \n" +printf "Code IDs: \n\n" +echo "CW721_CODE=$CW721_CODE" +echo "MARKETPLACE_CODE=$MARKETPLACE_CODE" +echo "FACTORY_CODE=$FACTORY_CODE" +echo "SG721_CODE=$SG721_CODE" +echo "MINTER_CODE=$MINTER_CODE" +echo "CW4_GROUP_CODE=$CW4_GROUP_CODE" diff --git a/testutil/network/network.go b/testutil/network/network.go index 25c642b8a..fa094adae 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -58,6 +58,8 @@ func DefaultConfig() network.Config { val.Ctx.Logger, tmdb.NewMemDB(), nil, true, map[int64]bool{}, val.Ctx.Config.RootDir, 0, encoding, simapp.EmptyAppOptions{}, + app.EmptyWasmOpts, + app.GetEnabledProposals(), baseapp.SetPruning(storetypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), ) diff --git a/testutil/simapp/pv.go b/testutil/simapp/pv.go new file mode 100644 index 000000000..9ff6ef2fa --- /dev/null +++ b/testutil/simapp/pv.go @@ -0,0 +1,50 @@ +package simapp + +import ( + "github.com/tendermint/tendermint/crypto" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" + + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +) + +var _ tmtypes.PrivValidator = PV{} + +// MockPV implements PrivValidator without any safety or persistence. +// Only use it for testing. +type PV struct { + PrivKey cryptotypes.PrivKey +} + +func NewPV() PV { + return PV{ed25519.GenPrivKey()} +} + +// GetPubKey implements PrivValidator interface +func (pv PV) GetPubKey() (crypto.PubKey, error) { + return cryptocodec.ToTmPubKeyInterface(pv.PrivKey.PubKey()) +} + +// SignVote implements PrivValidator interface +func (pv PV) SignVote(chainID string, vote *tmproto.Vote) error { + signBytes := tmtypes.VoteSignBytes(chainID, vote) + sig, err := pv.PrivKey.Sign(signBytes) + if err != nil { + return err + } + vote.Signature = sig + return nil +} + +// SignProposal implements PrivValidator interface +func (pv PV) SignProposal(chainID string, proposal *tmproto.Proposal) error { + signBytes := tmtypes.ProposalSignBytes(chainID, proposal) + sig, err := pv.PrivKey.Sign(signBytes) + if err != nil { + return err + } + proposal.Signature = sig + return nil +} diff --git a/testutil/simapp/simapp.go b/testutil/simapp/simapp.go index 96054528b..1fd345095 100644 --- a/testutil/simapp/simapp.go +++ b/testutil/simapp/simapp.go @@ -2,9 +2,17 @@ package simapp import ( "encoding/json" + "testing" "time" + bam "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/simapp/helpers" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" "github.com/tendermint/spm/cosmoscmd" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" @@ -12,20 +20,26 @@ import ( tmtypes "github.com/tendermint/tendermint/types" tmdb "github.com/tendermint/tm-db" - "github.com/public-awesome/stargaze/v3/app" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + stargazeapp "github.com/public-awesome/stargaze/v3/app" ) // New creates application instance with in-memory database and disabled logging. -func New(dir string) *app.App { +func New(dir string) *stargazeapp.App { db := tmdb.NewMemDB() logger := log.NewNopLogger() - encoding := cosmoscmd.MakeEncodingConfig(app.ModuleBasics) + encoding := cosmoscmd.MakeEncodingConfig(stargazeapp.ModuleBasics) - a := app.NewStargazeApp(logger, db, nil, true, map[int64]bool{}, dir, 0, encoding, - simapp.EmptyAppOptions{}) + a := stargazeapp.NewStargazeApp(logger, db, nil, true, map[int64]bool{}, dir, 0, encoding, + simapp.EmptyAppOptions{}, stargazeapp.EmptyWasmOpts, stargazeapp.GetEnabledProposals()) - stateBytes, err := json.MarshalIndent(app.ModuleBasics.DefaultGenesis(encoding.Marshaler), "", " ") + stateBytes, err := json.MarshalIndent(stargazeapp.ModuleBasics.DefaultGenesis(encoding.Marshaler), "", " ") if err != nil { panic(err) } @@ -34,7 +48,7 @@ func New(dir string) *app.App { ConsensusParams: defaultConsensusParams, AppStateBytes: stateBytes, }) - return a.(*app.App) + return a.(*stargazeapp.App) } var defaultConsensusParams = &abci.ConsensusParams{ @@ -53,3 +67,177 @@ var defaultConsensusParams = &abci.ConsensusParams{ }, }, } + +func setup(withGenesis bool, invCheckPeriod uint, dir string) (*stargazeapp.App, stargazeapp.GenesisState) { + db := tmdb.NewMemDB() + encoding := cosmoscmd.MakeEncodingConfig(stargazeapp.ModuleBasics) + a := stargazeapp.NewStargazeApp(log.NewNopLogger(), db, nil, true, + map[int64]bool{}, dir, invCheckPeriod, encoding, simapp.EmptyAppOptions{}, stargazeapp.EmptyWasmOpts, stargazeapp.GetEnabledProposals()) + if withGenesis { + return a.(*stargazeapp.App), stargazeapp.NewDefaultGenesisState(encoding.Marshaler) + } + return a.(*stargazeapp.App), stargazeapp.GenesisState{} +} + +// SetupWithGenesisValSet initializes a new SimApp 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 in the default token of the simapp from first genesis +// account. A Nop logger is set in SimApp. +func SetupWithGenesisValSet(t *testing.T, dir string, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *stargazeapp.App { + t.Helper() + + app, genesisState := setup(true, 5, dir) + genesisState = genesisStateWithValSet(t, app, genesisState, valSet, genAccs, balances...) + + stateBytes, err := json.MarshalIndent(genesisState, "", " ") + require.NoError(t, err) + + // init chain will set the validator set and initialize the genesis accounts + app.InitChain( + abci.RequestInitChain{ + Validators: []abci.ValidatorUpdate{}, + ConsensusParams: defaultConsensusParams, + AppStateBytes: stateBytes, + }, + ) + + // commit genesis changes + app.Commit() + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{ + Height: app.LastBlockHeight() + 1, + AppHash: app.LastCommitID().Hash, + ValidatorsHash: valSet.Hash(), + NextValidatorsHash: valSet.Hash(), + }}) + + return app +} + +// SetupWithGenesisAccounts initializes a new SimApp with the provided genesis +// accounts and possible balances. +func SetupWithGenesisAccounts(t *testing.T, dir string, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *stargazeapp.App { + t.Helper() + + privVal := NewPV() + pubKey, err := privVal.GetPubKey() + require.NoError(t, err) + + // create validator set with single validator + validator := tmtypes.NewValidator(pubKey, 1) + valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) + + return SetupWithGenesisValSet(t, dir, valSet, genAccs, balances...) +} + +func genesisStateWithValSet(t *testing.T, + app *stargazeapp.App, genesisState stargazeapp.GenesisState, + valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, + balances ...banktypes.Balance) stargazeapp.GenesisState { + // set genesis accounts + authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) + genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) + + validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) + delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) + + bondAmt := sdk.DefaultPowerReduction + + for _, val := range valSet.Validators { + pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) + require.NoError(t, err) + pkAny, err := codectypes.NewAnyWithValue(pk) + require.NoError(t, err) + validator := stakingtypes.Validator{ + OperatorAddress: sdk.ValAddress(val.Address).String(), + ConsensusPubkey: pkAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: bondAmt, + DelegatorShares: sdk.OneDec(), + Description: stakingtypes.Description{}, + UnbondingHeight: int64(0), + UnbondingTime: time.Unix(0, 0).UTC(), + Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + MinSelfDelegation: sdk.ZeroInt(), + } + validators = append(validators, validator) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) + + } + // set validators and delegations + stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) + genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) + + totalSupply := sdk.NewCoins() + for _, b := range balances { + // add genesis acc tokens to total supply + totalSupply = totalSupply.Add(b.Coins...) + } + + for range delegations { + // add delegated tokens to total supply + totalSupply = totalSupply.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)) + } + + // add bonded amount to bonded pool module account + balances = append(balances, banktypes.Balance{ + Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), + Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, + }) + + // update total supply + bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}) + genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) + + return genesisState +} + +// SignCheckDeliver checks a generated signed transaction and simulates a +// block commitment with the given transaction. A test assertion is made using +// the parameter 'expPass' against the result. A corresponding result is +// returned. +func SignCheckDeliver( + t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header tmproto.Header, msgs []sdk.Msg, + chainID string, accNums, accSeqs []uint64, simulate bool, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, +) (sdk.GasInfo, *sdk.Result, error) { + tx, err := helpers.GenTx( + txCfg, + msgs, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, + helpers.DefaultGenTxGas, + chainID, + accNums, + accSeqs, + priv..., + ) + require.NoError(t, err) + txBytes, err := txCfg.TxEncoder()(tx) + require.Nil(t, err) + if simulate { + // Must simulate now as CheckTx doesn't run Msgs anymore + _, res, err := app.Simulate(txBytes) + + if expSimPass { + require.NoError(t, err) + require.NotNil(t, res) + } else { + require.Error(t, err) + require.Nil(t, res) + } + } + // Simulate a sending a transaction and committing a block + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + gInfo, res, err := app.Deliver(txCfg.TxEncoder(), tx) + + if expPass { + require.NoError(t, err) + require.NotNil(t, res) + } else { + require.Error(t, err) + require.Nil(t, res) + } + + app.EndBlock(abci.RequestEndBlock{}) + app.Commit() + return gInfo, res, err +} diff --git a/x/alloc/module.go b/x/alloc/module.go index e6ec097ee..e38ef923b 100644 --- a/x/alloc/module.go +++ b/x/alloc/module.go @@ -135,6 +135,7 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) err := cfg.RegisterMigration(types.ModuleName, 2, func(sdk.Context) error { return nil }) if err != nil { panic(err) diff --git a/x/alloc/types/codec.go b/x/alloc/types/codec.go index c249a2723..25c37437f 100644 --- a/x/alloc/types/codec.go +++ b/x/alloc/types/codec.go @@ -17,9 +17,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgCreateVestingAccount{}, ) // this line is used by starport scaffolding # 3 - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/alloc/types/genesis.pb.go b/x/alloc/types/genesis.pb.go index d390c583b..ad06064ec 100644 --- a/x/alloc/types/genesis.pb.go +++ b/x/alloc/types/genesis.pb.go @@ -78,7 +78,7 @@ func init() { } var fileDescriptor_315d75f3d3600549 = []byte{ - // 216 bytes of a gzipped FileDescriptorProto + // 219 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x29, 0x2e, 0x49, 0x2c, 0x4a, 0x4f, 0xac, 0x4a, 0xd5, 0x4f, 0xcc, 0xc9, 0xc9, 0x4f, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, @@ -87,12 +87,12 @@ var fileDescriptor_315d75f3d3600549 = []byte{ 0xd0, 0x07, 0xb1, 0x20, 0x7a, 0xa5, 0x94, 0x71, 0xd8, 0x50, 0x90, 0x58, 0x94, 0x98, 0x0b, 0xb5, 0x40, 0x29, 0x8a, 0x8b, 0xc7, 0x1d, 0x62, 0x63, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x17, 0x17, 0x1b, 0x44, 0x5e, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x47, 0x8f, 0x18, 0x17, 0xe8, 0x05, - 0x80, 0xf5, 0x38, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x35, 0xc1, 0xc9, 0xeb, 0xc4, 0x23, + 0x80, 0xf5, 0x38, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x35, 0xc1, 0xc9, 0xf7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, - 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x0c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, - 0x92, 0xf3, 0x73, 0xf5, 0x21, 0xe6, 0xeb, 0x42, 0x2d, 0xd0, 0x87, 0x3b, 0xba, 0x02, 0xea, 0xec, - 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x73, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xb4, 0xca, 0x90, 0x3d, 0x37, 0x01, 0x00, 0x00, + 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x8c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, + 0x92, 0xf3, 0x73, 0xf5, 0x21, 0xe6, 0xeb, 0x42, 0x2d, 0xd0, 0x87, 0x3b, 0xba, 0xcc, 0x58, 0xbf, + 0x02, 0xea, 0xf2, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x8b, 0x8d, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x31, 0xa9, 0xa3, 0xb0, 0x3a, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/alloc/types/params.pb.go b/x/alloc/types/params.pb.go index fa9683d84..bf30caa0f 100644 --- a/x/alloc/types/params.pb.go +++ b/x/alloc/types/params.pb.go @@ -172,37 +172,37 @@ func init() { } var fileDescriptor_23171fab5d42f6a5 = []byte{ - // 465 bytes of a gzipped FileDescriptorProto + // 468 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x41, 0x6b, 0xd4, 0x40, 0x14, 0xde, 0xac, 0xb2, 0xe2, 0x94, 0x56, 0x0d, 0x4a, 0x17, 0x0f, 0x89, 0x8d, 0x45, 0x2a, 0xd8, - 0xc4, 0x56, 0xbc, 0x08, 0x22, 0x2e, 0x0b, 0x62, 0x4f, 0x65, 0x2e, 0x05, 0x2f, 0x61, 0x92, 0x79, - 0x4d, 0x07, 0x93, 0x4c, 0x98, 0x99, 0xdd, 0x58, 0x0f, 0x1e, 0xfc, 0x05, 0x1e, 0xfd, 0x1b, 0xde, - 0xfd, 0x01, 0x3d, 0xf6, 0x28, 0x1e, 0x82, 0xec, 0xfe, 0x83, 0xfd, 0x05, 0x92, 0xc9, 0x24, 0xd6, - 0x96, 0x85, 0xee, 0x29, 0x2f, 0x33, 0xf3, 0xbe, 0xef, 0x7b, 0xdf, 0x7b, 0x0f, 0x3d, 0x96, 0x8a, - 0x88, 0x84, 0x7c, 0x86, 0x80, 0xa4, 0x29, 0x8f, 0x83, 0xe9, 0x5e, 0x04, 0x8a, 0xec, 0x05, 0x05, - 0x11, 0x24, 0x93, 0x7e, 0x21, 0xb8, 0xe2, 0xf6, 0x76, 0x31, 0x89, 0x52, 0x16, 0x93, 0x12, 0x24, - 0xcf, 0xc0, 0x6f, 0x53, 0x7c, 0x9d, 0xe2, 0x9b, 0x94, 0x87, 0xf7, 0x13, 0x9e, 0x70, 0x9d, 0x10, - 0xd4, 0x51, 0x93, 0xeb, 0x7d, 0xb7, 0xd0, 0x9d, 0x23, 0x60, 0xc9, 0x89, 0x02, 0xfa, 0x96, 0x52, - 0x01, 0x52, 0xda, 0xcf, 0xd0, 0x2d, 0xd2, 0x84, 0x43, 0xeb, 0x91, 0xb5, 0x73, 0x7b, 0x64, 0x2f, - 0x2a, 0x77, 0xe3, 0x94, 0x64, 0xe9, 0x2b, 0xcf, 0x5c, 0x78, 0xb8, 0x7d, 0x62, 0x1f, 0xa1, 0x41, - 0xa9, 0x01, 0x86, 0x7d, 0xfd, 0xf8, 0xcd, 0x59, 0xe5, 0xf6, 0x7e, 0x57, 0xee, 0x93, 0x84, 0xa9, - 0x93, 0x49, 0xe4, 0xc7, 0x3c, 0x0b, 0x62, 0x2e, 0x33, 0x2e, 0xcd, 0x67, 0x57, 0xd2, 0x8f, 0x81, - 0x3a, 0x2d, 0x40, 0xfa, 0x63, 0x88, 0x17, 0x95, 0xbb, 0xde, 0x40, 0x37, 0x28, 0x1e, 0x36, 0x70, - 0xde, 0xd7, 0x3e, 0xda, 0x1c, 0x33, 0xa9, 0x04, 0x8b, 0x26, 0x8a, 0xf1, 0xfc, 0x50, 0xf0, 0x82, - 0x8b, 0x3a, 0x92, 0x76, 0x8e, 0x36, 0xf2, 0x63, 0x15, 0xb2, 0x3c, 0x86, 0x5c, 0xb1, 0x29, 0xb4, - 0x4a, 0xdf, 0xad, 0x4c, 0xfe, 0xa0, 0x21, 0xff, 0x1f, 0xcd, 0xc3, 0xeb, 0xf9, 0xb1, 0x7a, 0xdf, - 0xfd, 0xdb, 0x25, 0xba, 0x47, 0x61, 0x0a, 0x29, 0x2f, 0x40, 0x84, 0x02, 0x4a, 0x22, 0xa8, 0x34, - 0xf5, 0x1e, 0xac, 0x4c, 0x39, 0x6c, 0x28, 0xaf, 0x00, 0x7a, 0xf8, 0x6e, 0x77, 0x86, 0xcd, 0xd1, - 0xcf, 0x3e, 0x1a, 0x1c, 0xea, 0x66, 0xdb, 0x5f, 0xd0, 0x90, 0x5e, 0xb0, 0x23, 0x2c, 0xfe, 0xf9, - 0xa1, 0xab, 0x5f, 0xdb, 0x7f, 0xed, 0x5f, 0x67, 0x12, 0xfc, 0x25, 0xa6, 0x8e, 0x6e, 0xd6, 0x95, - 0xe0, 0x4d, 0xba, 0xc4, 0xf3, 0x1f, 0x16, 0xda, 0x2e, 0xcd, 0xa8, 0x84, 0x57, 0xc4, 0x87, 0x02, - 0x62, 0x60, 0x53, 0x10, 0xb5, 0x2f, 0x37, 0x76, 0xd6, 0xf6, 0x5f, 0x5e, 0x4f, 0xcc, 0xa5, 0xe1, - 0x1b, 0x3d, 0xad, 0x45, 0x2c, 0x2a, 0x77, 0x6b, 0x89, 0x49, 0x1d, 0x8f, 0x87, 0xb7, 0x5a, 0x35, - 0xe3, 0x4b, 0xae, 0xe1, 0x56, 0xca, 0xe8, 0xe0, 0x6c, 0xe6, 0x58, 0xe7, 0x33, 0xc7, 0xfa, 0x33, - 0x73, 0xac, 0x6f, 0x73, 0xa7, 0x77, 0x3e, 0x77, 0x7a, 0xbf, 0xe6, 0x4e, 0xef, 0xc3, 0xf3, 0x0b, - 0xed, 0x6a, 0x84, 0xee, 0x1a, 0xa5, 0x41, 0xb7, 0x73, 0x9f, 0xcc, 0xd6, 0xe9, 0xe6, 0x45, 0x03, - 0xbd, 0x31, 0x2f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xce, 0x68, 0x00, 0x8c, 0x94, 0x03, 0x00, - 0x00, + 0x84, 0x76, 0xf1, 0x22, 0x88, 0xb8, 0x2c, 0x88, 0x82, 0x50, 0xe6, 0x52, 0xf0, 0x12, 0x26, 0x99, + 0xd7, 0x74, 0x30, 0xc9, 0x84, 0x99, 0xd9, 0xc4, 0x7a, 0xf0, 0xe0, 0x2f, 0xf0, 0xe8, 0xdf, 0xf0, + 0xee, 0x0f, 0xe8, 0xb1, 0x47, 0xf1, 0x10, 0x64, 0xf7, 0x1f, 0xec, 0x2f, 0x90, 0x4c, 0x26, 0x6b, + 0x6d, 0x59, 0x68, 0x4f, 0x79, 0x99, 0x99, 0xf7, 0x7d, 0xdf, 0xfb, 0xde, 0x7b, 0xe8, 0xb1, 0x54, + 0x44, 0x24, 0xe4, 0x33, 0x04, 0x24, 0x4d, 0x79, 0x1c, 0x94, 0x7b, 0x11, 0x28, 0xb2, 0x17, 0x14, + 0x44, 0x90, 0x4c, 0xfa, 0x85, 0xe0, 0x8a, 0xdb, 0xdb, 0xc5, 0x34, 0x4a, 0x59, 0x4c, 0x2a, 0x90, + 0x3c, 0x03, 0xbf, 0x4b, 0xf1, 0x75, 0x8a, 0x6f, 0x52, 0x1e, 0xde, 0x4f, 0x78, 0xc2, 0x75, 0x42, + 0xd0, 0x44, 0x6d, 0xae, 0xf7, 0xdd, 0x42, 0x77, 0x0e, 0x81, 0x25, 0xc7, 0x0a, 0xe8, 0x6b, 0x4a, + 0x05, 0x48, 0x69, 0x3f, 0x43, 0xb7, 0x48, 0x1b, 0x0e, 0xad, 0x47, 0xd6, 0xce, 0xed, 0xb1, 0xbd, + 0xa8, 0xdd, 0x8d, 0x13, 0x92, 0xa5, 0x2f, 0x3c, 0x73, 0xe1, 0xe1, 0xee, 0x89, 0x7d, 0x88, 0x06, + 0x95, 0x06, 0x18, 0xf6, 0xf5, 0xe3, 0x57, 0xa7, 0xb5, 0xdb, 0xfb, 0x5d, 0xbb, 0x4f, 0x12, 0xa6, + 0x8e, 0xa7, 0x91, 0x1f, 0xf3, 0x2c, 0x88, 0xb9, 0xcc, 0xb8, 0x34, 0x9f, 0x5d, 0x49, 0x3f, 0x06, + 0xea, 0xa4, 0x00, 0xe9, 0x4f, 0x20, 0x5e, 0xd4, 0xee, 0x7a, 0x0b, 0xdd, 0xa2, 0x78, 0xd8, 0xc0, + 0x79, 0x5f, 0xfb, 0x68, 0x73, 0xc2, 0xa4, 0x12, 0x2c, 0x9a, 0x2a, 0xc6, 0xf3, 0x03, 0xc1, 0x0b, + 0x2e, 0x9a, 0x48, 0xda, 0x39, 0xda, 0xc8, 0x8f, 0x54, 0xc8, 0xf2, 0x18, 0x72, 0xc5, 0x4a, 0xe8, + 0x94, 0xbe, 0xb9, 0x36, 0xf9, 0x83, 0x96, 0xfc, 0x7f, 0x34, 0x0f, 0xaf, 0xe7, 0x47, 0xea, 0xed, + 0xf2, 0xdf, 0xae, 0xd0, 0x3d, 0x0a, 0x25, 0xa4, 0xbc, 0x00, 0x11, 0x0a, 0xa8, 0x88, 0xa0, 0xd2, + 0xd4, 0xfb, 0xee, 0xda, 0x94, 0xc3, 0x96, 0xf2, 0x12, 0xa0, 0x87, 0xef, 0x2e, 0xcf, 0xb0, 0x39, + 0xfa, 0xd9, 0x47, 0x83, 0x03, 0xdd, 0x6c, 0xfb, 0x0b, 0x1a, 0xd2, 0x73, 0x76, 0x84, 0xc5, 0x3f, + 0x3f, 0x74, 0xf5, 0x6b, 0xfb, 0x2f, 0xfd, 0xab, 0x4c, 0x82, 0xbf, 0xc2, 0xd4, 0xf1, 0xcd, 0xa6, + 0x12, 0xbc, 0x49, 0x57, 0x78, 0xfe, 0xc3, 0x42, 0xdb, 0x95, 0x19, 0x95, 0xf0, 0x92, 0xf8, 0x50, + 0x40, 0x0c, 0xac, 0x04, 0xd1, 0xf8, 0x72, 0x63, 0x67, 0x6d, 0xff, 0xf9, 0xd5, 0xc4, 0x5c, 0x18, + 0xbe, 0xf1, 0xd3, 0x46, 0xc4, 0xa2, 0x76, 0xb7, 0x56, 0x98, 0xb4, 0xe4, 0xf1, 0xf0, 0x56, 0xa7, + 0x66, 0x72, 0xc1, 0x35, 0xdc, 0x49, 0x19, 0xbf, 0x3f, 0x9d, 0x39, 0xd6, 0xd9, 0xcc, 0xb1, 0xfe, + 0xcc, 0x1c, 0xeb, 0xdb, 0xdc, 0xe9, 0x9d, 0xcd, 0x9d, 0xde, 0xaf, 0xb9, 0xd3, 0xfb, 0x30, 0x3a, + 0xd7, 0xae, 0x56, 0xe8, 0xae, 0x51, 0x1a, 0x2c, 0x77, 0xae, 0x1c, 0x05, 0x9f, 0xcc, 0xe2, 0xe9, + 0xfe, 0x45, 0x03, 0xbd, 0x34, 0xa3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x29, 0x09, 0xfb, 0x85, + 0x97, 0x03, 0x00, 0x00, } func (m *WeightedAddress) Marshal() (dAtA []byte, err error) { diff --git a/x/alloc/types/query.pb.go b/x/alloc/types/query.pb.go index 273863b20..e0f4efbd9 100644 --- a/x/alloc/types/query.pb.go +++ b/x/alloc/types/query.pb.go @@ -122,7 +122,7 @@ func init() { } var fileDescriptor_119e427aa09d6464 = []byte{ - // 296 bytes of a gzipped FileDescriptorProto + // 299 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2a, 0x2e, 0x49, 0x2c, 0x4a, 0x4f, 0xac, 0x4a, 0xd5, 0x4f, 0xcc, 0xc9, 0xc9, 0x4f, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, @@ -136,12 +136,12 @@ var fileDescriptor_119e427aa09d6464 = []byte{ 0x6d, 0xa4, 0xa3, 0x47, 0x8c, 0xe3, 0xf5, 0x20, 0xa6, 0x38, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x35, 0xc1, 0x68, 0x3d, 0x23, 0x17, 0x2b, 0xd8, 0x0e, 0xa1, 0xa5, 0x8c, 0x5c, 0x6c, 0x10, 0x25, 0x42, 0x16, 0xc4, 0x19, 0x88, 0xe9, 0x62, 0x29, 0x4b, 0x32, 0x74, 0x42, 0x7c, 0xa5, 0xa4, - 0xd6, 0x74, 0xf9, 0xc9, 0x64, 0x26, 0x05, 0x21, 0x39, 0x7d, 0xbc, 0x01, 0xe6, 0xe4, 0x75, 0xe2, + 0xd6, 0x74, 0xf9, 0xc9, 0x64, 0x26, 0x05, 0x21, 0x39, 0x7d, 0xbc, 0x01, 0xe6, 0xe4, 0x7b, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, - 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x06, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, - 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0x67, 0xe8, 0x42, 0xdd, 0x81, 0x30, 0xb2, 0x02, 0x6a, 0x68, - 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0xf4, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xa6, 0x03, 0xe0, 0x3e, 0x22, 0x02, 0x00, 0x00, + 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xc6, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, + 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0x67, 0xe8, 0x42, 0xdd, 0x81, 0x30, 0xb2, 0xcc, 0x58, 0xbf, + 0x02, 0x6a, 0x6e, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x02, 0x8c, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x17, 0xc3, 0x3c, 0xe5, 0x25, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/alloc/types/tx.pb.go b/x/alloc/types/tx.pb.go index 2fffc8eef..f5a78747c 100644 --- a/x/alloc/types/tx.pb.go +++ b/x/alloc/types/tx.pb.go @@ -116,7 +116,8 @@ func (m *MsgCreateVestingAccount) GetDelayed() bool { return false } -// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. +// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response +// type. type MsgCreateVestingAccountResponse struct { } @@ -161,36 +162,36 @@ func init() { func init() { proto.RegisterFile("stargaze/alloc/v1beta1/tx.proto", fileDescriptor_8d14330d7694f253) } var fileDescriptor_8d14330d7694f253 = []byte{ - // 453 bytes of a gzipped FileDescriptorProto + // 455 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x31, 0x6f, 0xd3, 0x40, 0x14, 0xc7, 0x73, 0x4d, 0x49, 0x9b, 0x2b, 0x12, 0xc2, 0x2d, 0xaa, 0xc9, 0x60, 0x07, 0x8b, 0xc1, - 0x4b, 0xcf, 0x6d, 0x61, 0x8a, 0xc4, 0xd0, 0x54, 0x2c, 0x48, 0x5d, 0x2c, 0xc4, 0xc0, 0x52, 0x9d, - 0xed, 0x87, 0xb1, 0xf0, 0xf9, 0x45, 0xbe, 0x0b, 0x34, 0x7c, 0x0a, 0x3e, 0x00, 0x03, 0x03, 0x13, - 0x9f, 0xa4, 0x63, 0x47, 0x26, 0x83, 0x92, 0x85, 0x39, 0x03, 0x33, 0xf2, 0x9d, 0x9d, 0x66, 0x20, - 0x12, 0x12, 0x93, 0xfd, 0xf4, 0x7f, 0xbf, 0x7b, 0xff, 0xbb, 0xf7, 0xa7, 0xae, 0x54, 0xbc, 0x4c, - 0xf9, 0x47, 0x08, 0x78, 0x9e, 0x63, 0x1c, 0xbc, 0x3f, 0x89, 0x40, 0xf1, 0x93, 0x40, 0x5d, 0xb1, - 0x49, 0x89, 0x0a, 0xad, 0xc7, 0x93, 0x69, 0x94, 0x67, 0x31, 0xff, 0x00, 0x12, 0x05, 0xb0, 0xb6, - 0x9d, 0xe9, 0x76, 0xd6, 0xb4, 0x0f, 0x0e, 0x52, 0x4c, 0x51, 0x03, 0x41, 0xfd, 0x67, 0xd8, 0x81, - 0x13, 0xa3, 0x14, 0x28, 0x83, 0x88, 0x4b, 0x58, 0x9d, 0x1c, 0x63, 0x56, 0x18, 0xdd, 0xfb, 0xbd, - 0x45, 0x0f, 0x2f, 0x64, 0x7a, 0x5e, 0x02, 0x57, 0xf0, 0x0a, 0xa4, 0xca, 0x8a, 0xf4, 0x2c, 0x8e, - 0x71, 0x5a, 0x28, 0x6b, 0x44, 0xef, 0xbe, 0x29, 0x51, 0x5c, 0xf2, 0x24, 0x29, 0x41, 0x4a, 0x9b, - 0x0c, 0x89, 0xdf, 0x1f, 0x1f, 0x2e, 0x2b, 0x77, 0x7f, 0xc6, 0x45, 0x3e, 0xf2, 0xd6, 0x55, 0x2f, - 0xdc, 0xab, 0xcb, 0x33, 0x53, 0x59, 0x4f, 0x29, 0x55, 0xb8, 0x22, 0xb7, 0x34, 0xf9, 0x60, 0x59, - 0xb9, 0xf7, 0x0d, 0x79, 0xab, 0x79, 0x61, 0x5f, 0x61, 0x4b, 0xc5, 0xb4, 0xc7, 0x45, 0x3d, 0xdb, - 0xee, 0x0e, 0xbb, 0xfe, 0xde, 0xe9, 0x43, 0x66, 0xec, 0xb3, 0xda, 0x7e, 0x7b, 0x53, 0x76, 0x8e, - 0x59, 0x31, 0x3e, 0xbe, 0xae, 0xdc, 0xce, 0xb7, 0x1f, 0xae, 0x9f, 0x66, 0xea, 0xed, 0x34, 0x62, - 0x31, 0x8a, 0xa0, 0xb9, 0xab, 0xf9, 0x1c, 0xc9, 0xe4, 0x5d, 0xa0, 0x66, 0x13, 0x90, 0x1a, 0x90, - 0x61, 0x73, 0x74, 0x6d, 0xad, 0x7e, 0x42, 0x75, 0xa9, 0x32, 0x01, 0xf6, 0xf6, 0x90, 0xf8, 0xdd, - 0x75, 0x6b, 0xb7, 0x9a, 0x17, 0xf6, 0x75, 0xf1, 0x32, 0x13, 0x60, 0x31, 0xba, 0x0b, 0x45, 0x62, - 0x98, 0x3b, 0x9a, 0xd9, 0x5f, 0x56, 0xee, 0x3d, 0xc3, 0xb4, 0x8a, 0x17, 0xee, 0x40, 0x91, 0xe8, - 0x7e, 0x9b, 0xee, 0x24, 0x90, 0xf3, 0x19, 0x24, 0x76, 0x6f, 0x48, 0xfc, 0xdd, 0xb0, 0x2d, 0x47, - 0xdb, 0xbf, 0xbe, 0xb8, 0xc4, 0x7b, 0x44, 0xdd, 0x0d, 0xef, 0x1e, 0x82, 0x9c, 0x60, 0x21, 0xe1, - 0xf4, 0x2b, 0xa1, 0xdd, 0x0b, 0x99, 0x5a, 0x9f, 0x09, 0x3d, 0xf8, 0xeb, 0x82, 0x9e, 0xb1, 0x7f, - 0x49, 0x06, 0xdb, 0x30, 0x67, 0xf0, 0xfc, 0xbf, 0xf0, 0xd6, 0xe6, 0xf8, 0xc5, 0xf5, 0xdc, 0x21, - 0x37, 0x73, 0x87, 0xfc, 0x9c, 0x3b, 0xe4, 0xd3, 0xc2, 0xe9, 0xdc, 0x2c, 0x9c, 0xce, 0xf7, 0x85, - 0xd3, 0x79, 0x7d, 0xbc, 0xb6, 0x1b, 0x33, 0xea, 0xa8, 0x99, 0x15, 0xac, 0x32, 0x7f, 0xd5, 0xa4, - 0x5e, 0x6f, 0x2a, 0xea, 0xe9, 0x54, 0x3e, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x10, 0xc9, - 0x0a, 0x14, 0x03, 0x00, 0x00, + 0x4b, 0xef, 0x68, 0xc3, 0x14, 0x89, 0xa1, 0xa9, 0x18, 0xb3, 0x58, 0x88, 0x81, 0xa5, 0x3a, 0xdb, + 0x0f, 0x63, 0x61, 0xfb, 0x45, 0xbe, 0x4b, 0x69, 0xf8, 0x14, 0x7c, 0x00, 0x06, 0x06, 0x26, 0x3e, + 0x49, 0xc7, 0x8e, 0x4c, 0x01, 0x25, 0x0b, 0x73, 0x06, 0x66, 0xe4, 0x3b, 0x3b, 0xcd, 0x40, 0x24, + 0x24, 0x26, 0xfb, 0xe9, 0xff, 0x7e, 0xf7, 0xfe, 0x77, 0xef, 0x4f, 0x5d, 0xa9, 0x44, 0x99, 0x88, + 0x8f, 0xc0, 0x45, 0x96, 0x61, 0xc4, 0xaf, 0x4e, 0x43, 0x50, 0xe2, 0x94, 0xab, 0x6b, 0x36, 0x29, + 0x51, 0xa1, 0xf5, 0x74, 0x32, 0x0d, 0xb3, 0x34, 0x12, 0x1f, 0x40, 0x62, 0x0e, 0xac, 0x69, 0x67, + 0xba, 0x9d, 0xd5, 0xed, 0xbd, 0xa3, 0x04, 0x13, 0xd4, 0x00, 0xaf, 0xfe, 0x0c, 0xdb, 0x73, 0x22, + 0x94, 0x39, 0x4a, 0x1e, 0x0a, 0x09, 0xeb, 0x93, 0x23, 0x4c, 0x0b, 0xa3, 0x7b, 0xbf, 0x77, 0xe8, + 0xf1, 0x58, 0x26, 0x17, 0x25, 0x08, 0x05, 0xaf, 0x41, 0xaa, 0xb4, 0x48, 0xce, 0xa3, 0x08, 0xa7, + 0x85, 0xb2, 0x86, 0xf4, 0xfe, 0xdb, 0x12, 0xf3, 0x4b, 0x11, 0xc7, 0x25, 0x48, 0x69, 0x93, 0x3e, + 0xf1, 0xbb, 0xa3, 0xe3, 0xd5, 0xdc, 0x3d, 0x9c, 0x89, 0x3c, 0x1b, 0x7a, 0x9b, 0xaa, 0x17, 0x1c, + 0x54, 0xe5, 0xb9, 0xa9, 0xac, 0xe7, 0x94, 0x2a, 0x5c, 0x93, 0x3b, 0x9a, 0x7c, 0xb4, 0x9a, 0xbb, + 0x0f, 0x0d, 0x79, 0xa7, 0x79, 0x41, 0x57, 0x61, 0x43, 0x45, 0xb4, 0x23, 0xf2, 0x6a, 0xb6, 0xdd, + 0xee, 0xb7, 0xfd, 0x83, 0xb3, 0xc7, 0xcc, 0xd8, 0x67, 0x95, 0xfd, 0xe6, 0xa6, 0xec, 0x02, 0xd3, + 0x62, 0xf4, 0xec, 0x66, 0xee, 0xb6, 0xbe, 0xfd, 0x70, 0xfd, 0x24, 0x55, 0xef, 0xa6, 0x21, 0x8b, + 0x30, 0xe7, 0xf5, 0x5d, 0xcd, 0xe7, 0x44, 0xc6, 0xef, 0xb9, 0x9a, 0x4d, 0x40, 0x6a, 0x40, 0x06, + 0xf5, 0xd1, 0x95, 0xb5, 0xea, 0x09, 0xd5, 0xa5, 0x4a, 0x73, 0xb0, 0x77, 0xfb, 0xc4, 0x6f, 0x6f, + 0x5a, 0xbb, 0xd3, 0xbc, 0xa0, 0xab, 0x8b, 0x57, 0x69, 0x0e, 0x16, 0xa3, 0xfb, 0x50, 0xc4, 0x86, + 0xb9, 0xa7, 0x99, 0xc3, 0xd5, 0xdc, 0x7d, 0x60, 0x98, 0x46, 0xf1, 0x82, 0x3d, 0x28, 0x62, 0xdd, + 0x6f, 0xd3, 0xbd, 0x18, 0x32, 0x31, 0x83, 0xd8, 0xee, 0xf4, 0x89, 0xbf, 0x1f, 0x34, 0xe5, 0x70, + 0xf7, 0xd7, 0x17, 0x97, 0x78, 0x4f, 0xa8, 0xbb, 0xe5, 0xdd, 0x03, 0x90, 0x13, 0x2c, 0x24, 0x9c, + 0x7d, 0x25, 0xb4, 0x3d, 0x96, 0x89, 0xf5, 0x99, 0xd0, 0xa3, 0xbf, 0x2e, 0xe8, 0x05, 0xfb, 0x97, + 0x64, 0xb0, 0x2d, 0x73, 0x7a, 0x2f, 0xff, 0x0b, 0x6f, 0x6c, 0x8e, 0xc6, 0x37, 0x0b, 0x87, 0xdc, + 0x2e, 0x1c, 0xf2, 0x73, 0xe1, 0x90, 0x4f, 0x4b, 0xa7, 0x75, 0xbb, 0x74, 0x5a, 0xdf, 0x97, 0x4e, + 0xeb, 0xcd, 0x60, 0x63, 0x37, 0x66, 0xd4, 0x49, 0x3d, 0x8b, 0xaf, 0x33, 0x7f, 0x35, 0xe0, 0xd7, + 0x75, 0xf0, 0xf5, 0xb2, 0xc2, 0x8e, 0x0e, 0xe6, 0xe0, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x85, + 0x0d, 0x3f, 0xf0, 0x17, 0x03, 0x00, 0x00, } func (this *MsgCreateVestingAccount) Equal(that interface{}) bool { diff --git a/x/claim/handler.go b/x/claim/handler.go index f1b213ac1..b041cf478 100644 --- a/x/claim/handler.go +++ b/x/claim/handler.go @@ -11,6 +11,7 @@ import ( // NewHandler ... func NewHandler(k keeper.Keeper) sdk.Handler { + // this line is used by starport scaffolding # handler/msgServer msgServer := keeper.NewMsgServerImpl(k) // this line is used by starport scaffolding # handler/msgServer @@ -20,6 +21,9 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgInitialClaim: res, err := msgServer.InitialClaim(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgClaimFor: + res, err := msgServer.ClaimFor(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) // this line is used by starport scaffolding # 1 default: errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) diff --git a/x/claim/keeper/keeper_test.go b/x/claim/keeper/keeper_test.go index b289de20a..2cb165e0e 100644 --- a/x/claim/keeper/keeper_test.go +++ b/x/claim/keeper/keeper_test.go @@ -5,11 +5,15 @@ import ( "testing" "time" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/public-awesome/stargaze/v3/app" "github.com/public-awesome/stargaze/v3/testutil/simapp" + "github.com/public-awesome/stargaze/v3/x/claim/keeper" "github.com/public-awesome/stargaze/v3/x/claim/types" "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -17,8 +21,9 @@ import ( type KeeperTestSuite struct { suite.Suite - ctx sdk.Context - app *app.App + ctx sdk.Context + app *app.App + msgSrvr types.MsgServer } func (suite *KeeperTestSuite) SetupTest() { @@ -27,6 +32,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.app.ClaimKeeper.CreateModuleAccount(suite.ctx, sdk.NewCoin(types.DefaultClaimDenom, sdk.NewInt(10000000))) startTime := time.Now() + suite.msgSrvr = keeper.NewMsgServerImpl(suite.app.ClaimKeeper) suite.app.ClaimKeeper.SetParams(suite.ctx, types.Params{ AirdropEnabled: true, AirdropStartTime: startTime, @@ -44,6 +50,124 @@ func (s *KeeperTestSuite) TestModuleAccountCreated() { s.Require().Equal(fmt.Sprintf("10000000%s", types.DefaultClaimDenom), balance.String()) } +func (s *KeeperTestSuite) TestClaimFor() { + pub1 := secp256k1.GenPrivKey().PubKey() + pub2 := secp256k1.GenPrivKey().PubKey() + addr1 := sdk.AccAddress(pub1.Address()) + addr2 := sdk.AccAddress(pub2.Address()) + contractAddress1 := wasmkeeper.BuildContractAddress(1, 1) + contractAddress2 := wasmkeeper.BuildContractAddress(1, 2) + claimRecords := []types.ClaimRecord{ + { + Address: addr1.String(), + InitialClaimableAmount: sdk.NewCoins(sdk.NewInt64Coin(types.DefaultClaimDenom, 2000)), + ActionCompleted: []bool{false, false, false, false, false}, + }, + { + Address: addr2.String(), + InitialClaimableAmount: sdk.NewCoins(sdk.NewInt64Coin(types.DefaultClaimDenom, 2000)), + ActionCompleted: []bool{false, false, false, false, false}, + }, + } + + s.app.AccountKeeper.SetAccount(s.ctx, authtypes.NewBaseAccount(addr1, nil, 0, 0)) + s.app.AccountKeeper.SetAccount(s.ctx, authtypes.NewBaseAccount(addr2, nil, 0, 0)) + + s.app.ClaimKeeper.SetParams(s.ctx, types.Params{ + AirdropEnabled: false, + AirdropStartTime: time.Now().Add(time.Hour * -1), + ClaimDenom: types.DefaultClaimDenom, + DurationUntilDecay: time.Hour, + DurationOfDecay: time.Hour * 4, + AllowedClaimers: make([]types.ClaimAuthorization, 0), + }) + err := s.app.ClaimKeeper.SetClaimRecords(s.ctx, claimRecords) + s.Require().NoError(err) + msgClaimFor := types.NewMsgClaimFor(contractAddress1.String(), addr1.String(), types.ActionBidNFT) + ctx := sdk.WrapSDKContext(s.ctx) + _, err = s.msgSrvr.ClaimFor(ctx, msgClaimFor) + s.Error(err) + s.Contains(err.Error(), "airdrop not enabled") + s.app.ClaimKeeper.SetParams(s.ctx, types.Params{ + AirdropEnabled: true, + AirdropStartTime: time.Now().Add(time.Hour * -1), + ClaimDenom: types.DefaultClaimDenom, + DurationUntilDecay: time.Hour, + DurationOfDecay: time.Hour * 4, + AllowedClaimers: []types.ClaimAuthorization{ + { + ContractAddress: contractAddress1.String(), + Action: types.ActionBidNFT, + }, + { + ContractAddress: contractAddress2.String(), + Action: types.ActionMintNFT, + }, + }, + }) + + // unauthorized + msgClaimFor = types.NewMsgClaimFor(wasmkeeper.BuildContractAddress(2, 1).String(), addr1.String(), types.ActionMintNFT) + _, err = s.msgSrvr.ClaimFor(ctx, msgClaimFor) + s.Require().Error(err) + s.Contains(err.Error(), "address is not allowed to claim") + + // unauthorized to claim another action + + msgClaimFor = types.NewMsgClaimFor(contractAddress1.String(), addr1.String(), types.ActionMintNFT) + _, err = s.msgSrvr.ClaimFor(ctx, msgClaimFor) + s.Require().Error(err) + s.Contains(err.Error(), "address is not allowed to claim") + + // claim + msgClaimFor = types.NewMsgClaimFor(contractAddress1.String(), addr1.String(), types.ActionBidNFT) + _, err = s.msgSrvr.ClaimFor(ctx, msgClaimFor) + s.Require().NoError(err) + + claimedCoins := s.app.BankKeeper.GetAllBalances(s.ctx, addr1) + s.Require().Equal(claimedCoins.AmountOf(types.DefaultClaimDenom), claimRecords[0].InitialClaimableAmount.AmountOf(types.DefaultClaimDenom).Quo(sdk.NewInt(5))) + + record, err := s.app.ClaimKeeper.GetClaimRecord(s.ctx, addr1) + s.Require().NoError(err) + s.Require().True(record.ActionCompleted[1]) + s.Require().Equal([]bool{false, true, false, false, false}, record.ActionCompleted) + + // claim 2 + msgClaimFor = types.NewMsgClaimFor(contractAddress2.String(), addr1.String(), types.ActionMintNFT) + _, err = s.msgSrvr.ClaimFor(ctx, msgClaimFor) + s.Require().NoError(err) + + claimedCoins = s.app.BankKeeper.GetAllBalances(s.ctx, addr1) + s.Require().Equal( + claimedCoins.AmountOf(types.DefaultClaimDenom).String(), + claimRecords[0].InitialClaimableAmount.AmountOf(types.DefaultClaimDenom).Quo(sdk.NewInt(5)).Mul(sdk.NewInt(2)).String(), // 2 actions claimed + ) + + record, err = s.app.ClaimKeeper.GetClaimRecord(s.ctx, addr1) + s.Require().NoError(err) + s.Require().True(record.ActionCompleted[1]) + s.Require().True(record.ActionCompleted[2]) + s.Require().Equal([]bool{false, true, true, false, false}, record.ActionCompleted) + + // claim second address + msgClaimFor = types.NewMsgClaimFor(contractAddress2.String(), addr2.String(), types.ActionMintNFT) + _, err = s.msgSrvr.ClaimFor(ctx, msgClaimFor) + s.Require().NoError(err) + + claimedCoins = s.app.BankKeeper.GetAllBalances(s.ctx, addr2) + s.Require().Equal( + claimedCoins.AmountOf(types.DefaultClaimDenom).String(), + claimRecords[0].InitialClaimableAmount.AmountOf(types.DefaultClaimDenom).Quo(sdk.NewInt(5)).String(), // 1 action claimed + ) + + record, err = s.app.ClaimKeeper.GetClaimRecord(s.ctx, addr2) + s.Require().NoError(err) + s.Require().False(record.ActionCompleted[1]) + s.Require().True(record.ActionCompleted[2]) + s.Require().Equal([]bool{false, false, true, false, false}, record.ActionCompleted) + +} + func TestKeeperTestSuite(t *testing.T) { suite.Run(t, new(KeeperTestSuite)) } diff --git a/x/claim/keeper/msg_server_claim_for.go b/x/claim/keeper/msg_server_claim_for.go new file mode 100644 index 000000000..cb931d6f6 --- /dev/null +++ b/x/claim/keeper/msg_server_claim_for.go @@ -0,0 +1,49 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/public-awesome/stargaze/v3/x/claim/types" +) + +func (k msgServer) ClaimFor(goCtx context.Context, msg *types.MsgClaimFor) (*types.MsgClaimForResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + address, err := sdk.AccAddressFromBech32(msg.Address) + if err != nil { + return nil, err + } + params := k.GetParams(ctx) + if !params.IsAirdropEnabled(ctx.BlockTime()) { + return nil, types.ErrAirdropNotEnabled + } + allowed := false + for _, authorization := range params.AllowedClaimers { + if authorization.ContractAddress == msg.Sender && authorization.Action == msg.Action { + allowed = true + break + } + } + if !allowed { + return nil, types.ErrUnauthorizedClaimer + } + coins, err := k.Keeper.ClaimCoinsForAction(ctx, address, msg.GetAction()) + if err != nil { + return nil, err + } + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), + ), + }) + return &types.MsgClaimForResponse{ + Address: msg.Address, + ClaimedAmount: coins, + }, nil +} diff --git a/x/claim/module.go b/x/claim/module.go index 74ba95767..45a48add1 100644 --- a/x/claim/module.go +++ b/x/claim/module.go @@ -135,6 +135,7 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) err := cfg.RegisterMigration(types.ModuleName, 2, func(sdk.Context) error { return nil }) if err != nil { panic(err) diff --git a/x/claim/types/claim_record.pb.go b/x/claim/types/claim_record.pb.go index ad3572eee..46d254396 100644 --- a/x/claim/types/claim_record.pb.go +++ b/x/claim/types/claim_record.pb.go @@ -28,27 +28,27 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Action int32 const ( - ActionInitialClaim Action = 0 - ActionBuySocialToken Action = 1 - ActionMintNFT Action = 2 - ActionVote Action = 3 - ActionDelegateStake Action = 4 + ActionInitialClaim Action = 0 + ActionBidNFT Action = 1 + ActionMintNFT Action = 2 + ActionVote Action = 3 + ActionDelegateStake Action = 4 ) var Action_name = map[int32]string{ 0: "ActionInitialClaim", - 1: "ActionBuySocialToken", + 1: "ActionBidNFT", 2: "ActionMintNFT", 3: "ActionVote", 4: "ActionDelegateStake", } var Action_value = map[string]int32{ - "ActionInitialClaim": 0, - "ActionBuySocialToken": 1, - "ActionMintNFT": 2, - "ActionVote": 3, - "ActionDelegateStake": 4, + "ActionInitialClaim": 0, + "ActionBidNFT": 1, + "ActionMintNFT": 2, + "ActionVote": 3, + "ActionDelegateStake": 4, } func (x Action) String() string { @@ -133,35 +133,35 @@ func init() { } var fileDescriptor_8a75b9157744df4f = []byte{ - // 448 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xb5, 0x93, 0xa8, 0xc0, 0x56, 0x14, 0xb3, 0x54, 0xad, 0xc9, 0xc1, 0x8e, 0x2c, 0x0e, 0x01, - 0x51, 0x9b, 0xc2, 0x8d, 0x5b, 0x1d, 0x84, 0x44, 0x25, 0x38, 0x24, 0x15, 0x07, 0x2e, 0xd1, 0xda, - 0x1e, 0x99, 0x55, 0x6c, 0x4f, 0xe4, 0x5d, 0x03, 0x41, 0x7c, 0x00, 0x47, 0xfe, 0x81, 0x0b, 0xe2, - 0xc8, 0x57, 0xf4, 0xd8, 0x23, 0xa7, 0x80, 0x92, 0x3f, 0xe8, 0x17, 0xa0, 0xec, 0xae, 0x21, 0x42, - 0xea, 0x69, 0x77, 0xdf, 0xcc, 0x7b, 0xf3, 0x76, 0xf4, 0xc8, 0x7d, 0x21, 0x59, 0x9d, 0xb3, 0x8f, - 0x10, 0xa5, 0x05, 0xe3, 0x65, 0xf4, 0xee, 0x38, 0x01, 0xc9, 0x8e, 0xf5, 0x6b, 0x5a, 0x43, 0x8a, - 0x75, 0x16, 0xce, 0x6b, 0x94, 0x48, 0xef, 0xcd, 0x9b, 0xa4, 0xe0, 0x29, 0x7b, 0x0f, 0x02, 0x4b, - 0x08, 0x5b, 0x62, 0xa8, 0x5a, 0x43, 0x43, 0xec, 0xef, 0xe7, 0x98, 0xa3, 0x22, 0x44, 0x9b, 0x9b, - 0xe6, 0xf6, 0xbd, 0x14, 0x45, 0x89, 0x22, 0x4a, 0x98, 0x80, 0x7f, 0x33, 0x90, 0x57, 0xba, 0x1e, - 0xfc, 0xe8, 0x90, 0xdd, 0xd1, 0x46, 0x67, 0xac, 0x26, 0xd2, 0x87, 0xe4, 0x1a, 0xcb, 0xb2, 0x1a, - 0x84, 0x70, 0xed, 0x81, 0x3d, 0xbc, 0x11, 0xd3, 0xcb, 0xa5, 0xbf, 0xb7, 0x60, 0x65, 0xf1, 0x34, - 0x30, 0x85, 0x60, 0xdc, 0xb6, 0xd0, 0x6f, 0x36, 0x71, 0x79, 0xc5, 0x25, 0x67, 0xc5, 0x54, 0xb9, - 0x61, 0x49, 0x01, 0x53, 0x56, 0x62, 0x53, 0x49, 0xb7, 0x33, 0xe8, 0x0e, 0x77, 0x1f, 0xdf, 0x0d, - 0xb5, 0x83, 0x70, 0xe3, 0xa0, 0x35, 0x1b, 0x8e, 0x90, 0x57, 0xf1, 0xe4, 0x7c, 0xe9, 0x5b, 0x97, - 0x4b, 0xdf, 0xd7, 0xf2, 0x57, 0x09, 0x05, 0xdf, 0x7f, 0xf9, 0xc3, 0x9c, 0xcb, 0xb7, 0x4d, 0x12, - 0xa6, 0x58, 0x46, 0xe6, 0x47, 0xfa, 0x38, 0x12, 0xd9, 0x2c, 0x92, 0x8b, 0x39, 0x08, 0xa5, 0x29, - 0xc6, 0x07, 0x46, 0x66, 0xd4, 0xaa, 0x9c, 0x28, 0x11, 0x7a, 0x4a, 0x1c, 0x96, 0x4a, 0x8e, 0xd5, - 0x34, 0xc5, 0x72, 0x5e, 0x80, 0x84, 0xcc, 0xed, 0x0d, 0xba, 0xc3, 0xeb, 0xb1, 0x6f, 0x6c, 0x1c, - 0x9a, 0x5f, 0xfe, 0xd7, 0x15, 0x8c, 0x6f, 0x69, 0x68, 0xd4, 0x22, 0x0f, 0x3e, 0x91, 0x9d, 0x13, - 0x05, 0xd1, 0x03, 0x42, 0xf5, 0xed, 0xc5, 0xd6, 0x54, 0xc7, 0xa2, 0x2e, 0xd9, 0xd7, 0x78, 0xdc, - 0x2c, 0x26, 0x98, 0x72, 0x56, 0x9c, 0xe1, 0x0c, 0x2a, 0xc7, 0xa6, 0xb7, 0xc9, 0x4d, 0x5d, 0x79, - 0xc9, 0x2b, 0xf9, 0xea, 0xf9, 0x99, 0xd3, 0xa1, 0x7b, 0x84, 0x68, 0xe8, 0x35, 0x4a, 0x70, 0xba, - 0xf4, 0x90, 0xdc, 0xd1, 0xef, 0x67, 0x50, 0x40, 0xce, 0x24, 0x4c, 0x24, 0x9b, 0x81, 0xd3, 0xeb, - 0xf7, 0x3e, 0x7f, 0xf5, 0xac, 0xf8, 0xf4, 0x7c, 0xe5, 0xd9, 0x17, 0x2b, 0xcf, 0xfe, 0xbd, 0xf2, - 0xec, 0x2f, 0x6b, 0xcf, 0xba, 0x58, 0x7b, 0xd6, 0xcf, 0xb5, 0x67, 0xbd, 0x79, 0xb4, 0xb5, 0x25, - 0x9d, 0x99, 0x23, 0x13, 0x9a, 0xe8, 0x6f, 0xda, 0x3e, 0x98, 0xbc, 0xa9, 0x9d, 0x25, 0x3b, 0x2a, - 0x05, 0x4f, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x95, 0x86, 0xca, 0x8e, 0x02, 0x00, 0x00, + // 442 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xc1, 0x6e, 0xd3, 0x30, + 0x18, 0x4e, 0xda, 0x6a, 0x80, 0x07, 0x23, 0x18, 0xb4, 0x95, 0x1e, 0x9c, 0x2a, 0xe2, 0x50, 0x10, + 0xb3, 0x35, 0x7a, 0xe3, 0xb6, 0x14, 0x21, 0x81, 0x34, 0x0e, 0x1d, 0xe2, 0xc0, 0xa5, 0x72, 0x92, + 0x5f, 0xc1, 0x5a, 0x12, 0x47, 0xb1, 0x3b, 0x18, 0x4f, 0xc0, 0x91, 0x77, 0xe0, 0x82, 0x38, 0xf2, + 0x14, 0x3b, 0xee, 0xc8, 0xa9, 0xa0, 0xf6, 0x0d, 0xf6, 0x04, 0x28, 0xb6, 0x03, 0x13, 0x12, 0x27, + 0xdb, 0x9f, 0xff, 0xef, 0xfb, 0xbf, 0xff, 0xd7, 0x87, 0x1e, 0x2a, 0xcd, 0x9b, 0x9c, 0x7f, 0x04, + 0x96, 0x16, 0x5c, 0x94, 0xec, 0xf4, 0x20, 0x01, 0xcd, 0x0f, 0xec, 0x6b, 0xd1, 0x40, 0x2a, 0x9b, + 0x8c, 0xd6, 0x8d, 0xd4, 0x12, 0x3f, 0xa8, 0x97, 0x49, 0x21, 0x52, 0xfe, 0x1e, 0x94, 0x2c, 0x81, + 0x76, 0x44, 0x6a, 0x4a, 0xa9, 0x23, 0x8e, 0xee, 0xe5, 0x32, 0x97, 0x86, 0xc0, 0xda, 0x9b, 0xe5, + 0x8e, 0x48, 0x2a, 0x55, 0x29, 0x15, 0x4b, 0xb8, 0x82, 0xbf, 0x3d, 0xa4, 0xa8, 0xec, 0x7f, 0xf4, + 0xbd, 0x87, 0xb6, 0x67, 0xad, 0xce, 0xdc, 0x74, 0xc4, 0x8f, 0xd1, 0x35, 0x9e, 0x65, 0x0d, 0x28, + 0x35, 0xf4, 0xc7, 0xfe, 0xe4, 0x46, 0x8c, 0x2f, 0x57, 0xe1, 0xce, 0x19, 0x2f, 0x8b, 0xa7, 0x91, + 0xfb, 0x88, 0xe6, 0x5d, 0x09, 0xfe, 0xea, 0xa3, 0xa1, 0xa8, 0x84, 0x16, 0xbc, 0x58, 0x18, 0x37, + 0x3c, 0x29, 0x60, 0xc1, 0x4b, 0xb9, 0xac, 0xf4, 0xb0, 0x37, 0xee, 0x4f, 0xb6, 0x9f, 0xdc, 0xa7, + 0xd6, 0x01, 0x6d, 0x1d, 0x74, 0x66, 0xe9, 0x4c, 0x8a, 0x2a, 0x3e, 0x3e, 0x5f, 0x85, 0xde, 0xe5, + 0x2a, 0x0c, 0xad, 0xfc, 0xff, 0x84, 0xa2, 0x6f, 0x3f, 0xc3, 0x49, 0x2e, 0xf4, 0xbb, 0x65, 0x42, + 0x53, 0x59, 0x32, 0x37, 0x91, 0x3d, 0xf6, 0x55, 0x76, 0xc2, 0xf4, 0x59, 0x0d, 0xca, 0x68, 0xaa, + 0xf9, 0xae, 0x93, 0x99, 0x75, 0x2a, 0x87, 0x46, 0x04, 0xbf, 0x44, 0x01, 0x4f, 0xb5, 0x90, 0xd5, + 0x22, 0x95, 0x65, 0x5d, 0x80, 0x86, 0x6c, 0x38, 0x18, 0xf7, 0x27, 0xd7, 0xe3, 0xd0, 0xd9, 0xd8, + 0x73, 0x53, 0xfe, 0x53, 0x15, 0xcd, 0x6f, 0x5b, 0x68, 0xd6, 0x21, 0x8f, 0x34, 0xda, 0x3a, 0x34, + 0x10, 0xde, 0x45, 0xd8, 0xde, 0x5e, 0x5c, 0xe9, 0x1a, 0x78, 0x38, 0x40, 0x37, 0x2d, 0x1e, 0x8b, + 0xec, 0xd5, 0xf3, 0xd7, 0x81, 0x8f, 0xef, 0xa0, 0x5b, 0x16, 0x39, 0x12, 0x95, 0x6e, 0xa1, 0x1e, + 0xde, 0x41, 0xc8, 0x42, 0x6f, 0xa4, 0x86, 0xa0, 0x8f, 0xf7, 0xd0, 0x5d, 0xfb, 0x7e, 0x06, 0x05, + 0xe4, 0x5c, 0xc3, 0xb1, 0xe6, 0x27, 0x10, 0x0c, 0x46, 0x83, 0x4f, 0x5f, 0x88, 0x17, 0x1f, 0x9d, + 0xaf, 0x89, 0x7f, 0xb1, 0x26, 0xfe, 0xaf, 0x35, 0xf1, 0x3f, 0x6f, 0x88, 0x77, 0xb1, 0x21, 0xde, + 0x8f, 0x0d, 0xf1, 0xde, 0x4e, 0xaf, 0x6c, 0xc7, 0x66, 0x65, 0xdf, 0x85, 0x85, 0xfd, 0x49, 0xd9, + 0xe9, 0x94, 0x7d, 0x70, 0x51, 0x33, 0xeb, 0x4a, 0xb6, 0x4c, 0x00, 0xa6, 0xbf, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x2c, 0x75, 0x94, 0x64, 0x89, 0x02, 0x00, 0x00, } func (m *ClaimRecord) Marshal() (dAtA []byte, err error) { diff --git a/x/claim/types/codec.go b/x/claim/types/codec.go index 069b09eda..f92e70f35 100644 --- a/x/claim/types/codec.go +++ b/x/claim/types/codec.go @@ -10,23 +10,22 @@ import ( func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgInitialClaim{}, "claim/InitialClaim", nil) + cdc.RegisterConcrete(&MsgClaimFor{}, "claim/ClaimFor", nil) // this line is used by starport scaffolding # 2 } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgInitialClaim{}, + &MsgClaimFor{}, ) - // this line is used by starport scaffolding # 3 - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + // this line is used by starport scaffolding # 3 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( amino = codec.NewLegacyAmino() - // ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) ModuleCdc = codec.NewAminoCodec(amino) ) diff --git a/x/claim/types/errors.go b/x/claim/types/errors.go index 69610af07..48aa222d4 100644 --- a/x/claim/types/errors.go +++ b/x/claim/types/errors.go @@ -10,4 +10,5 @@ import ( var ( ErrAirdropNotEnabled = sdkerrors.Register(ModuleName, 2, "airdrop not enabled") ErrIncorrectModuleAccountBalance = sdkerrors.Register(ModuleName, 3, "claim module account balance != sum of all claim record InitialClaimableAmounts") + ErrUnauthorizedClaimer = sdkerrors.Register(ModuleName, 4, "address is not allowed to claim") ) diff --git a/x/claim/types/genesis.pb.go b/x/claim/types/genesis.pb.go index 616c5b095..56a5b81c1 100644 --- a/x/claim/types/genesis.pb.go +++ b/x/claim/types/genesis.pb.go @@ -98,30 +98,30 @@ func init() { } var fileDescriptor_cac1d615666a45cf = []byte{ - // 364 bytes of a gzipped FileDescriptorProto + // 366 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xc1, 0x4e, 0xea, 0x40, 0x14, 0x86, 0x5b, 0x48, 0x58, 0x14, 0xd8, 0x34, 0xdc, 0x1b, 0x2e, 0xb9, 0x0e, 0xa4, 0x62, 0x82, - 0x89, 0xce, 0x08, 0xee, 0xdc, 0x59, 0x16, 0x26, 0xae, 0x4c, 0xdd, 0xe9, 0x82, 0x4c, 0x87, 0x49, - 0x6d, 0xd2, 0xe9, 0x34, 0x9d, 0x29, 0x8a, 0x4f, 0xe1, 0x63, 0xb1, 0x64, 0xa9, 0x1b, 0x62, 0xe0, - 0x0d, 0x7c, 0x02, 0xc3, 0xcc, 0x80, 0x9a, 0x48, 0xc2, 0xae, 0x73, 0xce, 0xf9, 0xff, 0xff, 0xeb, - 0x39, 0x4e, 0x57, 0x48, 0x9c, 0x47, 0xf8, 0x99, 0x22, 0x92, 0xe0, 0x98, 0xa1, 0x49, 0x3f, 0xa4, - 0x12, 0xf7, 0x51, 0x44, 0x53, 0x2a, 0x62, 0x01, 0xb3, 0x9c, 0x4b, 0xee, 0x76, 0xb3, 0x22, 0x4c, - 0x62, 0x82, 0x1f, 0xa9, 0xe0, 0x8c, 0xc2, 0x8d, 0x06, 0x2a, 0x0d, 0x34, 0x9a, 0x56, 0x23, 0xe2, - 0x11, 0x57, 0x02, 0xb4, 0xfe, 0xd2, 0xda, 0x16, 0x20, 0x5c, 0x30, 0x2e, 0x50, 0x88, 0x05, 0xdd, - 0xda, 0x13, 0x1e, 0xa7, 0xa6, 0x7f, 0xbc, 0x83, 0x40, 0xbd, 0x46, 0x39, 0x25, 0x3c, 0x1f, 0x9b, - 0xd1, 0xc3, 0x1d, 0xa3, 0x19, 0xce, 0x31, 0x33, 0xac, 0xde, 0x5b, 0xc9, 0xa9, 0x5d, 0x69, 0xfa, - 0x5b, 0x89, 0x25, 0x75, 0x27, 0xce, 0x5f, 0xc6, 0xc7, 0x45, 0x42, 0x47, 0x98, 0x10, 0x5e, 0xa4, - 0x72, 0x14, 0xe2, 0x04, 0xa7, 0x84, 0x36, 0xed, 0x8e, 0xdd, 0xab, 0x0e, 0xfe, 0x41, 0x4d, 0x08, - 0xd7, 0x84, 0x9b, 0x9f, 0x81, 0x43, 0x1e, 0xa7, 0xfe, 0xd1, 0x6c, 0xd1, 0xb6, 0x3e, 0x16, 0xed, - 0x83, 0x29, 0x66, 0xc9, 0x85, 0xf7, 0xbb, 0x8d, 0x17, 0x34, 0x74, 0xe3, 0x52, 0xd7, 0x7d, 0x5d, - 0x76, 0xef, 0x9d, 0x8a, 0x06, 0x6b, 0x96, 0x54, 0xce, 0x09, 0xdc, 0x67, 0x8b, 0xf0, 0x46, 0x69, - 0xfc, 0x3f, 0x26, 0xba, 0xae, 0xa3, 0xb5, 0x93, 0x17, 0x18, 0x4b, 0x57, 0x3a, 0xf5, 0xef, 0x0b, - 0x12, 0xcd, 0x72, 0xa7, 0xdc, 0xab, 0x0e, 0xfa, 0xfb, 0x65, 0x0c, 0xd7, 0xaf, 0x40, 0x29, 0xfd, - 0xff, 0x26, 0xa8, 0xa1, 0x83, 0x7e, 0xb8, 0x7a, 0x41, 0x8d, 0x7c, 0x8d, 0x0a, 0xff, 0x7a, 0xb6, - 0x04, 0xf6, 0x7c, 0x09, 0xec, 0xf7, 0x25, 0xb0, 0x5f, 0x56, 0xc0, 0x9a, 0xaf, 0x80, 0xf5, 0xba, - 0x02, 0xd6, 0xdd, 0x59, 0x14, 0xcb, 0x87, 0x22, 0x84, 0x84, 0x33, 0xa4, 0x11, 0x4e, 0x0d, 0x03, - 0xda, 0x1e, 0xed, 0xc9, 0x9c, 0x4d, 0x4e, 0x33, 0x2a, 0xc2, 0x8a, 0x3a, 0xd7, 0xf9, 0x67, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xcc, 0x74, 0x9b, 0x0a, 0x82, 0x02, 0x00, 0x00, + 0x89, 0xce, 0x04, 0xd8, 0xb9, 0xb3, 0x2c, 0x5c, 0x99, 0x98, 0xba, 0xd3, 0x05, 0x99, 0x0e, 0x93, + 0xda, 0xa4, 0xd3, 0x69, 0x3a, 0x53, 0x14, 0x9f, 0xc2, 0xc7, 0x62, 0xc9, 0x52, 0x37, 0xc4, 0xc0, + 0x1b, 0xf8, 0x04, 0x86, 0x99, 0x01, 0x35, 0x91, 0x84, 0x5d, 0xe7, 0x9c, 0xf3, 0xff, 0xff, 0xd7, + 0x73, 0x9c, 0xae, 0x90, 0x38, 0x8f, 0xf0, 0x33, 0x45, 0x24, 0xc1, 0x31, 0x43, 0xd3, 0x7e, 0x48, + 0x25, 0xee, 0xa3, 0x88, 0xa6, 0x54, 0xc4, 0x02, 0x66, 0x39, 0x97, 0xdc, 0xed, 0x66, 0x45, 0x98, + 0xc4, 0x04, 0x3f, 0x52, 0xc1, 0x19, 0x85, 0x5b, 0x0d, 0x54, 0x1a, 0x68, 0x34, 0xad, 0x46, 0xc4, + 0x23, 0xae, 0x04, 0x68, 0xf3, 0xa5, 0xb5, 0x2d, 0x40, 0xb8, 0x60, 0x5c, 0xa0, 0x10, 0x0b, 0xba, + 0xb3, 0x27, 0x3c, 0x4e, 0x4d, 0xff, 0x74, 0x0f, 0x81, 0x7a, 0x8d, 0x73, 0x4a, 0x78, 0x3e, 0x31, + 0xa3, 0xc7, 0x7b, 0x46, 0x33, 0x9c, 0x63, 0x66, 0x58, 0xbd, 0xb7, 0x92, 0x53, 0xbb, 0xd2, 0xf4, + 0xb7, 0x12, 0x4b, 0xea, 0x4e, 0x9d, 0xbf, 0x8c, 0x4f, 0x8a, 0x84, 0x8e, 0x31, 0x21, 0xbc, 0x48, + 0xe5, 0x38, 0xc4, 0x09, 0x4e, 0x09, 0x6d, 0xda, 0x1d, 0xbb, 0x57, 0x1d, 0xfc, 0x83, 0x9a, 0x10, + 0x6e, 0x08, 0xb7, 0x3f, 0x03, 0x47, 0x3c, 0x4e, 0xfd, 0x93, 0xf9, 0xb2, 0x6d, 0x7d, 0x2c, 0xdb, + 0x47, 0x33, 0xcc, 0x92, 0x0b, 0xef, 0x77, 0x1b, 0x2f, 0x68, 0xe8, 0xc6, 0xa5, 0xae, 0xfb, 0xba, + 0xec, 0xde, 0x3b, 0x15, 0x0d, 0xd6, 0x2c, 0xa9, 0x9c, 0x33, 0x78, 0xc8, 0x16, 0xe1, 0x8d, 0xd2, + 0xf8, 0x7f, 0x4c, 0x74, 0x5d, 0x47, 0x6b, 0x27, 0x2f, 0x30, 0x96, 0xae, 0x74, 0xea, 0xdf, 0x17, + 0x24, 0x9a, 0xe5, 0x4e, 0xb9, 0x57, 0x1d, 0xf4, 0x0f, 0xcb, 0x18, 0x6d, 0x5e, 0x81, 0x52, 0xfa, + 0xff, 0x4d, 0x50, 0x43, 0x07, 0xfd, 0x70, 0xf5, 0x82, 0x1a, 0xf9, 0x1a, 0x15, 0xfe, 0xf5, 0x7c, + 0x05, 0xec, 0xc5, 0x0a, 0xd8, 0xef, 0x2b, 0x60, 0xbf, 0xac, 0x81, 0xb5, 0x58, 0x03, 0xeb, 0x75, + 0x0d, 0xac, 0xbb, 0x61, 0x14, 0xcb, 0x87, 0x22, 0x84, 0x84, 0x33, 0xa4, 0x11, 0xce, 0x0d, 0x03, + 0xda, 0x1d, 0x6d, 0x3a, 0x44, 0x4f, 0xe6, 0x72, 0x72, 0x96, 0x51, 0x11, 0x56, 0xd4, 0xc5, 0x86, + 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x95, 0xc8, 0xcd, 0xc3, 0x85, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/claim/types/message_claim_for.go b/x/claim/types/message_claim_for.go new file mode 100644 index 000000000..5657dc3e6 --- /dev/null +++ b/x/claim/types/message_claim_for.go @@ -0,0 +1,50 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgClaimFor{} + +// msg types +const ( + TypeMsgClaimFor = "claim_for" +) + +func NewMsgClaimFor(sender string, address string, action Action) *MsgClaimFor { + return &MsgClaimFor{ + Sender: sender, + Address: address, + Action: action, + } +} + +func (msg *MsgClaimFor) Route() string { + return RouterKey +} + +func (msg *MsgClaimFor) Type() string { + return TypeMsgClaimFor +} + +func (msg *MsgClaimFor) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +func (msg *MsgClaimFor) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgClaimFor) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + return nil +} diff --git a/x/claim/types/message_claim_for_test.go b/x/claim/types/message_claim_for_test.go new file mode 100644 index 000000000..3cc99130b --- /dev/null +++ b/x/claim/types/message_claim_for_test.go @@ -0,0 +1,40 @@ +package types + +import ( + "testing" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/public-awesome/stargaze/v3/testutil/sample" + "github.com/stretchr/testify/require" +) + +func TestMsgClaimFor_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgClaimFor + err error + }{ + { + name: "invalid address", + msg: MsgClaimFor{ + Sender: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgClaimFor{ + Sender: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/claim/types/params.pb.go b/x/claim/types/params.pb.go index 070647906..5007cb500 100644 --- a/x/claim/types/params.pb.go +++ b/x/claim/types/params.pb.go @@ -176,43 +176,43 @@ func init() { } var fileDescriptor_c219c2c72539a013 = []byte{ - // 571 bytes of a gzipped FileDescriptorProto + // 574 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xbf, 0x6e, 0xd3, 0x50, - 0x14, 0xc6, 0x63, 0xda, 0x46, 0x70, 0x23, 0x9a, 0xd4, 0xaa, 0x84, 0x9b, 0x48, 0x76, 0x64, 0x40, - 0x04, 0xa9, 0xd8, 0x34, 0x5d, 0x50, 0xb7, 0x38, 0x01, 0x09, 0x16, 0x90, 0x01, 0x21, 0xb1, 0x58, - 0xd7, 0xf6, 0x8d, 0x6b, 0xc9, 0xce, 0xb5, 0xae, 0xaf, 0x29, 0xe9, 0x23, 0x74, 0xea, 0x84, 0x32, - 0xf2, 0x12, 0xbc, 0x43, 0xc7, 0x8e, 0x4c, 0x06, 0x25, 0x1b, 0x63, 0x9e, 0x00, 0xdd, 0x3f, 0x2e, - 0x22, 0x29, 0xa2, 0x5b, 0xfc, 0x9d, 0xf3, 0x9d, 0xf3, 0xcb, 0xe7, 0x63, 0x70, 0x3f, 0xa7, 0x90, - 0x44, 0xf0, 0x14, 0xd9, 0x41, 0x02, 0xe3, 0xd4, 0xfe, 0x74, 0xe0, 0x23, 0x0a, 0x0f, 0xec, 0x0c, - 0x12, 0x98, 0xe6, 0x56, 0x46, 0x30, 0xc5, 0xea, 0x83, 0xac, 0xf0, 0x93, 0x38, 0x80, 0x27, 0x28, - 0xc7, 0x29, 0xb2, 0x2a, 0x8b, 0xc5, 0x2d, 0x96, 0xb4, 0xb4, 0x77, 0x23, 0x1c, 0x61, 0x6e, 0xb0, - 0xd9, 0x2f, 0xe1, 0x6d, 0xeb, 0x11, 0xc6, 0x51, 0x82, 0x6c, 0xfe, 0xe4, 0x17, 0x63, 0x3b, 0x2c, - 0x08, 0xa4, 0x31, 0x9e, 0xc8, 0xba, 0xb1, 0x5a, 0xa7, 0x71, 0x8a, 0x72, 0x0a, 0xd3, 0x4c, 0x36, - 0x3c, 0xfe, 0x07, 0x21, 0x7f, 0xf2, 0x08, 0x0a, 0x30, 0x09, 0x45, 0xab, 0xf9, 0x4d, 0x01, 0xea, - 0x90, 0xc9, 0x83, 0x82, 0x1e, 0x63, 0x12, 0x9f, 0xf2, 0x45, 0xea, 0x0b, 0xd0, 0x0a, 0xf0, 0x84, - 0x12, 0x18, 0x50, 0x0f, 0x86, 0x21, 0x41, 0x79, 0xae, 0x29, 0x5d, 0xa5, 0x77, 0xc7, 0xe9, 0x2c, - 0x4b, 0xe3, 0xde, 0x14, 0xa6, 0xc9, 0x91, 0xb9, 0xda, 0x61, 0xba, 0xcd, 0x4a, 0x1a, 0x08, 0x45, - 0xfd, 0x00, 0xea, 0x30, 0x60, 0x13, 0xb5, 0x5b, 0x5d, 0xa5, 0xb7, 0xdd, 0xdf, 0xb7, 0x6e, 0x92, - 0x8b, 0x35, 0xe0, 0x1e, 0x67, 0x67, 0x59, 0x1a, 0x77, 0xc5, 0x2e, 0x31, 0xc5, 0x74, 0xe5, 0x38, - 0xf3, 0x6c, 0x0b, 0xd4, 0xdf, 0xf0, 0xc0, 0xd5, 0x47, 0xa0, 0x09, 0x63, 0x12, 0x12, 0x9c, 0x79, - 0x68, 0x02, 0xfd, 0x04, 0x85, 0x1c, 0xf5, 0xb6, 0xbb, 0x2d, 0xe5, 0xe7, 0x42, 0x55, 0x31, 0x50, - 0xab, 0x46, 0xb6, 0x97, 0x7a, 0x2c, 0x37, 0x0e, 0xd6, 0xe8, 0xb7, 0x2d, 0x11, 0xaa, 0x55, 0x85, - 0x6a, 0xbd, 0xab, 0x42, 0x75, 0x1e, 0x5e, 0x94, 0x46, 0x6d, 0x59, 0x1a, 0x7b, 0x12, 0x65, 0x6d, - 0x86, 0x79, 0xfe, 0xc3, 0x50, 0xdc, 0x96, 0x2c, 0xbc, 0x65, 0x3a, 0x73, 0xab, 0x5f, 0x14, 0xb0, - 0x5b, 0xbd, 0x3b, 0xaf, 0x98, 0xd0, 0x38, 0xf1, 0x42, 0x14, 0xc0, 0xa9, 0xb6, 0xc1, 0x77, 0xee, - 0xad, 0xed, 0x1c, 0xc9, 0x66, 0xe7, 0x25, 0x5b, 0xf9, 0xab, 0x34, 0xf4, 0xeb, 0xec, 0xfb, 0x38, - 0x8d, 0x29, 0x4a, 0x33, 0x3a, 0x5d, 0x96, 0x46, 0x47, 0x40, 0x5d, 0xd7, 0x67, 0xce, 0x18, 0x96, - 0x5a, 0x95, 0xde, 0xb3, 0xca, 0x88, 0x15, 0xd4, 0x33, 0x05, 0xec, 0x5c, 0x39, 0xf0, 0x58, 0x52, - 0x6d, 0xfe, 0x8f, 0x6a, 0x28, 0xa9, 0x3a, 0x6b, 0xde, 0xbf, 0x90, 0xb4, 0x15, 0xa4, 0xaa, 0x49, - 0xf0, 0x34, 0x2b, 0xfd, 0xf5, 0x58, 0xc0, 0x18, 0xa0, 0x21, 0x0e, 0x33, 0x44, 0x13, 0x9c, 0x6a, - 0x5b, 0xec, 0xcc, 0x5c, 0xc0, 0xa5, 0x11, 0x53, 0xd4, 0x99, 0x02, 0x5a, 0x30, 0x49, 0xf0, 0x09, - 0x0a, 0x3d, 0x2e, 0x23, 0x92, 0x6b, 0xf5, 0xee, 0x46, 0xaf, 0xd1, 0x7f, 0x76, 0xb3, 0x7b, 0x5a, - 0xbf, 0x70, 0xe7, 0x50, 0xfe, 0x97, 0xb5, 0xc9, 0x7f, 0xee, 0x7b, 0xb5, 0x62, 0xba, 0x4d, 0x29, - 0x0d, 0xa5, 0x72, 0xb4, 0x39, 0xfb, 0x6a, 0xd4, 0x9c, 0x57, 0x17, 0x73, 0x5d, 0xb9, 0x9c, 0xeb, - 0xca, 0xcf, 0xb9, 0xae, 0x9c, 0x2f, 0xf4, 0xda, 0xe5, 0x42, 0xaf, 0x7d, 0x5f, 0xe8, 0xb5, 0x8f, - 0x4f, 0xa3, 0x98, 0x1e, 0x17, 0xbe, 0x15, 0xe0, 0xd4, 0x16, 0xa4, 0x4f, 0x24, 0xaa, 0x7d, 0xf5, - 0x8d, 0x7e, 0x96, 0x5f, 0x29, 0x9d, 0x66, 0x28, 0xf7, 0xeb, 0x3c, 0xf6, 0xc3, 0xdf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xf1, 0x4e, 0xdb, 0xe4, 0x66, 0x04, 0x00, 0x00, + 0x14, 0xc6, 0x63, 0xda, 0x46, 0x70, 0x2b, 0x9a, 0xd4, 0xaa, 0x84, 0x9b, 0x48, 0x76, 0x64, 0x40, + 0x04, 0xa9, 0xd8, 0x6a, 0xb2, 0xa0, 0x6e, 0x71, 0x02, 0x12, 0x03, 0x02, 0x19, 0x10, 0x12, 0x8b, + 0x75, 0x6d, 0xdf, 0xb8, 0x96, 0xec, 0x5c, 0xeb, 0xfa, 0xba, 0x25, 0x7d, 0x84, 0x4e, 0x9d, 0x50, + 0x46, 0x5e, 0x82, 0x77, 0xe8, 0xd8, 0x91, 0xc9, 0xa0, 0x64, 0x63, 0xcc, 0x13, 0xa0, 0xfb, 0xc7, + 0x45, 0x24, 0x45, 0x74, 0x8b, 0xbf, 0x73, 0xbe, 0x73, 0x7e, 0xf9, 0x7c, 0x0c, 0x1e, 0xe6, 0x14, + 0x92, 0x08, 0x9e, 0x21, 0x3b, 0x48, 0x60, 0x9c, 0xda, 0x27, 0x87, 0x3e, 0xa2, 0xf0, 0xd0, 0xce, + 0x20, 0x81, 0x69, 0x6e, 0x65, 0x04, 0x53, 0xac, 0x3e, 0xca, 0x0a, 0x3f, 0x89, 0x03, 0x78, 0x8a, + 0x72, 0x9c, 0x22, 0xab, 0xb2, 0x58, 0xdc, 0x62, 0x49, 0x4b, 0x6b, 0x2f, 0xc2, 0x11, 0xe6, 0x06, + 0x9b, 0xfd, 0x12, 0xde, 0x96, 0x1e, 0x61, 0x1c, 0x25, 0xc8, 0xe6, 0x4f, 0x7e, 0x31, 0xb6, 0xc3, + 0x82, 0x40, 0x1a, 0xe3, 0x89, 0xac, 0x1b, 0xab, 0x75, 0x1a, 0xa7, 0x28, 0xa7, 0x30, 0xcd, 0x64, + 0xc3, 0xd3, 0x7f, 0x10, 0xf2, 0x27, 0x8f, 0xa0, 0x00, 0x93, 0x50, 0xb4, 0x9a, 0xdf, 0x14, 0xa0, + 0x0e, 0x99, 0x3c, 0x28, 0xe8, 0x31, 0x26, 0xf1, 0x19, 0x5f, 0xa4, 0xbe, 0x04, 0xcd, 0x00, 0x4f, + 0x28, 0x81, 0x01, 0xf5, 0x60, 0x18, 0x12, 0x94, 0xe7, 0x9a, 0xd2, 0x51, 0xba, 0xf7, 0x9c, 0xf6, + 0xb2, 0x34, 0x1e, 0x4c, 0x61, 0x9a, 0x1c, 0x99, 0xab, 0x1d, 0xa6, 0xdb, 0xa8, 0xa4, 0x81, 0x50, + 0xd4, 0x8f, 0xa0, 0x0e, 0x03, 0x36, 0x51, 0xbb, 0xd3, 0x51, 0xba, 0x3b, 0xbd, 0x03, 0xeb, 0x36, + 0xb9, 0x58, 0x03, 0xee, 0x71, 0x76, 0x97, 0xa5, 0x71, 0x5f, 0xec, 0x12, 0x53, 0x4c, 0x57, 0x8e, + 0x33, 0xcf, 0xb7, 0x40, 0xfd, 0x2d, 0x0f, 0x5c, 0x7d, 0x02, 0x1a, 0x30, 0x26, 0x21, 0xc1, 0x99, + 0x87, 0x26, 0xd0, 0x4f, 0x50, 0xc8, 0x51, 0xef, 0xba, 0x3b, 0x52, 0x7e, 0x21, 0x54, 0x15, 0x03, + 0xb5, 0x6a, 0x64, 0x7b, 0xa9, 0xc7, 0x72, 0xe3, 0x60, 0xdb, 0xbd, 0x96, 0x25, 0x42, 0xb5, 0xaa, + 0x50, 0xad, 0xf7, 0x55, 0xa8, 0xce, 0xe3, 0xcb, 0xd2, 0xa8, 0x2d, 0x4b, 0x63, 0x5f, 0xa2, 0xac, + 0xcd, 0x30, 0x2f, 0x7e, 0x18, 0x8a, 0xdb, 0x94, 0x85, 0x77, 0x4c, 0x67, 0x6e, 0xf5, 0x8b, 0x02, + 0xf6, 0xaa, 0x77, 0xe7, 0x15, 0x13, 0x1a, 0x27, 0x5e, 0x88, 0x02, 0x38, 0xd5, 0x36, 0xf8, 0xce, + 0xfd, 0xb5, 0x9d, 0x23, 0xd9, 0xec, 0xbc, 0x62, 0x2b, 0x7f, 0x95, 0x86, 0x7e, 0x93, 0xfd, 0x00, + 0xa7, 0x31, 0x45, 0x69, 0x46, 0xa7, 0xcb, 0xd2, 0x68, 0x0b, 0xa8, 0x9b, 0xfa, 0xcc, 0x19, 0xc3, + 0x52, 0xab, 0xd2, 0x07, 0x56, 0x19, 0xb1, 0x82, 0x7a, 0xae, 0x80, 0xdd, 0x6b, 0x07, 0x1e, 0x4b, + 0xaa, 0xcd, 0xff, 0x51, 0x0d, 0x25, 0x55, 0x7b, 0xcd, 0xfb, 0x17, 0x92, 0xb6, 0x82, 0x54, 0x35, + 0x09, 0x9e, 0x46, 0xa5, 0xbf, 0x19, 0x0b, 0x18, 0x03, 0x6c, 0x8b, 0xc3, 0x0c, 0xd1, 0x04, 0xa7, + 0xda, 0x16, 0x3b, 0x33, 0x17, 0x70, 0x69, 0xc4, 0x14, 0x75, 0xa6, 0x80, 0x26, 0x4c, 0x12, 0x7c, + 0x8a, 0x42, 0x8f, 0xcb, 0x88, 0xe4, 0x5a, 0xbd, 0xb3, 0xd1, 0xdd, 0xee, 0x3d, 0xbf, 0xdd, 0x3d, + 0xad, 0x5f, 0xb8, 0xd3, 0x97, 0xff, 0x65, 0x6d, 0xf2, 0x9f, 0xfb, 0x5e, 0xad, 0x98, 0x6e, 0x43, + 0x4a, 0x43, 0xa9, 0x1c, 0x6d, 0xce, 0xbe, 0x1a, 0x35, 0xe7, 0xf5, 0xe5, 0x5c, 0x57, 0xae, 0xe6, + 0xba, 0xf2, 0x73, 0xae, 0x2b, 0x17, 0x0b, 0xbd, 0x76, 0xb5, 0xd0, 0x6b, 0xdf, 0x17, 0x7a, 0xed, + 0x53, 0x3f, 0x8a, 0xe9, 0x71, 0xe1, 0x5b, 0x01, 0x4e, 0x6d, 0x41, 0xfa, 0x4c, 0xa2, 0xda, 0xd7, + 0xdf, 0xe8, 0x49, 0xdf, 0xfe, 0x2c, 0x3f, 0x54, 0x3a, 0xcd, 0x50, 0xee, 0xd7, 0x79, 0xf2, 0xfd, + 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x51, 0x21, 0x0b, 0xbc, 0x69, 0x04, 0x00, 0x00, } func (m *ClaimAuthorization) Marshal() (dAtA []byte, err error) { diff --git a/x/claim/types/query.pb.go b/x/claim/types/query.pb.go index 242f10a65..9e5b03806 100644 --- a/x/claim/types/query.pb.go +++ b/x/claim/types/query.pb.go @@ -487,55 +487,55 @@ func init() { } var fileDescriptor_b21e213c864ce5ea = []byte{ - // 759 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x96, 0x41, 0x6b, 0x13, 0x41, - 0x18, 0x86, 0x33, 0xd5, 0x46, 0x9d, 0xd4, 0x82, 0xd3, 0x80, 0x71, 0x2b, 0x9b, 0x38, 0x8a, 0x44, - 0x6c, 0x77, 0x9b, 0x16, 0xc4, 0x0a, 0x6a, 0x93, 0x6a, 0x0b, 0x05, 0x41, 0x83, 0x20, 0x78, 0x09, - 0xb3, 0x9b, 0x31, 0x2e, 0xee, 0xee, 0xa4, 0x3b, 0x1b, 0xb5, 0x96, 0x5e, 0xbc, 0x8b, 0x05, 0x3d, - 0xf8, 0x07, 0x44, 0xf0, 0xee, 0x3f, 0xf0, 0xd0, 0x63, 0xc1, 0x8b, 0xa7, 0x54, 0x5a, 0x4f, 0x1e, - 0xfb, 0x0b, 0x64, 0x67, 0x26, 0xc9, 0xd6, 0x26, 0x35, 0x69, 0x41, 0x4f, 0x49, 0x76, 0xe7, 0x7b, - 0xbf, 0xf7, 0xf9, 0x66, 0xe6, 0x25, 0x10, 0xf3, 0x90, 0x04, 0x35, 0xf2, 0x8a, 0x9a, 0xb6, 0x4b, - 0x1c, 0xcf, 0x7c, 0x5e, 0xb0, 0x68, 0x48, 0x0a, 0xe6, 0x72, 0x83, 0x06, 0x2b, 0x46, 0x3d, 0x60, - 0x21, 0x43, 0x97, 0xea, 0x0d, 0xcb, 0x75, 0x6c, 0xf2, 0x82, 0x72, 0xe6, 0x51, 0xa3, 0x55, 0x61, - 0x88, 0x0a, 0x43, 0x55, 0x68, 0xe9, 0x1a, 0xab, 0x31, 0x51, 0x60, 0x46, 0xdf, 0x64, 0xad, 0x76, - 0xbe, 0xc6, 0x58, 0xcd, 0xa5, 0x26, 0xa9, 0x3b, 0x26, 0xf1, 0x7d, 0x16, 0x92, 0xd0, 0x61, 0x3e, - 0x57, 0x6f, 0x75, 0x9b, 0x71, 0x8f, 0x71, 0xd3, 0x22, 0x9c, 0xb6, 0x5b, 0xdb, 0xcc, 0xf1, 0xd5, - 0xfb, 0x2b, 0x3d, 0xdc, 0x89, 0x5f, 0x95, 0x80, 0xda, 0x2c, 0xa8, 0xaa, 0xa5, 0x17, 0x7b, 0x2c, - 0xad, 0x93, 0x80, 0x78, 0xaa, 0x1f, 0xc6, 0x30, 0xf7, 0x20, 0x02, 0xbb, 0xc7, 0xaa, 0x0d, 0x97, - 0x16, 0x6d, 0x9b, 0x35, 0xfc, 0xb0, 0x44, 0x5c, 0xe2, 0xdb, 0xb4, 0x4c, 0x97, 0x1b, 0x94, 0x87, - 0xf8, 0x0b, 0x80, 0x17, 0x0e, 0x58, 0xc4, 0xeb, 0xcc, 0xe7, 0x14, 0xbd, 0x05, 0x30, 0xed, 0x75, - 0x59, 0x90, 0x01, 0xb9, 0x63, 0xf9, 0xd4, 0xf4, 0x39, 0x43, 0x92, 0x19, 0x11, 0x59, 0x6b, 0x44, - 0xc6, 0x3c, 0x73, 0xfc, 0xd2, 0xdc, 0x46, 0x33, 0x9b, 0xd8, 0x6d, 0x66, 0x47, 0x56, 0x88, 0xe7, - 0xde, 0xc0, 0x11, 0x2d, 0xc7, 0x9f, 0xb7, 0xb2, 0xf9, 0x9a, 0x13, 0x3e, 0x6d, 0x58, 0x86, 0xcd, - 0x3c, 0x53, 0x8d, 0x45, 0x7e, 0x4c, 0xf2, 0xea, 0x33, 0x33, 0x5c, 0xa9, 0x53, 0x2e, 0x04, 0x78, - 0xb9, 0x6b, 0x63, 0x9c, 0x86, 0x48, 0xd8, 0xbe, 0x2f, 0x80, 0x5b, 0x34, 0x04, 0x8e, 0xed, 0x79, - 0xaa, 0xec, 0x2f, 0xc1, 0xa4, 0x1c, 0x4c, 0x06, 0xe4, 0x40, 0x3e, 0x35, 0x3d, 0x61, 0xf4, 0xb3, - 0xc7, 0x86, 0x54, 0x29, 0x1d, 0x8f, 0x10, 0xca, 0x4a, 0x01, 0x2f, 0xc0, 0xb3, 0xa2, 0xc5, 0x7c, - 0xb4, 0xb4, 0x2c, 0xf6, 0x44, 0x75, 0x47, 0x57, 0xe1, 0x09, 0x52, 0xad, 0x06, 0x94, 0xcb, 0x3e, - 0xa7, 0x4a, 0x67, 0x76, 0x9b, 0xd9, 0xd3, 0x12, 0x9c, 0x53, 0xbf, 0x4a, 0x03, 0x5c, 0x6e, 0xad, - 0xc0, 0x6f, 0x00, 0xcc, 0xec, 0x17, 0x52, 0x86, 0x97, 0xe1, 0x48, 0x7c, 0xd3, 0x95, 0xed, 0x42, - 0x7f, 0xb6, 0x63, 0x82, 0xa5, 0x71, 0x35, 0xfe, 0x31, 0x35, 0xfe, 0x98, 0x28, 0x2e, 0xa7, 0xec, - 0xce, 0x4a, 0xfc, 0x09, 0x40, 0xbd, 0xe3, 0x87, 0x58, 0x2e, 0x5d, 0x60, 0x41, 0xd1, 0x8e, 0xce, - 0x6f, 0x8b, 0x6f, 0xe2, 0x4f, 0x3e, 0xb4, 0xdb, 0xcc, 0x8e, 0x4a, 0xe5, 0x16, 0x56, 0x1b, 0x10, - 0x3d, 0x82, 0x49, 0x22, 0xca, 0x33, 0x43, 0x39, 0x90, 0x1f, 0xed, 0x77, 0xe8, 0xb2, 0x65, 0x7c, - 0x74, 0x52, 0x05, 0x97, 0x95, 0x1c, 0x7e, 0x0f, 0x60, 0xb6, 0xa7, 0xd3, 0xf6, 0x00, 0x87, 0xc5, - 0x51, 0xfb, 0x17, 0x07, 0x54, 0x76, 0xc2, 0x4b, 0x50, 0x13, 0xae, 0x1e, 0xb2, 0x90, 0xb8, 0x6d, - 0x6b, 0x87, 0x9a, 0x1d, 0x5e, 0x07, 0x70, 0xbc, 0xab, 0xd8, 0x7f, 0xc3, 0x9b, 0xfe, 0x70, 0x12, - 0x0e, 0x0b, 0x4b, 0x68, 0x0b, 0xc0, 0x74, 0xb7, 0xb4, 0x40, 0x0b, 0xfd, 0xed, 0xf0, 0xdf, 0x32, - 0x49, 0x5b, 0x3c, 0xb2, 0x8e, 0x1c, 0x13, 0xbe, 0xf6, 0xfa, 0xdb, 0xcf, 0x77, 0x43, 0x53, 0xc8, - 0x30, 0x7b, 0xc4, 0xa5, 0x8c, 0x96, 0x0a, 0x91, 0xe5, 0x15, 0x4b, 0x81, 0x7c, 0x04, 0x30, 0x29, - 0x2f, 0x3f, 0xba, 0x3e, 0x80, 0x97, 0x3d, 0x59, 0xa4, 0xcd, 0x1e, 0xa2, 0x52, 0xf9, 0xbe, 0x2c, - 0x7c, 0xe7, 0x90, 0x6e, 0x1e, 0x18, 0xf3, 0xe8, 0x2b, 0x80, 0xa9, 0xd8, 0x6d, 0x47, 0x37, 0x07, - 0x68, 0xb9, 0x3f, 0xbf, 0xb4, 0x5b, 0x87, 0x2d, 0xef, 0x77, 0xdc, 0xf1, 0xf8, 0x31, 0x57, 0xd5, - 0x61, 0x5f, 0x43, 0xbf, 0x00, 0x44, 0xfb, 0xef, 0x32, 0xba, 0x33, 0xa8, 0x9d, 0x6e, 0xa1, 0xa5, - 0xdd, 0x3d, 0xa2, 0x8a, 0x62, 0x5b, 0x14, 0x6c, 0x45, 0x74, 0xfb, 0x40, 0xb6, 0xa8, 0xb6, 0xf2, - 0x84, 0x05, 0x15, 0x19, 0x55, 0x1d, 0x46, 0x73, 0x55, 0x3e, 0x59, 0x43, 0x9b, 0x00, 0x8e, 0xee, - 0xbd, 0xd5, 0x68, 0x6e, 0x00, 0x8b, 0x5d, 0xd3, 0x45, 0x2b, 0x1e, 0x41, 0x41, 0x01, 0xce, 0x0a, - 0xc0, 0x19, 0x54, 0xe8, 0x05, 0x18, 0x46, 0x75, 0x95, 0x36, 0x66, 0x87, 0xad, 0xb4, 0xb4, 0xb1, - 0xad, 0x83, 0xcd, 0x6d, 0x1d, 0xfc, 0xd8, 0xd6, 0xc1, 0xfa, 0x8e, 0x9e, 0xd8, 0xdc, 0xd1, 0x13, - 0xdf, 0x77, 0xf4, 0xc4, 0xe3, 0xa9, 0x58, 0xca, 0x48, 0x87, 0x93, 0xca, 0x62, 0xa7, 0xcb, 0x4b, - 0xd5, 0x47, 0x64, 0x8e, 0x95, 0x14, 0x7f, 0x5d, 0x66, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x39, - 0xaa, 0xef, 0x8e, 0xaa, 0x09, 0x00, 0x00, + // 765 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x96, 0xc1, 0x6b, 0x13, 0x4b, + 0x1c, 0xc7, 0x33, 0x7d, 0xaf, 0x79, 0xef, 0x4d, 0xfa, 0x0a, 0x4e, 0x03, 0xc6, 0xad, 0x6c, 0xe2, + 0x28, 0x12, 0xb1, 0xdd, 0x31, 0x0d, 0x88, 0x15, 0xd4, 0x26, 0xd5, 0x16, 0x0a, 0x05, 0x0d, 0x82, + 0xe0, 0x25, 0x4c, 0x36, 0x63, 0x0c, 0xee, 0xee, 0xa4, 0x3b, 0x9b, 0x6a, 0x2d, 0xbd, 0x78, 0x17, + 0x0b, 0x7a, 0xf0, 0x1f, 0x10, 0xc1, 0xbb, 0xff, 0x81, 0x87, 0x1e, 0x0b, 0x5e, 0x3c, 0xa5, 0xd2, + 0x7a, 0xf2, 0xd8, 0xbf, 0x40, 0x76, 0x66, 0x92, 0x6c, 0x6d, 0x52, 0x93, 0x16, 0xf4, 0x94, 0x64, + 0x77, 0x7e, 0xdf, 0xdf, 0xf7, 0xf3, 0x9b, 0x99, 0x2f, 0x81, 0x58, 0x04, 0xd4, 0xaf, 0xd1, 0xe7, + 0x8c, 0xd8, 0x0e, 0xad, 0xbb, 0x64, 0x35, 0x57, 0x61, 0x01, 0xcd, 0x91, 0x95, 0x26, 0xf3, 0xd7, + 0xac, 0x86, 0xcf, 0x03, 0x8e, 0x2e, 0x34, 0x9a, 0x15, 0xa7, 0x6e, 0xd3, 0xa7, 0x4c, 0x70, 0x97, + 0x59, 0xed, 0x0a, 0x4b, 0x56, 0x58, 0xba, 0xc2, 0x48, 0xd6, 0x78, 0x8d, 0xcb, 0x02, 0x12, 0x7e, + 0x53, 0xb5, 0xc6, 0xd9, 0x1a, 0xe7, 0x35, 0x87, 0x11, 0xda, 0xa8, 0x13, 0xea, 0x79, 0x3c, 0xa0, + 0x41, 0x9d, 0x7b, 0x42, 0xbf, 0x35, 0x6d, 0x2e, 0x5c, 0x2e, 0x48, 0x85, 0x0a, 0xd6, 0x69, 0x6d, + 0xf3, 0xba, 0xa7, 0xdf, 0x5f, 0xea, 0xe3, 0x4e, 0xfe, 0x2a, 0xfb, 0xcc, 0xe6, 0x7e, 0x55, 0x2f, + 0x3d, 0xdf, 0x67, 0x69, 0x83, 0xfa, 0xd4, 0xd5, 0xfd, 0x30, 0x86, 0x99, 0x7b, 0x21, 0xd8, 0x32, + 0xaf, 0x36, 0x1d, 0x56, 0xb0, 0x6d, 0xde, 0xf4, 0x82, 0x22, 0x75, 0xa8, 0x67, 0xb3, 0x12, 0x5b, + 0x69, 0x32, 0x11, 0xe0, 0x8f, 0x00, 0x9e, 0x3b, 0x62, 0x91, 0x68, 0x70, 0x4f, 0x30, 0xf4, 0x0a, + 0xc0, 0xa4, 0xdb, 0x63, 0x41, 0x0a, 0x64, 0xfe, 0xca, 0x26, 0x66, 0xce, 0x58, 0x8a, 0xcc, 0x0a, + 0xc9, 0xda, 0x23, 0xb2, 0xe6, 0x79, 0xdd, 0x2b, 0xce, 0x6d, 0xb5, 0xd2, 0xb1, 0xfd, 0x56, 0x7a, + 0x6c, 0x8d, 0xba, 0xce, 0x75, 0x1c, 0xd2, 0x0a, 0xfc, 0x61, 0x27, 0x9d, 0xad, 0xd5, 0x83, 0xc7, + 0xcd, 0x8a, 0x65, 0x73, 0x97, 0xe8, 0xb1, 0xa8, 0x8f, 0x69, 0x51, 0x7d, 0x42, 0x82, 0xb5, 0x06, + 0x13, 0x52, 0x40, 0x94, 0x7a, 0x36, 0xc6, 0x49, 0x88, 0xa4, 0xed, 0xbb, 0x12, 0xb8, 0x4d, 0x43, + 0xe1, 0xc4, 0x81, 0xa7, 0xda, 0xfe, 0x12, 0x8c, 0xab, 0xc1, 0xa4, 0x40, 0x06, 0x64, 0x13, 0x33, + 0x53, 0xd6, 0x20, 0x7b, 0x6c, 0x29, 0x95, 0xe2, 0xdf, 0x21, 0x42, 0x49, 0x2b, 0xe0, 0x05, 0x78, + 0x5a, 0xb6, 0x98, 0x0f, 0x97, 0x96, 0xe4, 0x9e, 0xe8, 0xee, 0xe8, 0x32, 0xfc, 0x87, 0x56, 0xab, + 0x3e, 0x13, 0xaa, 0xcf, 0x7f, 0xc5, 0x53, 0xfb, 0xad, 0xf4, 0xff, 0x0a, 0x5c, 0x30, 0xaf, 0xca, + 0x7c, 0x5c, 0x6a, 0xaf, 0xc0, 0x2f, 0x01, 0x4c, 0x1d, 0x16, 0xd2, 0x86, 0x57, 0xe0, 0x58, 0x74, + 0xd3, 0xb5, 0xed, 0xdc, 0x60, 0xb6, 0x23, 0x82, 0xc5, 0x49, 0x3d, 0xfe, 0x09, 0x3d, 0xfe, 0x88, + 0x28, 0x2e, 0x25, 0xec, 0xee, 0x4a, 0xfc, 0x1e, 0x40, 0xb3, 0xeb, 0x87, 0x56, 0x1c, 0xb6, 0xc0, + 0xfd, 0x82, 0x1d, 0x9e, 0xdf, 0x36, 0xdf, 0xd4, 0xcf, 0x7c, 0x68, 0xbf, 0x95, 0x1e, 0x57, 0xca, + 0x6d, 0xac, 0x0e, 0x20, 0x7a, 0x00, 0xe3, 0x54, 0x96, 0xa7, 0x46, 0x32, 0x20, 0x3b, 0x3e, 0xe8, + 0xd0, 0x55, 0xcb, 0xe8, 0xe8, 0x94, 0x0a, 0x2e, 0x69, 0x39, 0xfc, 0x06, 0xc0, 0x74, 0x5f, 0xa7, + 0x9d, 0x01, 0x8e, 0xca, 0xa3, 0xf6, 0x3b, 0x0e, 0xa8, 0xea, 0x84, 0x97, 0xa0, 0x21, 0x5d, 0xdd, + 0xe7, 0x01, 0x75, 0x3a, 0xd6, 0x8e, 0x35, 0x3b, 0xbc, 0x09, 0xe0, 0x64, 0x4f, 0xb1, 0x3f, 0x86, + 0x37, 0xf3, 0xf6, 0x5f, 0x38, 0x2a, 0x2d, 0xa1, 0x1d, 0x00, 0x93, 0xbd, 0xd2, 0x02, 0x2d, 0x0c, + 0xb6, 0xc3, 0xbf, 0xca, 0x24, 0x63, 0xf1, 0xc4, 0x3a, 0x6a, 0x4c, 0xf8, 0xea, 0x8b, 0xcf, 0xdf, + 0x5e, 0x8f, 0x5c, 0x41, 0x16, 0xe9, 0x13, 0x97, 0x2a, 0x5a, 0xca, 0x54, 0x95, 0x97, 0x2b, 0x1a, + 0xe4, 0x1d, 0x80, 0x71, 0x75, 0xf9, 0xd1, 0xb5, 0x21, 0xbc, 0x1c, 0xc8, 0x22, 0x63, 0xf6, 0x18, + 0x95, 0xda, 0xf7, 0x45, 0xe9, 0x3b, 0x83, 0x4c, 0x72, 0x64, 0xcc, 0xa3, 0x4f, 0x00, 0x26, 0x22, + 0xb7, 0x1d, 0xdd, 0x18, 0xa2, 0xe5, 0xe1, 0xfc, 0x32, 0x6e, 0x1e, 0xb7, 0x7c, 0xd0, 0x71, 0x47, + 0xe3, 0x87, 0xac, 0xeb, 0xc3, 0xbe, 0x81, 0xbe, 0x03, 0x88, 0x0e, 0xdf, 0x65, 0x74, 0x7b, 0x58, + 0x3b, 0xbd, 0x42, 0xcb, 0xb8, 0x73, 0x42, 0x15, 0xcd, 0xb6, 0x28, 0xd9, 0x0a, 0xe8, 0xd6, 0x91, + 0x6c, 0x61, 0x6d, 0xf9, 0x11, 0xf7, 0xcb, 0x2a, 0xaa, 0xba, 0x8c, 0x64, 0x5d, 0x3d, 0xd9, 0x40, + 0xdb, 0x00, 0x8e, 0x1f, 0xbc, 0xd5, 0x68, 0x6e, 0x08, 0x8b, 0x3d, 0xd3, 0xc5, 0x28, 0x9c, 0x40, + 0x41, 0x03, 0xce, 0x4a, 0xc0, 0x3c, 0xca, 0xf5, 0x03, 0x0c, 0xc2, 0xba, 0x72, 0x07, 0xb3, 0xcb, + 0x56, 0x5c, 0xde, 0xda, 0x35, 0xc1, 0xf6, 0xae, 0x09, 0xbe, 0xee, 0x9a, 0x60, 0x73, 0xcf, 0x8c, + 0x6d, 0xef, 0x99, 0xb1, 0x2f, 0x7b, 0x66, 0xec, 0x61, 0x3e, 0x92, 0x32, 0xca, 0xe1, 0xb4, 0xb6, + 0xd8, 0xed, 0xb2, 0x9a, 0x27, 0xcf, 0x74, 0x2b, 0x19, 0x3b, 0x95, 0xb8, 0xfc, 0xf7, 0x92, 0xff, + 0x11, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x24, 0x11, 0x38, 0xad, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/claim/types/tx.pb.go b/x/claim/types/tx.pb.go index 5b428c4b7..6c1526c54 100644 --- a/x/claim/types/tx.pb.go +++ b/x/claim/types/tx.pb.go @@ -119,37 +119,159 @@ func (m *MsgInitialClaimResponse) GetClaimedAmount() github_com_cosmos_cosmos_sd return nil } +type MsgClaimFor struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Action Action `protobuf:"varint,3,opt,name=action,proto3,enum=publicawesome.stargaze.claim.v1beta1.Action" json:"action,omitempty"` +} + +func (m *MsgClaimFor) Reset() { *m = MsgClaimFor{} } +func (m *MsgClaimFor) String() string { return proto.CompactTextString(m) } +func (*MsgClaimFor) ProtoMessage() {} +func (*MsgClaimFor) Descriptor() ([]byte, []int) { + return fileDescriptor_9ee4a19153cf6635, []int{2} +} +func (m *MsgClaimFor) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimFor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimFor.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 *MsgClaimFor) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimFor.Merge(m, src) +} +func (m *MsgClaimFor) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimFor) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimFor.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimFor proto.InternalMessageInfo + +func (m *MsgClaimFor) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgClaimFor) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *MsgClaimFor) GetAction() Action { + if m != nil { + return m.Action + } + return ActionInitialClaim +} + +type MsgClaimForResponse struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // total initial claimable amount for the user + ClaimedAmount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=claimed_amount,json=claimedAmount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"claimed_amount" yaml:"claimed_amount"` +} + +func (m *MsgClaimForResponse) Reset() { *m = MsgClaimForResponse{} } +func (m *MsgClaimForResponse) String() string { return proto.CompactTextString(m) } +func (*MsgClaimForResponse) ProtoMessage() {} +func (*MsgClaimForResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9ee4a19153cf6635, []int{3} +} +func (m *MsgClaimForResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimForResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimForResponse.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 *MsgClaimForResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimForResponse.Merge(m, src) +} +func (m *MsgClaimForResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimForResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimForResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimForResponse proto.InternalMessageInfo + +func (m *MsgClaimForResponse) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *MsgClaimForResponse) GetClaimedAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.ClaimedAmount + } + return nil +} + func init() { proto.RegisterType((*MsgInitialClaim)(nil), "publicawesome.stargaze.claim.v1beta1.MsgInitialClaim") proto.RegisterType((*MsgInitialClaimResponse)(nil), "publicawesome.stargaze.claim.v1beta1.MsgInitialClaimResponse") + proto.RegisterType((*MsgClaimFor)(nil), "publicawesome.stargaze.claim.v1beta1.MsgClaimFor") + proto.RegisterType((*MsgClaimForResponse)(nil), "publicawesome.stargaze.claim.v1beta1.MsgClaimForResponse") } func init() { proto.RegisterFile("stargaze/claim/v1beta1/tx.proto", fileDescriptor_9ee4a19153cf6635) } var fileDescriptor_9ee4a19153cf6635 = []byte{ - // 345 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x2e, 0x49, 0x2c, - 0x4a, 0x4f, 0xac, 0x4a, 0xd5, 0x4f, 0xce, 0x49, 0xcc, 0xcc, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, - 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0x29, 0x28, 0x4d, - 0xca, 0xc9, 0x4c, 0x4e, 0x2c, 0x4f, 0x2d, 0xce, 0xcf, 0x4d, 0xd5, 0x83, 0x29, 0xd7, 0x03, 0x2b, - 0xd7, 0x83, 0x2a, 0x97, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x6b, 0xd0, 0x07, 0xb1, 0x20, 0x7a, - 0xa5, 0xe4, 0x92, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xf5, 0x93, 0x12, 0x8b, 0x53, 0xe1, 0x26, 0x27, - 0xe7, 0x67, 0xe6, 0x41, 0xe4, 0x95, 0x34, 0xb9, 0xf8, 0x7d, 0x8b, 0xd3, 0x3d, 0xf3, 0x32, 0x4b, - 0x32, 0x13, 0x73, 0x9c, 0x41, 0x06, 0x0a, 0x89, 0x71, 0xb1, 0x15, 0xa7, 0xe6, 0xa5, 0xa4, 0x16, - 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x41, 0x79, 0x4a, 0xcb, 0x19, 0xb9, 0xc4, 0xd1, 0xd4, - 0x06, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x0a, 0x75, 0x33, 0x72, 0xf1, 0x81, 0x9d, 0x93, - 0x9a, 0x12, 0x9f, 0x98, 0x9b, 0x5f, 0x9a, 0x57, 0x22, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, 0x24, - 0xa9, 0x07, 0x71, 0x80, 0x1e, 0xc8, 0x01, 0x30, 0xb7, 0xea, 0x39, 0xe7, 0x67, 0xe6, 0x39, 0x79, - 0x9e, 0xb8, 0x27, 0xcf, 0xf0, 0xe9, 0x9e, 0xbc, 0x68, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x12, 0xaa, - 0x76, 0xa5, 0x55, 0xf7, 0xe5, 0x35, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, - 0xf5, 0xa1, 0xde, 0x80, 0x50, 0xba, 0xc5, 0x29, 0xd9, 0xfa, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x60, - 0x93, 0x8a, 0x83, 0x78, 0xa1, 0x9a, 0x1d, 0xc1, 0x7a, 0x8d, 0x7a, 0x18, 0xb9, 0x98, 0x7d, 0x8b, - 0xd3, 0x85, 0x5a, 0x18, 0xb9, 0x78, 0x50, 0xbc, 0x66, 0xaa, 0x47, 0x4c, 0x50, 0xea, 0xa1, 0xf9, - 0x52, 0xca, 0x96, 0x2c, 0x6d, 0xb0, 0xc0, 0x71, 0xf2, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, - 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, - 0x63, 0x39, 0x86, 0x28, 0x03, 0x24, 0x1f, 0x42, 0xac, 0xd0, 0x85, 0xda, 0xa1, 0x0f, 0x4f, 0x14, - 0x15, 0xd0, 0x64, 0x01, 0xf6, 0x6f, 0x12, 0x1b, 0x38, 0xda, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xfc, 0xfd, 0x0a, 0x0e, 0x35, 0x02, 0x00, 0x00, + // 454 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x93, 0xbf, 0x8e, 0xd3, 0x40, + 0x10, 0xc6, 0xb3, 0x89, 0x14, 0x60, 0x0f, 0x0e, 0xc9, 0xfc, 0x33, 0x29, 0xec, 0xc8, 0xa2, 0xf0, + 0x49, 0xdc, 0xae, 0x92, 0x88, 0x02, 0x24, 0x8a, 0xbb, 0x43, 0x48, 0x57, 0xb8, 0x71, 0x49, 0x73, + 0x5a, 0xdb, 0x2b, 0xb3, 0xc2, 0xf6, 0x5a, 0x9e, 0xcd, 0x91, 0xa3, 0x06, 0x1a, 0x1a, 0xde, 0x02, + 0x89, 0x77, 0xa0, 0xbf, 0xf2, 0x4a, 0xaa, 0x03, 0x25, 0x6f, 0xc0, 0x13, 0xa0, 0xac, 0xd7, 0x56, + 0x72, 0x52, 0xa4, 0x40, 0x75, 0x95, 0xbd, 0x9a, 0xf9, 0x7d, 0x33, 0xf3, 0xed, 0x0e, 0x76, 0x41, + 0xb1, 0x2a, 0x65, 0x1f, 0x38, 0x8d, 0x33, 0x26, 0x72, 0x7a, 0x3a, 0x8a, 0xb8, 0x62, 0x23, 0xaa, + 0x66, 0xa4, 0xac, 0xa4, 0x92, 0xd6, 0x93, 0x72, 0x1a, 0x65, 0x22, 0x66, 0xef, 0x39, 0xc8, 0x9c, + 0x93, 0x26, 0x9d, 0xe8, 0x74, 0x62, 0xd2, 0x07, 0xf7, 0x53, 0x99, 0x4a, 0x0d, 0xd0, 0xe5, 0x5f, + 0xcd, 0x0e, 0x9c, 0x58, 0x42, 0x2e, 0x81, 0x46, 0x0c, 0x78, 0xab, 0x1c, 0x4b, 0x51, 0x98, 0xf8, + 0xde, 0x86, 0xe2, 0xfa, 0x74, 0x52, 0xf1, 0x58, 0x56, 0x49, 0x9d, 0xea, 0xed, 0xe1, 0xbb, 0x01, + 0xa4, 0xc7, 0x85, 0x50, 0x82, 0x65, 0x47, 0xcb, 0xb8, 0xf5, 0x10, 0xf7, 0x81, 0x17, 0x09, 0xaf, + 0x6c, 0x34, 0x44, 0xfe, 0xad, 0xd0, 0x9c, 0xbc, 0x6f, 0x08, 0x3f, 0xba, 0x92, 0x1b, 0x72, 0x28, + 0x65, 0x01, 0xdc, 0xfa, 0x82, 0xf0, 0xae, 0x56, 0xe7, 0xc9, 0x09, 0xcb, 0xe5, 0xb4, 0x50, 0x76, + 0x77, 0xd8, 0xf3, 0x77, 0xc6, 0x8f, 0x49, 0xdd, 0x2b, 0x59, 0xf6, 0xda, 0x8c, 0x45, 0x8e, 0xa4, + 0x28, 0x0e, 0x8f, 0xcf, 0x2f, 0xdd, 0xce, 0x9f, 0x4b, 0xf7, 0xc1, 0x19, 0xcb, 0xb3, 0x17, 0xde, + 0x3a, 0xee, 0x7d, 0xff, 0xe5, 0xfa, 0xa9, 0x50, 0x6f, 0xa7, 0x11, 0x89, 0x65, 0x4e, 0xcd, 0xc4, + 0xf5, 0x67, 0x1f, 0x92, 0x77, 0x54, 0x9d, 0x95, 0x1c, 0xb4, 0x12, 0x84, 0x77, 0x0c, 0x7c, 0x50, + 0xb3, 0x9f, 0x10, 0xde, 0x09, 0x20, 0xd5, 0x2d, 0xbe, 0x96, 0xd5, 0xa6, 0x89, 0x2c, 0x1b, 0xdf, + 0x60, 0x49, 0x52, 0x71, 0x00, 0xbb, 0xab, 0x03, 0xcd, 0xd1, 0x7a, 0x85, 0xfb, 0x2c, 0x56, 0x42, + 0x16, 0x76, 0x6f, 0x88, 0xfc, 0xdd, 0xf1, 0x53, 0xb2, 0xcd, 0x75, 0x91, 0x03, 0xcd, 0x84, 0x86, + 0xf5, 0x7e, 0x20, 0x7c, 0x6f, 0xa5, 0x8f, 0xd6, 0xad, 0x95, 0xba, 0x68, 0xbd, 0xee, 0xb5, 0xf2, + 0x71, 0xfc, 0xb9, 0x8b, 0x7b, 0x01, 0xa4, 0xd6, 0x47, 0x84, 0x6f, 0xaf, 0x3d, 0x91, 0x67, 0xdb, + 0xd9, 0x71, 0xe5, 0xb5, 0x0c, 0x5e, 0xfe, 0x17, 0xd6, 0xda, 0x36, 0xc3, 0x37, 0xdb, 0x2b, 0x1d, + 0x6d, 0x2d, 0xd5, 0x20, 0x83, 0xe7, 0xff, 0x8c, 0x34, 0x95, 0x0f, 0x83, 0xf3, 0xb9, 0x83, 0x2e, + 0xe6, 0x0e, 0xfa, 0x3d, 0x77, 0xd0, 0xd7, 0x85, 0xd3, 0xb9, 0x58, 0x38, 0x9d, 0x9f, 0x0b, 0xa7, + 0xf3, 0x66, 0xb2, 0xe2, 0x6d, 0x2d, 0xbf, 0x6f, 0xf4, 0x69, 0xbb, 0x84, 0xa7, 0x13, 0x3a, 0x33, + 0x9b, 0xa8, 0xcd, 0x8e, 0xfa, 0x7a, 0xf7, 0x26, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x58, 0xe3, + 0x1a, 0xbb, 0x25, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -165,6 +287,8 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { InitialClaim(ctx context.Context, in *MsgInitialClaim, opts ...grpc.CallOption) (*MsgInitialClaimResponse, error) + // this line is used by starport scaffolding # proto/tx/rpc + ClaimFor(ctx context.Context, in *MsgClaimFor, opts ...grpc.CallOption) (*MsgClaimForResponse, error) } type msgClient struct { @@ -184,9 +308,20 @@ func (c *msgClient) InitialClaim(ctx context.Context, in *MsgInitialClaim, opts return out, nil } +func (c *msgClient) ClaimFor(ctx context.Context, in *MsgClaimFor, opts ...grpc.CallOption) (*MsgClaimForResponse, error) { + out := new(MsgClaimForResponse) + err := c.cc.Invoke(ctx, "/publicawesome.stargaze.claim.v1beta1.Msg/ClaimFor", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { InitialClaim(context.Context, *MsgInitialClaim) (*MsgInitialClaimResponse, error) + // this line is used by starport scaffolding # proto/tx/rpc + ClaimFor(context.Context, *MsgClaimFor) (*MsgClaimForResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -196,6 +331,9 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) InitialClaim(ctx context.Context, req *MsgInitialClaim) (*MsgInitialClaimResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InitialClaim not implemented") } +func (*UnimplementedMsgServer) ClaimFor(ctx context.Context, req *MsgClaimFor) (*MsgClaimForResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimFor not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -219,6 +357,24 @@ func _Msg_InitialClaim_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_ClaimFor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClaimFor) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClaimFor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/publicawesome.stargaze.claim.v1beta1.Msg/ClaimFor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClaimFor(ctx, req.(*MsgClaimFor)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "publicawesome.stargaze.claim.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -227,6 +383,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "InitialClaim", Handler: _Msg_InitialClaim_Handler, }, + { + MethodName: "ClaimFor", + Handler: _Msg_ClaimFor_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stargaze/claim/v1beta1/tx.proto", @@ -299,6 +459,92 @@ func (m *MsgInitialClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgClaimFor) 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 *MsgClaimFor) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimFor) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Action != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Action)) + i-- + dAtA[i] = 0x18 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgClaimForResponse) 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 *MsgClaimForResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimForResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ClaimedAmount) > 0 { + for iNdEx := len(m.ClaimedAmount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ClaimedAmount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -338,6 +584,45 @@ func (m *MsgInitialClaimResponse) Size() (n int) { return n } +func (m *MsgClaimFor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Action != 0 { + n += 1 + sovTx(uint64(m.Action)) + } + return n +} + +func (m *MsgClaimForResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.ClaimedAmount) > 0 { + for _, e := range m.ClaimedAmount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -510,6 +795,255 @@ func (m *MsgInitialClaimResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgClaimFor) 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 ErrIntOverflowTx + } + 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: MsgClaimFor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimFor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + m.Action = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Action |= Action(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgClaimForResponse) 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 ErrIntOverflowTx + } + 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: MsgClaimForResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimForResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClaimedAmount = append(m.ClaimedAmount, types.Coin{}) + if err := m.ClaimedAmount[len(m.ClaimedAmount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/claim/wasm/encoder.go b/x/claim/wasm/encoder.go new file mode 100644 index 000000000..f68ff5245 --- /dev/null +++ b/x/claim/wasm/encoder.go @@ -0,0 +1,63 @@ +package wasm + +import ( + "encoding/json" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + sgwasm "github.com/public-awesome/stargaze/v3/internal/wasm" + claimtypes "github.com/public-awesome/stargaze/v3/x/claim/types" +) + +var _ sgwasm.Encoder = Encoder + +type ClaimAction string + +const ( + ClaimActionMintNFT = "mint_nft" + ClaimActionBidNFT = "bid_nft" +) + +type ClaimFor struct { + Address string `json:"address"` + Action ClaimAction `json:"action"` +} + +func (a ClaimAction) ToAction() (claimtypes.Action, error) { + if a == ClaimActionMintNFT { + return claimtypes.ActionMintNFT, nil + } + + // rebranding the action + if a == ClaimActionBidNFT { + return claimtypes.ActionBidNFT, nil + } + + return 0, fmt.Errorf("invalid action") +} + +type ClaimMsg struct { + ClaimFor *ClaimFor `json:"claim_for,omitempty"` +} + +func (c ClaimFor) Encode(contract sdk.AccAddress) ([]sdk.Msg, error) { + action, err := c.Action.ToAction() + if err != nil { + return nil, err + } + msg := claimtypes.NewMsgClaimFor(contract.String(), c.Address, action) + return []sdk.Msg{msg}, nil +} + +func Encoder(contract sdk.AccAddress, data json.RawMessage, version string) ([]sdk.Msg, error) { + msg := &ClaimMsg{} + err := json.Unmarshal(data, msg) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) + } + if msg.ClaimFor != nil { + return msg.ClaimFor.Encode(contract) + } + return nil, fmt.Errorf("wasm: invalid custom claim message") +} diff --git a/x/mint/keeper/integration_test.go b/x/mint/keeper/integration_test.go index ab06f6214..3ed30cd14 100644 --- a/x/mint/keeper/integration_test.go +++ b/x/mint/keeper/integration_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "encoding/json" + "github.com/CosmWasm/wasmd/x/wasm" "github.com/tendermint/spm/cosmoscmd" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -60,7 +61,10 @@ func genApp(withGenesis bool, invCheckPeriod uint) (*stargazeapp.App, stargazeap simapp.DefaultNodeHome, invCheckPeriod, encCdc, - simapp.EmptyAppOptions{}) + simapp.EmptyAppOptions{}, + nil, + wasm.DisableAllProposals, + ) originalApp := app.(*stargazeapp.App) diff --git a/x/mint/types/genesis.pb.go b/x/mint/types/genesis.pb.go index cfc55307b..5fd8d9f73 100644 --- a/x/mint/types/genesis.pb.go +++ b/x/mint/types/genesis.pb.go @@ -87,7 +87,7 @@ func init() { } var fileDescriptor_97324df1b14fbd08 = []byte{ - // 228 bytes of a gzipped FileDescriptorProto + // 231 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2e, 0x2e, 0x49, 0x2c, 0x4a, 0x4f, 0xac, 0x4a, 0xd5, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, @@ -97,12 +97,12 @@ var fileDescriptor_97324df1b14fbd08 = []byte{ 0x24, 0x9d, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xab, 0x87, 0xd5, 0x42, 0x3d, 0x5f, 0xb0, 0x22, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x5a, 0x40, 0x9a, 0x0b, 0x12, 0x8b, 0x12, 0x73, 0x8b, 0x25, 0x98, 0xf0, 0x6a, 0x0e, 0x00, 0x2b, 0x82, 0x69, 0x86, 0x68, 0x71, - 0xf2, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, - 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xfd, 0xf4, 0xcc, 0x92, + 0xf2, 0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, + 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x82, 0xd2, 0xa4, 0x9c, 0xcc, 0x64, 0xdd, 0xc4, - 0xf2, 0xd4, 0xe2, 0xfc, 0xdc, 0x54, 0x7d, 0xb8, 0x07, 0x2b, 0x20, 0x5e, 0x2c, 0xa9, 0x2c, 0x48, - 0x2d, 0x4e, 0x62, 0x03, 0x7b, 0xce, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xef, 0x36, 0xa4, 0x39, - 0x52, 0x01, 0x00, 0x00, + 0xf2, 0xd4, 0xe2, 0xfc, 0xdc, 0x54, 0x7d, 0xb8, 0x07, 0xcb, 0x8c, 0xf5, 0x2b, 0x20, 0xbe, 0x2c, + 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xfb, 0xcf, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x90, + 0x26, 0x78, 0x6c, 0x55, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/mint/types/mint.pb.go b/x/mint/types/mint.pb.go index e7324d202..6a79ddb9d 100644 --- a/x/mint/types/mint.pb.go +++ b/x/mint/types/mint.pb.go @@ -142,36 +142,37 @@ func init() { func init() { proto.RegisterFile("stargaze/mint/v1beta1/mint.proto", fileDescriptor_736e1519c3888655) } var fileDescriptor_736e1519c3888655 = []byte{ - // 462 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x6e, 0xd3, 0x30, - 0x1c, 0xc6, 0x63, 0x56, 0x2a, 0xd5, 0x08, 0x6d, 0x8b, 0x80, 0x85, 0x4a, 0x4b, 0xa2, 0x1c, 0x50, - 0x2f, 0x8b, 0x35, 0xb8, 0xed, 0x46, 0x34, 0x21, 0x0d, 0x09, 0xa9, 0x8a, 0x38, 0x00, 0x97, 0xc8, - 0x49, 0xbd, 0x60, 0x2d, 0x8e, 0x23, 0xdb, 0xd9, 0x28, 0x37, 0x5e, 0x00, 0xed, 0xc8, 0x91, 0xc7, - 0xd9, 0x71, 0xe2, 0x84, 0x38, 0x04, 0xd4, 0xbe, 0x41, 0x9f, 0x00, 0xd9, 0x6e, 0x37, 0xd4, 0x89, - 0x43, 0x4f, 0x89, 0x7f, 0xf9, 0xf2, 0xf7, 0xf7, 0x7d, 0x36, 0x0c, 0xa5, 0xc2, 0xa2, 0xc4, 0x9f, - 0x09, 0x62, 0xb4, 0x56, 0xe8, 0xfc, 0x30, 0x27, 0x0a, 0x1f, 0x9a, 0x45, 0xdc, 0x08, 0xae, 0xb8, - 0xfb, 0x78, 0xa5, 0x88, 0x0d, 0x5c, 0x2a, 0x86, 0x8f, 0x4a, 0x5e, 0x72, 0xa3, 0x40, 0xfa, 0xcd, - 0x8a, 0x87, 0x41, 0xc9, 0x79, 0x59, 0x11, 0x64, 0x56, 0x79, 0x7b, 0x8a, 0x14, 0x65, 0x44, 0x2a, - 0xcc, 0x1a, 0x2b, 0x88, 0xbe, 0x00, 0xd8, 0x7f, 0x43, 0x6b, 0x45, 0x84, 0x7b, 0x01, 0x77, 0x71, - 0x5d, 0xb7, 0xb8, 0xca, 0x1a, 0xc1, 0xcf, 0xa9, 0xa4, 0xbc, 0x96, 0x1e, 0x08, 0xc1, 0x68, 0x90, - 0xbc, 0xbe, 0xea, 0x02, 0xe7, 0x57, 0x17, 0x3c, 0x2b, 0xa9, 0xfa, 0xd8, 0xe6, 0x71, 0xc1, 0x19, - 0x2a, 0xb8, 0x64, 0x5c, 0x2e, 0x1f, 0x07, 0x72, 0x72, 0x86, 0xd4, 0xb4, 0x21, 0x32, 0x3e, 0x26, - 0xc5, 0xa2, 0x0b, 0xbc, 0x29, 0x66, 0xd5, 0x51, 0x74, 0x67, 0x60, 0x94, 0xee, 0x58, 0x36, 0xbe, - 0x45, 0x3f, 0xb6, 0x60, 0x7f, 0x8c, 0x05, 0x66, 0xd2, 0xdd, 0x87, 0x50, 0xa7, 0xca, 0x26, 0xa4, - 0xe6, 0xcc, 0x6e, 0x9e, 0x0e, 0x34, 0x39, 0xd6, 0xc0, 0x7d, 0x07, 0xa1, 0x4e, 0xaf, 0x32, 0x1d, - 0xc3, 0xbb, 0x17, 0x82, 0xd1, 0x83, 0xe7, 0xc3, 0xd8, 0x66, 0x8c, 0x57, 0x19, 0xe3, 0xb7, 0xab, - 0x8c, 0xc9, 0xbe, 0xf6, 0xbd, 0xe8, 0x82, 0x5d, 0xeb, 0xe6, 0xf6, 0xdf, 0xe8, 0xf2, 0x77, 0x00, - 0xd2, 0x81, 0x01, 0x5a, 0xee, 0x7e, 0x05, 0xf0, 0x29, 0xad, 0xa9, 0xa2, 0xb8, 0xca, 0xee, 0xb6, - 0xb0, 0x65, 0x5a, 0x48, 0x37, 0x6e, 0x21, 0xb4, 0xfb, 0xfe, 0x77, 0x70, 0x94, 0xee, 0x2d, 0xbf, - 0xbd, 0x5c, 0x2b, 0xc5, 0x55, 0x70, 0x47, 0x90, 0x49, 0x5b, 0x28, 0xca, 0xeb, 0xec, 0x14, 0x17, - 0x8a, 0x0b, 0xaf, 0x67, 0x6c, 0x9c, 0x6c, 0x6c, 0x63, 0xcf, 0xda, 0x58, 0x9f, 0x17, 0xa5, 0xdb, - 0x37, 0xe8, 0x95, 0x21, 0x6e, 0x02, 0xb7, 0xf3, 0x8a, 0x17, 0x67, 0x32, 0x6b, 0x88, 0xc8, 0xa6, - 0x04, 0x0b, 0xef, 0x7e, 0x08, 0x46, 0xbd, 0x64, 0xb8, 0xe8, 0x82, 0x27, 0x76, 0xcc, 0x9a, 0x20, - 0x4a, 0x1f, 0x5a, 0x32, 0x26, 0xe2, 0x3d, 0xc1, 0xe2, 0xa8, 0xf7, 0xed, 0x7b, 0xe0, 0x24, 0x27, - 0x57, 0x33, 0x1f, 0x5c, 0xcf, 0x7c, 0xf0, 0x67, 0xe6, 0x83, 0xcb, 0xb9, 0xef, 0x5c, 0xcf, 0x7d, - 0xe7, 0xe7, 0xdc, 0x77, 0x3e, 0xa0, 0x7f, 0x7c, 0x37, 0x6d, 0x5e, 0xd1, 0xe2, 0x00, 0x5f, 0x10, - 0xc9, 0x19, 0x41, 0x37, 0x97, 0xff, 0x93, 0xbd, 0xfe, 0x26, 0x44, 0xde, 0x37, 0x27, 0xfb, 0xe2, - 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xe4, 0xba, 0x36, 0x1c, 0x03, 0x00, 0x00, + // 465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xc1, 0x6e, 0xd3, 0x30, + 0x1c, 0xc6, 0x63, 0x56, 0x2a, 0xd5, 0x08, 0x6d, 0x8b, 0x80, 0x85, 0x48, 0x4b, 0xa2, 0x1c, 0x50, + 0x2f, 0x8b, 0xb5, 0xed, 0xb6, 0x1b, 0xd1, 0x84, 0x04, 0x02, 0xa9, 0x8a, 0x38, 0x00, 0x97, 0xc8, + 0x49, 0xbd, 0x60, 0x2d, 0x8e, 0x23, 0xdb, 0xe9, 0x28, 0x37, 0x5e, 0x00, 0xed, 0xc8, 0x91, 0xc7, + 0xd9, 0x71, 0xe2, 0x84, 0x38, 0x04, 0xd4, 0xbe, 0x41, 0x9f, 0x00, 0xc5, 0x6e, 0x37, 0xd4, 0x89, + 0x43, 0x4f, 0x89, 0x7f, 0xf9, 0xf2, 0xf7, 0xf7, 0x7d, 0x89, 0x61, 0x20, 0x15, 0x16, 0x05, 0xfe, + 0x4c, 0x10, 0xa3, 0x95, 0x42, 0x93, 0xc3, 0x8c, 0x28, 0x7c, 0xa8, 0x17, 0x51, 0x2d, 0xb8, 0xe2, + 0xf6, 0xe3, 0x95, 0x22, 0xd2, 0x70, 0xa9, 0x70, 0x1f, 0x15, 0xbc, 0xe0, 0x5a, 0x81, 0xba, 0x3b, + 0x23, 0x76, 0xfd, 0x82, 0xf3, 0xa2, 0x24, 0x48, 0xaf, 0xb2, 0xe6, 0x0c, 0x29, 0xca, 0x88, 0x54, + 0x98, 0xd5, 0x46, 0x10, 0x7e, 0x01, 0xb0, 0xff, 0x86, 0x56, 0x8a, 0x08, 0xfb, 0x02, 0xee, 0xe2, + 0xaa, 0x6a, 0x70, 0x99, 0xd6, 0x82, 0x4f, 0xa8, 0xa4, 0xbc, 0x92, 0x0e, 0x08, 0xc0, 0x70, 0x10, + 0xbf, 0xba, 0x6a, 0x7d, 0xeb, 0x57, 0xeb, 0x3f, 0x2b, 0xa8, 0xfa, 0xd8, 0x64, 0x51, 0xce, 0x19, + 0xca, 0xb9, 0x64, 0x5c, 0x2e, 0x2f, 0x07, 0x72, 0x7c, 0x8e, 0xd4, 0xb4, 0x26, 0x32, 0x3a, 0x25, + 0xf9, 0xa2, 0xf5, 0x9d, 0x29, 0x66, 0xe5, 0x49, 0x78, 0x67, 0x60, 0x98, 0xec, 0x18, 0x36, 0xba, + 0x45, 0x3f, 0xb6, 0x60, 0x7f, 0x84, 0x05, 0x66, 0xd2, 0xde, 0x87, 0xb0, 0x4b, 0x95, 0x8e, 0x49, + 0xc5, 0x99, 0xd9, 0x3c, 0x19, 0x74, 0xe4, 0xb4, 0x03, 0xf6, 0x3b, 0x08, 0xbb, 0xf4, 0x2a, 0xed, + 0x62, 0x38, 0xf7, 0x02, 0x30, 0x7c, 0x70, 0xe4, 0x46, 0x26, 0x63, 0xb4, 0xca, 0x18, 0xbd, 0x5d, + 0x65, 0x8c, 0xf7, 0x3b, 0xdf, 0x8b, 0xd6, 0xdf, 0x35, 0x6e, 0x6e, 0xdf, 0x0d, 0x2f, 0x7f, 0xfb, + 0x20, 0x19, 0x68, 0xd0, 0xc9, 0xed, 0xaf, 0x00, 0x3e, 0xa5, 0x15, 0x55, 0x14, 0x97, 0xe9, 0xdd, + 0x16, 0xb6, 0x74, 0x0b, 0xc9, 0xc6, 0x2d, 0x04, 0x66, 0xdf, 0xff, 0x0e, 0x0e, 0x93, 0xbd, 0xe5, + 0xb3, 0xe7, 0x6b, 0xa5, 0xd8, 0x0a, 0xee, 0x08, 0x32, 0x6e, 0x72, 0x45, 0x79, 0x95, 0x9e, 0xe1, + 0x5c, 0x71, 0xe1, 0xf4, 0xb4, 0x8d, 0x97, 0x1b, 0xdb, 0xd8, 0x33, 0x36, 0xd6, 0xe7, 0x85, 0xc9, + 0xf6, 0x0d, 0x7a, 0xa1, 0x89, 0x1d, 0xc3, 0xed, 0xac, 0xe4, 0xf9, 0xb9, 0x4c, 0x6b, 0x22, 0xd2, + 0x29, 0xc1, 0xc2, 0xb9, 0x1f, 0x80, 0x61, 0x2f, 0x76, 0x17, 0xad, 0xff, 0xc4, 0x8c, 0x59, 0x13, + 0x84, 0xc9, 0x43, 0x43, 0x46, 0x44, 0xbc, 0x27, 0x58, 0x9c, 0xf4, 0xbe, 0x7d, 0xf7, 0xad, 0xf8, + 0xf5, 0xd5, 0xcc, 0x03, 0xd7, 0x33, 0x0f, 0xfc, 0x99, 0x79, 0xe0, 0x72, 0xee, 0x59, 0xd7, 0x73, + 0xcf, 0xfa, 0x39, 0xf7, 0xac, 0x0f, 0x47, 0xff, 0xf8, 0xae, 0x9b, 0xac, 0xa4, 0xf9, 0x01, 0xbe, + 0x20, 0x92, 0x33, 0x82, 0x6e, 0x7e, 0xfe, 0xc9, 0x31, 0xfa, 0x64, 0x4e, 0x80, 0xce, 0x91, 0xf5, + 0xf5, 0xc7, 0x3d, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x36, 0x8b, 0xc3, 0xfd, 0x1f, 0x03, 0x00, + 0x00, } func (m *Minter) Marshal() (dAtA []byte, err error) { diff --git a/x/mint/types/query.pb.go b/x/mint/types/query.pb.go index 5347f24e7..b46c98f37 100644 --- a/x/mint/types/query.pb.go +++ b/x/mint/types/query.pb.go @@ -201,7 +201,7 @@ func init() { func init() { proto.RegisterFile("stargaze/mint/v1beta1/query.proto", fileDescriptor_48e6003689853ab9) } var fileDescriptor_48e6003689853ab9 = []byte{ - // 403 bytes of a gzipped FileDescriptorProto + // 406 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x2e, 0x49, 0x2c, 0x4a, 0x4f, 0xac, 0x4a, 0xd5, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, @@ -222,12 +222,12 @@ var fileDescriptor_48e6003689853ab9 = []byte{ 0x61, 0x86, 0x98, 0x94, 0x16, 0x31, 0x4a, 0x21, 0x1e, 0x51, 0x52, 0x6d, 0xba, 0xfc, 0x64, 0x32, 0x93, 0xbc, 0x90, 0xac, 0x3e, 0xf6, 0xe8, 0x81, 0x04, 0x98, 0xd0, 0x7a, 0x46, 0x2e, 0x01, 0xf4, 0xc0, 0x10, 0x32, 0xc6, 0x67, 0x0f, 0x8e, 0xa0, 0x95, 0x32, 0x21, 0x4d, 0x13, 0xd4, 0x99, 0x06, - 0x60, 0x67, 0x6a, 0x09, 0x69, 0xe0, 0x70, 0x26, 0x46, 0x64, 0x38, 0x79, 0x9e, 0x78, 0x24, 0xc7, + 0x60, 0x67, 0x6a, 0x09, 0x69, 0xe0, 0x70, 0x26, 0x46, 0x64, 0x38, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, - 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x3e, 0x52, 0xc4, 0x14, 0x94, 0x26, 0xe5, 0x64, 0x26, - 0xeb, 0x26, 0x96, 0xa7, 0x16, 0xe7, 0xe7, 0xa6, 0x22, 0x0c, 0xaf, 0x80, 0x18, 0x0f, 0x8e, 0xa5, - 0x24, 0x36, 0x70, 0xf2, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x97, 0xa1, 0x27, 0xbb, 0x30, - 0x03, 0x00, 0x00, + 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x11, 0x52, 0xc4, 0x14, 0x94, 0x26, 0xe5, 0x64, 0x26, + 0xeb, 0x26, 0x96, 0xa7, 0x16, 0xe7, 0xe7, 0xa6, 0x22, 0x0c, 0x2f, 0x33, 0xd6, 0xaf, 0x80, 0xd8, + 0x00, 0x8e, 0xa8, 0x24, 0x36, 0x70, 0x0a, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xd1, + 0x2b, 0x7c, 0x33, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used.