diff --git a/app/app.go b/app/app.go index 11612f5d5..1a241cf6d 100644 --- a/app/app.go +++ b/app/app.go @@ -10,6 +10,7 @@ import ( "strings" "github.com/neutron-org/neutron/app/upgrades" + v044 "github.com/neutron-org/neutron/app/upgrades/v0.4.4" v3 "github.com/neutron-org/neutron/app/upgrades/v3" "github.com/neutron-org/neutron/x/cron" @@ -172,7 +173,7 @@ func GetEnabledProposals() []wasm.ProposalType { } var ( - Upgrades = []upgrades.Upgrade{v3.Upgrade} + Upgrades = []upgrades.Upgrade{v3.Upgrade, v044.Upgrade} // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string @@ -893,9 +894,14 @@ func (app *App) setupUpgradeHandlers() { upgrade.CreateUpgradeHandler( app.mm, app.configurator, - app.InterchainQueriesKeeper, - app.CronKeeper, - app.TokenFactoryKeeper, + &upgrades.UpgradeKeepers{ + FeeBurnerKeeper: app.FeeBurnerKeeper, + CronKeeper: app.CronKeeper, + IcqKeeper: app.InterchainQueriesKeeper, + TokenFactoryKeeper: app.TokenFactoryKeeper, + SlashingKeeper: app.SlashingKeeper, + ParamsKeeper: app.ParamsKeeper, + }, ), ) } diff --git a/app/proposals_allowlisting.go b/app/proposals_allowlisting.go index f7df2a535..e587feac8 100644 --- a/app/proposals_allowlisting.go +++ b/app/proposals_allowlisting.go @@ -16,6 +16,7 @@ import ( feerefundertypes "github.com/neutron-org/neutron/x/feerefunder/types" interchainqueriestypes "github.com/neutron-org/neutron/x/interchainqueries/types" interchaintxstypes "github.com/neutron-org/neutron/x/interchaintxs/types" + tokenfactorytypes "github.com/neutron-org/neutron/x/tokenfactory/types" ) func IsConsumerProposalAllowlisted(content govtypes.Content) bool { @@ -72,8 +73,11 @@ var WhitelistedParams = map[paramChangeKey]struct{}{ {Subspace: interchainqueriestypes.ModuleName, Key: string(interchainqueriestypes.KeyQueryDeposit)}: {}, {Subspace: interchainqueriestypes.ModuleName, Key: string(interchainqueriestypes.KeyTxQueryRemovalLimit)}: {}, // feeburner - {Subspace: feeburnertypes.ModuleName, Key: string(feeburnertypes.KeyReserveAddress)}: {}, - {Subspace: feeburnertypes.ModuleName, Key: string(feeburnertypes.KeyNeutronDenom)}: {}, + {Subspace: feeburnertypes.ModuleName, Key: string(feeburnertypes.KeyTreasuryAddress)}: {}, + {Subspace: feeburnertypes.ModuleName, Key: string(feeburnertypes.KeyNeutronDenom)}: {}, + // tokenfactory + {Subspace: tokenfactorytypes.ModuleName, Key: string(tokenfactorytypes.KeyDenomCreationFee)}: {}, + {Subspace: tokenfactorytypes.ModuleName, Key: string(tokenfactorytypes.KeyFeeCollectorAddress)}: {}, // cron {Subspace: crontypes.ModuleName, Key: string(crontypes.KeySecurityAddress)}: {}, {Subspace: crontypes.ModuleName, Key: string(crontypes.KeyLimit)}: {}, diff --git a/app/upgrades/types.go b/app/upgrades/types.go index 14005ba71..ca17adff5 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -3,9 +3,12 @@ package upgrades import ( store "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/types/module" + slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" cronkeeper "github.com/neutron-org/neutron/x/cron/keeper" + feeburnerkeeper "github.com/neutron-org/neutron/x/feeburner/keeper" icqkeeper "github.com/neutron-org/neutron/x/interchainqueries/keeper" tokenfactorykeeper "github.com/neutron-org/neutron/x/tokenfactory/keeper" ) @@ -19,8 +22,18 @@ type Upgrade struct { UpgradeName string // CreateUpgradeHandler defines the function that creates an upgrade handler - CreateUpgradeHandler func(*module.Manager, module.Configurator, icqkeeper.Keeper, cronkeeper.Keeper, *tokenfactorykeeper.Keeper) upgradetypes.UpgradeHandler + CreateUpgradeHandler func(*module.Manager, module.Configurator, *UpgradeKeepers) upgradetypes.UpgradeHandler // Store upgrades, should be used for any new modules introduced, new modules deleted, or store names renamed. StoreUpgrades store.StoreUpgrades } + +type UpgradeKeepers struct { + // keepers + IcqKeeper icqkeeper.Keeper + CronKeeper cronkeeper.Keeper + TokenFactoryKeeper *tokenfactorykeeper.Keeper + FeeBurnerKeeper *feeburnerkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + ParamsKeeper paramskeeper.Keeper +} diff --git a/app/upgrades/v0.4.4/constants.go b/app/upgrades/v0.4.4/constants.go new file mode 100644 index 000000000..e7ccfc6fe --- /dev/null +++ b/app/upgrades/v0.4.4/constants.go @@ -0,0 +1,15 @@ +package v044 + +import ( + "github.com/neutron-org/neutron/app/upgrades" +) + +const ( + // UpgradeName defines the on-chain upgrades name. + UpgradeName = "v0.4.4" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, +} diff --git a/app/upgrades/v0.4.4/upgrades.go b/app/upgrades/v0.4.4/upgrades.go new file mode 100644 index 000000000..c791065b7 --- /dev/null +++ b/app/upgrades/v0.4.4/upgrades.go @@ -0,0 +1,58 @@ +package v044 + +import ( + "errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + feeburnertypes "github.com/neutron-org/neutron/x/feeburner/types" + tokenfactorytypes "github.com/neutron-org/neutron/x/tokenfactory/types" + + "github.com/neutron-org/neutron/app/upgrades" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + keepers *upgrades.UpgradeKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("Starting module migrations...") + vm, err := mm.RunMigrations(ctx, configurator, vm) + if err != nil { + return vm, err + } + + ctx.Logger().Info("Migrating SlashingKeeper Params...") + oldSlashingParams := keepers.SlashingKeeper.GetParams(ctx) + oldSlashingParams.SignedBlocksWindow = int64(36000) + + keepers.SlashingKeeper.SetParams(ctx, oldSlashingParams) + + ctx.Logger().Info("Migrating FeeBurner Params...") + s, ok := keepers.ParamsKeeper.GetSubspace(feeburnertypes.ModuleName) + if !ok { + return nil, errors.New("global fee burner params subspace not found") + } + var reserveAddress string + s.Get(ctx, feeburnertypes.KeyReserveAddress, &reserveAddress) + + var neutronDenom string + s.Get(ctx, feeburnertypes.KeyNeutronDenom, &neutronDenom) + + feeburnerDefaultParams := feeburnertypes.DefaultParams() + feeburnerDefaultParams.TreasuryAddress = reserveAddress + feeburnerDefaultParams.NeutronDenom = neutronDenom + keepers.FeeBurnerKeeper.SetParams(ctx, feeburnerDefaultParams) + + ctx.Logger().Info("Migrating TokenFactory Params...") + tokenfactoryDefaultParams := tokenfactorytypes.DefaultParams() + tokenfactoryDefaultParams.FeeCollectorAddress = reserveAddress + keepers.TokenFactoryKeeper.SetParams(ctx, tokenfactoryDefaultParams) + + ctx.Logger().Info("Upgrade complete") + return vm, err + } +} diff --git a/app/upgrades/v3/upgrades.go b/app/upgrades/v3/upgrades.go index aa64ecf56..e1ce1f21a 100644 --- a/app/upgrades/v3/upgrades.go +++ b/app/upgrades/v3/upgrades.go @@ -4,29 +4,25 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/neutron-org/neutron/app/upgrades" - cronkeeper "github.com/neutron-org/neutron/x/cron/keeper" crontypes "github.com/neutron-org/neutron/x/cron/types" - icqkeeper "github.com/neutron-org/neutron/x/interchainqueries/keeper" icqtypes "github.com/neutron-org/neutron/x/interchainqueries/types" - tokenfactorykeeper "github.com/neutron-org/neutron/x/tokenfactory/keeper" tokenfactorytypes "github.com/neutron-org/neutron/x/tokenfactory/types" ) func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, - icqKeeper icqkeeper.Keeper, - cronKeeper cronkeeper.Keeper, - tokenfactoryKeeper *tokenfactorykeeper.Keeper, + keepers *upgrades.UpgradeKeepers, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { ctx.Logger().Info("Starting module migrations...") // todo: FIXME - icqKeeper.SetParams(ctx, icqtypes.DefaultParams()) - cronKeeper.SetParams(ctx, crontypes.DefaultParams()) - tokenfactoryKeeper.SetParams(ctx, tokenfactorytypes.DefaultParams()) + keepers.IcqKeeper.SetParams(ctx, icqtypes.DefaultParams()) + keepers.CronKeeper.SetParams(ctx, crontypes.DefaultParams()) + keepers.TokenFactoryKeeper.SetParams(ctx, tokenfactorytypes.DefaultParams()) vm, err := mm.RunMigrations(ctx, configurator, vm) if err != nil { diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 721021746..efb750ed9 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -1123,6 +1123,7 @@ paths: type: object properties: account: + description: account defines the account of the corresponding address. type: object properties: '@type': @@ -1183,114 +1184,6 @@ paths: 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: >- QueryAccountResponse is the response type for the Query/Account RPC method. @@ -3651,20 +3544,13 @@ paths: type: object properties: balance: + description: balance is the balance of the 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. description: >- QueryBalanceResponse is the response type for the Query/Balance RPC method. @@ -3898,6 +3784,9 @@ paths: type: object properties: metadata: + description: >- + metadata describes and provides all the client information for + the requested token. type: object properties: description: @@ -3965,9 +3854,6 @@ paths: 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 @@ -4329,20 +4215,13 @@ paths: type: object properties: amount: + description: amount is the supply of the 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. description: >- QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. @@ -4451,34 +4330,45 @@ paths: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs from the + previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. data: type: object properties: @@ -4549,6 +4439,7 @@ paths: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -4606,6 +4497,7 @@ paths: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -4694,38 +4586,51 @@ paths: last_commit_hash: type: string format: byte + description: >- + commit from validators from the last + block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs + from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte + title: original proposer of the block description: >- - Header defines the structure of a - Tendermint block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -4806,7 +4711,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -4830,7 +4735,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -4862,7 +4767,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -5205,34 +5110,45 @@ paths: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs from the + previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. data: type: object properties: @@ -5303,6 +5219,7 @@ paths: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -5360,6 +5277,7 @@ paths: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -5448,38 +5366,51 @@ paths: last_commit_hash: type: string format: byte + description: >- + commit from validators from the last + block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs + from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte + title: original proposer of the block description: >- - Header defines the structure of a - Tendermint block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -5560,7 +5491,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -5584,7 +5515,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -5616,7 +5547,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -7760,6 +7691,7 @@ paths: type: object properties: evidence: + description: evidence returns the requested evidence. type: object properties: '@type': @@ -7820,114 +7752,6 @@ paths: 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. @@ -9440,6 +9264,9 @@ paths: type: object properties: val_signing_info: + title: >- + val_signing_info is the signing info of requested val cons + address type: object properties: address: @@ -9489,9 +9316,6 @@ paths: 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 @@ -9585,6 +9409,7 @@ paths: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -9791,6 +9616,9 @@ paths: } parameters: - name: body + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. in: body required: true schema: @@ -10081,6 +9909,7 @@ paths: type: object properties: tx_response: + description: tx_response is the queried TxResponses. type: object properties: height: @@ -10167,6 +9996,7 @@ paths: format: int64 description: Amount of gas consumed by transaction. tx: + description: The request transaction bytes. type: object properties: '@type': @@ -10228,117 +10058,6 @@ paths: 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" - } timestamp: type: string description: >- @@ -10369,6 +10088,7 @@ paths: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -10395,11 +10115,6 @@ paths: Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The - - tags are stringified and the log is JSON decoded. description: |- BroadcastTxResponse is the response type for the Service.BroadcastTx method. @@ -10590,6 +10305,11 @@ paths: } parameters: - name: body + description: >- + BroadcastTxRequest is the request type for the + Service.BroadcastTxRequest + + RPC method. in: body required: true schema: @@ -11360,6 +11080,13 @@ paths: such as a git commit that validators could automatically upgrade to upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. + IBC upgrade logic has been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. type: object properties: '@type': @@ -11421,117 +11148,6 @@ paths: 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: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC @@ -12202,6 +11818,7 @@ paths: code_id: type: string format: uint64 + title: id for legacy support creator: type: string data_hash: @@ -12520,6 +12137,7 @@ paths: code_id: type: string format: uint64 + title: id for legacy support creator: type: string data_hash: @@ -12750,6 +12368,7 @@ paths: } parameters: - name: code_id + description: grpc-gateway_out does not support Go style CodID in: path required: true type: string @@ -12979,6 +12598,7 @@ paths: } parameters: - name: code_id + description: grpc-gateway_out does not support Go style CodID in: path required: true type: string @@ -13624,6 +13244,11 @@ paths: ibc_port_id: type: string extension: + description: >- + Extension is an extension point to store custom metadata + within the + + persistence model. type: object properties: '@type': @@ -13685,117 +13310,6 @@ paths: 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" - } title: ContractInfo stores a WASM contract instance title: >- QueryContractInfoResponse is the response type for the @@ -16196,6 +15710,7 @@ paths: type: string title: client identifier client_state: + title: client state type: object properties: '@type': @@ -16368,7 +15883,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -16621,6 +16135,7 @@ paths: type: object properties: consensus_state: + title: consensus state associated with the channel type: object properties: '@type': @@ -16789,7 +16304,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: consensus state associated with the channel client_id: type: string title: client ID associated with the consensus state @@ -19912,6 +19426,7 @@ paths: type: string title: client identifier client_state: + title: client state type: object properties: '@type': @@ -20086,7 +19601,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -20371,6 +19885,7 @@ paths: type: object properties: client_state: + title: client state associated with the request identifier type: object properties: '@type': @@ -20539,7 +20054,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state associated with the request identifier proof: type: string format: byte @@ -21031,6 +20545,7 @@ paths: gets reset consensus_state: + title: consensus state type: object properties: '@type': @@ -21205,7 +20720,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: consensus state description: >- ConsensusStateWithHeight defines a consensus state with an additional height @@ -21817,6 +21331,9 @@ paths: type: object properties: consensus_state: + title: >- + consensus state associated with the client identifier at the + given height type: object properties: '@type': @@ -21985,14 +21502,12 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - consensus state associated with the client identifier at the - given height proof: type: string format: byte title: merkle proof of existence proof_height: + title: height at which the proof was retrieved type: object properties: revision_number: @@ -22020,13 +21535,6 @@ paths: RevisionHeight gets reset - title: >- - Height is a monotonically increasing data type - - that can be compared against another Height for the purposes - of updating and - - freezing clients title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState @@ -22257,6 +21765,7 @@ paths: type: object properties: upgraded_client_state: + title: client state associated with the request identifier type: object properties: '@type': @@ -22425,7 +21934,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state associated with the request identifier description: |- QueryUpgradedClientStateResponse is the response type for the Query/UpgradedClientState RPC method. @@ -22627,6 +22135,7 @@ paths: type: object properties: upgraded_consensus_state: + title: Consensus state associated with the request identifier type: object properties: '@type': @@ -22795,7 +22304,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: Consensus state associated with the request identifier description: |- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method. @@ -23982,6 +23490,7 @@ paths: type: string title: client identifier client_state: + title: client state type: object properties: '@type': @@ -24154,7 +23663,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -24402,6 +23910,7 @@ paths: type: object properties: consensus_state: + title: consensus state associated with the channel type: object properties: '@type': @@ -24570,7 +24079,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: consensus state associated with the channel client_id: type: string title: client ID associated with the consensus state @@ -24795,68 +24303,360 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: connection_id - description: connection identifier - in: path - required: true - type: string - - name: revision_number - in: path - required: true - type: string - format: uint64 - - name: revision_height - in: path - required: true - type: string - format: uint64 + parameters: + - name: connection_id + description: connection identifier + in: path + required: true + type: string + - name: revision_number + in: path + required: true + type: string + format: uint64 + - name: revision_height + in: path + required: true + type: string + format: uint64 + tags: + - Query + /interchain_security/ccv/consumer/next-fee-distribution: + get: + summary: >- + ConsumerGenesis queries the genesis state needed to start a consumer + chain + + whose proposal has been accepted + operationId: InterchainSecurityCcvConsumerV1QueryNextFeeDistribution + responses: + '200': + description: A successful response. + schema: + type: object + properties: + data: + type: object + properties: + currentHeight: + type: string + format: int64 + title: current block height at the time of querying + lastHeight: + type: string + format: int64 + title: block height at which last distribution took place + nextHeight: + type: string + format: int64 + title: block height at which next distribution will take place + distribution_fraction: + type: string + title: ratio between consumer and provider fee distribution + total: + type: string + title: total accruead fees at the time of querying + toProvider: + type: string + title: amount distibuted to provider chain + toConsumer: + type: string + title: amount distributed (kept) by consumer chain + title: >- + NextFeeDistributionEstimate holds information about next fee + distribution + 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 + + 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" + } tags: - Query - /interchain_security/ccv/consumer/next-fee-distribution: + /interchain_security/ccv/consumer/params: get: - summary: >- - ConsumerGenesis queries the genesis state needed to start a consumer - chain - - whose proposal has been accepted - operationId: InterchainSecurityCcvConsumerV1QueryNextFeeDistribution + summary: QueryParams queries the ccv/consumer module parameters. + operationId: InterchainSecurityCcvConsumerV1QueryParams responses: '200': description: A successful response. schema: type: object properties: - data: + params: + description: params holds all the parameters of this module. type: object properties: - currentHeight: + enabled: + type: boolean + title: >- + TODO: Remove enabled flag and find a better way to setup + integration tests + + See: + https://github.com/cosmos/interchain-security/issues/339 + blocks_per_distribution_transmission: type: string format: int64 - title: current block height at the time of querying - lastHeight: + description: >- + ///////////////////// + + Distribution Params + + Number of blocks between ibc-token-transfers from the + consumer chain to + + the provider chain. Note that at this transmission event a + fraction of + + the accumulated tokens are divided and sent consumer + redistribution + + address. + distribution_transmission_channel: type: string - format: int64 - title: block height at which last distribution took place - nextHeight: + description: >- + Channel, and provider-chain receiving address to send + distribution token + + transfers over. These parameters is auto-set during the + consumer <-> + + provider handshake procedure. + provider_fee_pool_addr_str: type: string - format: int64 - title: block height at which next distribution will take place - distribution_fraction: + ccv_timeout_period: type: string - title: ratio between consumer and provider fee distribution - total: + title: >- + Sent CCV related IBC packets will timeout after this + duration + transfer_timeout_period: type: string - title: total accruead fees at the time of querying - toProvider: + title: >- + Sent transfer related IBC packets will timeout after this + duration + consumer_redistribution_fraction: type: string - title: amount distibuted to provider chain - toConsumer: + description: >- + The fraction of tokens allocated to the consumer + redistribution address + + during distribution events. The fraction is a string + representing a + + decimal number. For example "0.75" would represent 75%. + historical_entries: type: string - title: amount distributed (kept) by consumer chain - title: >- - NextFeeDistributionEstimate holds information about next fee - distribution + format: int64 + description: >- + The number of historical info entries to persist in store. + + This param is a part of the cosmos sdk staking module. In + the case of + + a ccv enabled consumer chain, the ccv module acts as the + staking module. + unbonding_period: + type: string + description: >- + Unbonding period for the consumer, + + which should be smaller than that of the provider in + general. + soft_opt_out_threshold: + type: string + title: >- + The threshold for the percentage of validators at the + bottom of the set who + + can opt out of running the consumer chain without being + punished. For example, a + + value of 0.05 means that the validators in the bottom 5% + of the set can opt out + title: Params defines the parameters for CCV consumer module + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. default: description: An unexpected error response. schema: @@ -25847,7 +25647,7 @@ paths: type: boolean title: >- TODO: Remove enabled flag and find a better way to - setup e2e tests + setup integration tests See: https://github.com/cosmos/interchain-security/issues/339 @@ -25921,13 +25721,27 @@ paths: which should be smaller than that of the provider in general. + soft_opt_out_threshold: + type: string + title: >- + The threshold for the percentage of validators at the + bottom of the set who + + can opt out of running the consumer chain without + being punished. For example, a + + value of 0.05 means that the validators in the bottom + 5% of the set can opt out title: Params defines the parameters for CCV consumer module provider_client_id: type: string + description: empty for a new chain, filled in on restart. provider_channel_id: type: string + description: empty for a new chain, filled in on restart. new_chain: type: boolean + description: true for new chain GenesisState, false for chain restart. provider_client_state: description: >- ProviderClientState filled in on new chain, nil on @@ -26050,7 +25864,11 @@ paths: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data + passed. Note this is an illegal argument + some places. + - BITCOIN: ripemd160(sha256(x)) prehash_key: type: string enum: @@ -26062,7 +25880,11 @@ paths: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data + passed. Note this is an illegal argument + some places. + - BITCOIN: ripemd160(sha256(x)) prehash_value: type: string enum: @@ -26074,7 +25896,11 @@ paths: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data + passed. Note this is an illegal argument + some places. + - BITCOIN: ripemd160(sha256(x)) length: type: string enum: @@ -26197,10 +26023,11 @@ paths: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' title: >- - hash is the algorithm that must be used for - each InnerOp + - NO_HASH: NO_HASH is the default if no data + passed. Note this is an illegal argument + some places. + - BITCOIN: ripemd160(sha256(x)) description: >- InnerSpec contains all store-specific structure info to determine if two proofs from a @@ -26429,9 +26256,11 @@ paths: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: >- PubKey pub_key = 2 [(gogoproto.nullable)=false]; @@ -26499,6 +26328,11 @@ paths: holding pools were transmitted to the provider chain + preCCV: + type: boolean + title: >- + flag indicating whether the consumer CCV module starts in + pre-CCV state title: GenesisState defines the CCV consumer chain genesis state default: description: An unexpected error response. @@ -26725,9 +26559,11 @@ paths: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -26991,10 +26827,12 @@ paths: given per replenish period this also serves as the max value for the meter. - last_full_time: + next_replenish_candidate: type: string format: date-time - title: last time the slash meter was full + title: >- + next time the slash meter could potentially be replenished, + iff it's not full packets: type: array items: @@ -27023,8 +26861,6 @@ paths: This field is used in the store key to ensure uniqueness. provider_val_cons_addr: - type: string - format: byte description: >- The provider's consensus address of the validator being slashed. @@ -27035,6 +26871,14 @@ paths: This field is not used in the store key, but is persisted in value bytes, see QueueGlobalSlashEntry. + type: object + properties: + address: + type: string + format: byte + title: >- + A validator's consensus address on the provider + chain description: >- A persisted queue entry indicating that a slash packet data instance needs to be handled. @@ -27050,9 +26894,11 @@ paths: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -28283,10 +28129,15 @@ paths: type: string title: >- Defines Neutron denom, which will be burned during fee - processing, any other denom will be sent to Treasury + processing, any + + other denom will be sent to Treasury + reserve_address: + type: string + title: Deprecated in v0.4.4. Is not used anymore treasury_address: type: string - title: Defines Treasury address + title: Defines treasury address description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -28630,10 +28481,12 @@ paths: format: uint64 description: >- Amount of tx hashes to be removed during a single - EndBlock. Can vary to balance + EndBlock. Can vary to - between network cleaning speed and EndBlock duration. A - zero value means no limit. + balance between network cleaning speed and EndBlock + duration. A zero value + + means no limit. description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -28885,6 +28738,14 @@ paths: type: object properties: next_block_header: + title: >- + We need to know block X+1 to verify response of + transaction for block X + + since LastResultsHash is root hash of all results from + the txs from the + + previous block type: object properties: '@type': @@ -29059,15 +28920,10 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + header: title: >- - We need to know block X+1 to verify response of + We need to know block X to verify inclusion of transaction for block X - - since LastResultsHash is root hash of all results from - the txs from the - - previous block - header: type: object properties: '@type': @@ -29242,9 +29098,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - We need to know block X to verify inclusion of - transaction for block X tx: type: object properties: @@ -29259,8 +29112,10 @@ paths: format: byte log: type: string + title: nondeterministic info: type: string + title: nondeterministic gas_wanted: type: string format: int64 @@ -29287,6 +29142,7 @@ paths: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -29299,6 +29155,7 @@ paths: Later, transactions may be queried using these events. + title: nondeterministic codespace: type: string delivery_proof: @@ -29925,16 +29782,6 @@ 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 /neutron/interchainqueries/registered_query: @@ -30965,6 +30812,9 @@ paths: type: object properties: denom_trace: + description: >- + denom_trace returns the requested denomination trace + information. type: object properties: path: @@ -30977,11 +30827,6 @@ paths: base_denom: 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 @@ -31503,6 +31348,26 @@ paths: params: description: params defines the parameters of the module. type: object + properties: + denom_creation_fee: + 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. + fee_collector_address: + type: string title: Params holds parameters for the tokenfactory module description: >- QueryParamsResponse is the response type for the Query/Params RPC @@ -32449,6 +32314,7 @@ definitions: type: object properties: account: + description: account defines the account of the corresponding address. type: object properties: '@type': @@ -32504,107 +32370,6 @@ definitions: 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: >- QueryAccountResponse is the response type for the Query/Account RPC method. @@ -34242,17 +34007,13 @@ definitions: type: object properties: balance: + description: balance is the balance of the 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. description: >- QueryBalanceResponse is the response type for the Query/Balance RPC method. @@ -34260,6 +34021,9 @@ definitions: type: object properties: metadata: + description: >- + metadata describes and provides all the client information for the + requested token. type: object properties: description: @@ -34322,9 +34086,6 @@ definitions: 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 @@ -34498,17 +34259,13 @@ definitions: type: object properties: amount: + description: amount is the supply of the 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. description: >- QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. @@ -34638,34 +34395,43 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. data: type: object properties: @@ -34733,6 +34499,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -34790,6 +34557,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -34878,38 +34646,51 @@ definitions: last_commit_hash: type: string format: byte + description: >- + commit from validators from the last + block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs + from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte + title: original proposer of the block description: >- - Header defines the structure of a Tendermint - block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -34989,7 +34770,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -35013,7 +34794,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -35045,7 +34826,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -35189,34 +34970,43 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. data: type: object properties: @@ -35284,6 +35074,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -35341,6 +35132,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -35429,38 +35221,51 @@ definitions: last_commit_hash: type: string format: byte + description: >- + commit from validators from the last + block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs + from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte + title: original proposer of the block description: >- - Header defines the structure of a Tendermint - block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -35540,7 +35345,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -35564,7 +35369,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -35596,7 +35401,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -36392,7 +36197,7 @@ definitions: secp256k1: type: string format: byte - title: PublicKey defines the keys available for use with Tendermint Validators + title: PublicKey defines the keys available for use with Validators tendermint.p2p.DefaultNodeInfo: type: object properties: @@ -36499,34 +36304,43 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. data: type: object properties: @@ -36594,6 +36408,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -36651,6 +36466,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -36738,38 +36554,47 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs from + the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: >- - Header defines the structure of a Tendermint - block header. + title: original proposer of the block + description: Header defines the structure of a block header. commit: type: object properties: @@ -36849,7 +36674,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -36873,7 +36698,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -36905,7 +36730,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -37133,6 +36958,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -37189,6 +37015,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -37263,6 +37090,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -37319,6 +37147,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -37406,34 +37235,45 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs from the + previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. commit: type: object properties: @@ -37513,7 +37353,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -37537,7 +37377,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -37567,9 +37407,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -37636,6 +37474,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -37693,6 +37532,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -37780,36 +37620,45 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs from the + previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: >- - Header defines the structure of a Tendermint block - header. + title: original proposer of the block + description: Header defines the structure of a block header. commit: type: object properties: @@ -37889,7 +37738,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -37913,7 +37762,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -37945,7 +37794,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -38010,34 +37859,43 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. tendermint.types.LightBlock: type: object properties: @@ -38093,34 +37951,43 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. commit: type: object properties: @@ -38194,9 +38061,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -38218,9 +38083,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -38288,34 +38151,45 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs from the previous + block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. commit: type: object properties: @@ -38393,7 +38267,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -38417,7 +38291,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -38447,9 +38321,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -38527,34 +38399,43 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. commit: type: object properties: @@ -38636,9 +38517,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -38665,9 +38544,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -38689,9 +38566,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -38740,6 +38615,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -38976,6 +38852,7 @@ definitions: type: object properties: evidence: + description: evidence returns the requested evidence. type: object properties: '@type': @@ -39031,107 +38908,6 @@ definitions: 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. @@ -39576,6 +39352,7 @@ definitions: type: object properties: val_signing_info: + title: val_signing_info is the signing info of requested val cons address type: object properties: address: @@ -39622,7 +39399,6 @@ definitions: 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 @@ -39853,6 +39629,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -39974,6 +39751,7 @@ definitions: format: int64 description: Amount of gas consumed by transaction. tx: + description: The request transaction bytes. type: object properties: '@type': @@ -40029,107 +39807,6 @@ definitions: 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" - } timestamp: type: string description: >- @@ -40160,6 +39837,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -40240,6 +39918,7 @@ definitions: signer_infos: type: array items: + type: object $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' description: >- signer_infos defines the signing modes for the required signers. The @@ -40367,6 +40046,7 @@ definitions: type: object properties: tx_response: + description: tx_response is the queried TxResponses. type: object properties: height: @@ -40451,6 +40131,7 @@ definitions: format: int64 description: Amount of gas consumed by transaction. tx: + description: The request transaction bytes. type: object properties: '@type': @@ -40509,110 +40190,6 @@ definitions: 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" - } timestamp: type: string description: >- @@ -40643,6 +40220,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -40668,11 +40246,6 @@ definitions: Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The - - tags are stringified and the log is JSON decoded. description: |- BroadcastTxResponse is the response type for the Service.BroadcastTx method. @@ -40736,6 +40309,7 @@ definitions: txs: type: array items: + type: object $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: txs are the transactions in the block. block_id: @@ -40807,34 +40381,43 @@ definitions: last_commit_hash: type: string format: byte + description: commit from validators from the last block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: root hash of all results from the txs from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte - description: Header defines the structure of a Tendermint block header. + title: original proposer of the block + description: Header defines the structure of a block header. data: type: object properties: @@ -40902,6 +40485,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -40959,6 +40543,7 @@ definitions: format: byte title: PartsetHeader title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time @@ -41047,38 +40632,51 @@ definitions: last_commit_hash: type: string format: byte + description: >- + commit from validators from the last + block title: hashes of block data data_hash: type: string format: byte + title: transactions validators_hash: type: string format: byte + description: validators for the current block title: >- hashes from the app output from the prev block next_validators_hash: type: string format: byte + title: validators for the next block consensus_hash: type: string format: byte + title: consensus params for current block app_hash: type: string format: byte + title: state after txs from the previous block last_results_hash: type: string format: byte + title: >- + root hash of all results from the txs + from the previous block evidence_hash: type: string format: byte + description: evidence included in the block title: consensus info proposer_address: type: string format: byte + title: original proposer of the block description: >- - Header defines the structure of a Tendermint - block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -41158,7 +40756,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -41182,7 +40780,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -41214,7 +40812,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -41314,6 +40912,7 @@ definitions: $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: tx is the queried transaction. tx_response: + description: tx_response is the queried TxResponses. type: object properties: height: @@ -41398,6 +40997,7 @@ definitions: format: int64 description: Amount of gas consumed by transaction. tx: + description: The request transaction bytes. type: object properties: '@type': @@ -41456,110 +41056,6 @@ definitions: 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" - } timestamp: type: string description: >- @@ -41590,6 +41086,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -41615,11 +41112,6 @@ definitions: Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The - - tags are stringified and the log is JSON decoded. description: GetTxResponse is the response type for the Service.GetTx method. cosmos.tx.v1beta1.GetTxsEventResponse: type: object @@ -41627,6 +41119,7 @@ definitions: txs: type: array items: + type: object $ref: '#/definitions/cosmos.tx.v1beta1.Tx' description: txs is the list of queried transactions. tx_responses: @@ -41716,6 +41209,7 @@ definitions: format: int64 description: Amount of gas consumed by transaction. tx: + description: The request transaction bytes. type: object properties: '@type': @@ -41776,112 +41270,6 @@ definitions: 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" - } timestamp: type: string description: >- @@ -41912,6 +41300,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -42043,6 +41432,7 @@ definitions: mode_infos: type: array items: + type: object $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' title: |- mode_infos is the corresponding modes of the signers of the multisig @@ -42113,6 +41503,14 @@ definitions: type: object properties: public_key: + description: >- + public_key is the public key of the signer. It is optional for + accounts + + that already exist in state. If unset, the verifier can use the + required \ + + signer address for this position and lookup the public key. type: object properties: '@type': @@ -42168,107 +41566,6 @@ definitions: 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" - } mode_info: $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' title: |- @@ -42360,6 +41657,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -43518,6 +42816,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to @@ -43537,6 +42836,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: EventAttribute is a single key-value pair, associated with an event. cosmos.upgrade.v1beta1.ModuleVersion: type: object @@ -43597,6 +42897,13 @@ definitions: Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade + logic has been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. type: object properties: '@type': @@ -43652,107 +42959,6 @@ definitions: 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: >- Plan specifies information about a planned upgrade and when it should occur. @@ -43821,6 +43027,13 @@ definitions: such as a git commit that validators could automatically upgrade to upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. IBC + upgrade logic has been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. type: object properties: '@type': @@ -43879,110 +43092,6 @@ definitions: 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: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC @@ -44108,6 +43217,7 @@ definitions: code_id: type: string format: uint64 + title: id for legacy support creator: type: string data_hash: @@ -44238,6 +43348,9 @@ definitions: ibc_port_id: type: string extension: + description: |- + Extension is an extension point to store custom metadata within the + persistence model. type: object properties: '@type': @@ -44293,107 +43406,6 @@ definitions: 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" - } title: ContractInfo stores a WASM contract instance cosmwasm.wasm.v1.Model: type: object @@ -44465,6 +43477,9 @@ definitions: cosmwasm.wasm.v1.MsgUpdateAdminResponse: type: object title: MsgUpdateAdminResponse returns empty data + cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse: + type: object + title: MsgUpdateInstantiateConfigResponse returns empty data cosmwasm.wasm.v1.Params: type: object properties: @@ -44565,6 +43580,7 @@ definitions: code_id: type: string format: uint64 + title: id for legacy support creator: type: string data_hash: @@ -44617,6 +43633,7 @@ definitions: code_id: type: string format: uint64 + title: id for legacy support creator: type: string data_hash: @@ -44785,6 +43802,11 @@ definitions: ibc_port_id: type: string extension: + description: >- + Extension is an extension point to store custom metadata within + the + + persistence model. type: object properties: '@type': @@ -44843,110 +43865,6 @@ definitions: 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" - } title: ContractInfo stores a WASM contract instance title: >- QueryContractInfoResponse is the response type for the Query/ContractInfo @@ -45538,6 +44456,7 @@ definitions: type: string title: client identifier client_state: + title: client state type: object properties: '@type': @@ -45700,7 +44619,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: |- IdentifiedClientState defines a client state with an additional client identifier field. @@ -45743,6 +44661,7 @@ definitions: type: object properties: consensus_state: + title: consensus state associated with the channel type: object properties: '@type': @@ -45899,7 +44818,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: consensus state associated with the channel client_id: type: string title: client ID associated with the consensus state @@ -46817,198 +45735,7 @@ definitions: type: string title: client identifier client_state: - 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" - } title: client state - description: |- - IdentifiedClientState defines a client state with an additional client - identifier field. - ibc.core.client.v1.ConsensusStateWithHeight: - type: object - properties: - height: - title: consensus state height - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height while - keeping - - RevisionNumber the same. However some consensus algorithms may choose - to - - reset the height in certain conditions e.g. hard forks, state-machine - - breaking changes In these cases, the RevisionNumber is incremented so - that - - height continues to be monitonically increasing even as the - RevisionHeight - - gets reset - consensus_state: type: object properties: '@type': @@ -47165,7 +45892,198 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + description: |- + IdentifiedClientState defines a client state with an additional client + identifier field. + ibc.core.client.v1.ConsensusStateWithHeight: + type: object + properties: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + consensus_state: title: consensus state + 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: >- ConsensusStateWithHeight defines a consensus state with an additional height @@ -47215,6 +46133,7 @@ definitions: type: object properties: client_state: + title: client state associated with the request identifier type: object properties: '@type': @@ -47371,7 +46290,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state associated with the request identifier proof: type: string format: byte @@ -47423,6 +46341,7 @@ definitions: type: string title: client identifier client_state: + title: client state type: object properties: '@type': @@ -47589,7 +46508,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -47711,6 +46629,9 @@ definitions: type: object properties: consensus_state: + title: >- + consensus state associated with the client identifier at the given + height type: object properties: '@type': @@ -47867,14 +46788,12 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - consensus state associated with the client identifier at the given - height proof: type: string format: byte title: merkle proof of existence proof_height: + title: height at which the proof was retrieved type: object properties: revision_number: @@ -47901,13 +46820,6 @@ definitions: RevisionHeight gets reset - title: >- - Height is a monotonically increasing data type - - that can be compared against another Height for the purposes of - updating and - - freezing clients title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState @@ -47951,6 +46863,7 @@ definitions: gets reset consensus_state: + title: consensus state type: object properties: '@type': @@ -48117,7 +47030,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: consensus state description: >- ConsensusStateWithHeight defines a consensus state with an additional height @@ -48157,6 +47069,7 @@ definitions: type: object properties: upgraded_client_state: + title: client state associated with the request identifier type: object properties: '@type': @@ -48313,7 +47226,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state associated with the request identifier description: |- QueryUpgradedClientStateResponse is the response type for the Query/UpgradedClientState RPC method. @@ -48321,6 +47233,7 @@ definitions: type: object properties: upgraded_consensus_state: + title: Consensus state associated with the request identifier type: object properties: '@type': @@ -48477,7 +47390,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: Consensus state associated with the request identifier description: |- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method. @@ -48764,6 +47676,7 @@ definitions: type: string title: client identifier client_state: + title: client state type: object properties: '@type': @@ -48926,7 +47839,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: |- IdentifiedClientState defines a client state with an additional client identifier field. @@ -48969,6 +47881,7 @@ definitions: type: object properties: consensus_state: + title: consensus state associated with the channel type: object properties: '@type': @@ -49125,7 +48038,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: consensus state associated with the channel client_id: type: string title: client ID associated with the consensus state @@ -49501,6 +48413,85 @@ definitions: type: string title: amount distributed (kept) by consumer chain title: NextFeeDistributionEstimate holds information about next fee distribution + interchain_security.ccv.consumer.v1.Params: + type: object + properties: + enabled: + type: boolean + title: >- + TODO: Remove enabled flag and find a better way to setup integration + tests + + See: https://github.com/cosmos/interchain-security/issues/339 + blocks_per_distribution_transmission: + type: string + format: int64 + description: >- + ///////////////////// + + Distribution Params + + Number of blocks between ibc-token-transfers from the consumer chain + to + + the provider chain. Note that at this transmission event a fraction of + + the accumulated tokens are divided and sent consumer redistribution + + address. + distribution_transmission_channel: + type: string + description: >- + Channel, and provider-chain receiving address to send distribution + token + + transfers over. These parameters is auto-set during the consumer <-> + + provider handshake procedure. + provider_fee_pool_addr_str: + type: string + ccv_timeout_period: + type: string + title: Sent CCV related IBC packets will timeout after this duration + transfer_timeout_period: + type: string + title: Sent transfer related IBC packets will timeout after this duration + consumer_redistribution_fraction: + type: string + description: >- + The fraction of tokens allocated to the consumer redistribution + address + + during distribution events. The fraction is a string representing a + + decimal number. For example "0.75" would represent 75%. + historical_entries: + type: string + format: int64 + description: >- + The number of historical info entries to persist in store. + + This param is a part of the cosmos sdk staking module. In the case of + + a ccv enabled consumer chain, the ccv module acts as the staking + module. + unbonding_period: + type: string + description: |- + Unbonding period for the consumer, + which should be smaller than that of the provider in general. + soft_opt_out_threshold: + type: string + title: >- + The threshold for the percentage of validators at the bottom of the + set who + + can opt out of running the consumer chain without being punished. For + example, a + + value of 0.05 means that the validators in the bottom 5% of the set + can opt out + title: Params defines the parameters for CCV consumer module interchain_security.ccv.consumer.v1.QueryNextFeeDistributionEstimateResponse: type: object properties: @@ -49534,6 +48525,95 @@ definitions: title: >- NextFeeDistributionEstimate holds information about next fee distribution + interchain_security.ccv.consumer.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + enabled: + type: boolean + title: >- + TODO: Remove enabled flag and find a better way to setup + integration tests + + See: https://github.com/cosmos/interchain-security/issues/339 + blocks_per_distribution_transmission: + type: string + format: int64 + description: >- + ///////////////////// + + Distribution Params + + Number of blocks between ibc-token-transfers from the consumer + chain to + + the provider chain. Note that at this transmission event a + fraction of + + the accumulated tokens are divided and sent consumer + redistribution + + address. + distribution_transmission_channel: + type: string + description: >- + Channel, and provider-chain receiving address to send distribution + token + + transfers over. These parameters is auto-set during the consumer + <-> + + provider handshake procedure. + provider_fee_pool_addr_str: + type: string + ccv_timeout_period: + type: string + title: Sent CCV related IBC packets will timeout after this duration + transfer_timeout_period: + type: string + title: Sent transfer related IBC packets will timeout after this duration + consumer_redistribution_fraction: + type: string + description: >- + The fraction of tokens allocated to the consumer redistribution + address + + during distribution events. The fraction is a string representing + a + + decimal number. For example "0.75" would represent 75%. + historical_entries: + type: string + format: int64 + description: >- + The number of historical info entries to persist in store. + + This param is a part of the cosmos sdk staking module. In the case + of + + a ccv enabled consumer chain, the ccv module acts as the staking + module. + unbonding_period: + type: string + description: |- + Unbonding period for the consumer, + which should be smaller than that of the provider in general. + soft_opt_out_threshold: + type: string + title: >- + The threshold for the percentage of validators at the bottom of + the set who + + can opt out of running the consumer chain without being punished. + For example, a + + value of 0.05 means that the validators in the bottom 5% of the + set can opt out + title: Params defines the parameters for CCV consumer module + description: QueryParamsResponse is response type for the Query/Params RPC method. cosmos.staking.v1beta1.InfractionType: type: string enum: @@ -49669,7 +48749,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note + this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_key: type: string enum: @@ -49681,7 +48764,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note + this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_value: type: string enum: @@ -49693,7 +48779,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note + this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) length: type: string enum: @@ -49810,8 +48899,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' - title: hash is the algorithm that must be used for each InnerOp + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note + this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) description: >- InnerSpec contains all store-specific structure info to determine if two proofs from a @@ -49952,7 +49043,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is an + illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) ics23.InnerSpec: type: object properties: @@ -49991,8 +49085,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' - title: hash is the algorithm that must be used for each InnerOp + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is an + illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) description: >- InnerSpec contains all store-specific structure info to determine if two proofs from a @@ -50022,7 +49118,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is an + illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_key: type: string enum: @@ -50034,7 +49133,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is an + illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_value: type: string enum: @@ -50046,7 +49148,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is an + illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) length: type: string enum: @@ -50168,7 +49273,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is + an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_key: type: string enum: @@ -50180,7 +49288,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is + an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_value: type: string enum: @@ -50192,7 +49303,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is + an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) length: type: string enum: @@ -50307,8 +49421,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' - title: hash is the algorithm that must be used for each InnerOp + title: >- + - NO_HASH: NO_HASH is the default if no data passed. Note this is + an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) description: >- InnerSpec contains all store-specific structure info to determine if two proofs from a @@ -50366,8 +49482,10 @@ definitions: properties: enabled: type: boolean - title: |- - TODO: Remove enabled flag and find a better way to setup e2e tests + title: >- + TODO: Remove enabled flag and find a better way to setup + integration tests + See: https://github.com/cosmos/interchain-security/issues/339 blocks_per_distribution_transmission: type: string @@ -50431,13 +49549,27 @@ definitions: description: |- Unbonding period for the consumer, which should be smaller than that of the provider in general. + soft_opt_out_threshold: + type: string + title: >- + The threshold for the percentage of validators at the bottom of + the set who + + can opt out of running the consumer chain without being punished. + For example, a + + value of 0.05 means that the validators in the bottom 5% of the + set can opt out title: Params defines the parameters for CCV consumer module provider_client_id: type: string + description: empty for a new chain, filled in on restart. provider_channel_id: type: string + description: empty for a new chain, filled in on restart. new_chain: type: boolean + description: true for new chain GenesisState, false for chain restart. provider_client_state: description: ProviderClientState filled in on new chain, nil on restart. type: object @@ -50554,7 +49686,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. + Note this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_key: type: string enum: @@ -50566,7 +49701,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. + Note this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_value: type: string enum: @@ -50578,7 +49716,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. + Note this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) length: type: string enum: @@ -50697,8 +49838,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' - title: hash is the algorithm that must be used for each InnerOp + title: >- + - NO_HASH: NO_HASH is the default if no data passed. + Note this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) description: >- InnerSpec contains all store-specific structure info to determine if two proofs from a @@ -50913,9 +50056,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -50973,6 +50118,11 @@ definitions: title: |- LastTransmissionBlockHeight is the last time validator holding pools were transmitted to the provider chain + preCCV: + type: boolean + title: >- + flag indicating whether the consumer CCV module starts in pre-CCV + state title: GenesisState defines the CCV consumer chain genesis state interchain_security.ccv.consumer.v1.HeightToValsetUpdateID: type: object @@ -51013,72 +50163,6 @@ definitions: description: |- OutstandingDowntime defines the genesis information for each validator flagged with an outstanding downtime slashing. - interchain_security.ccv.consumer.v1.Params: - type: object - properties: - enabled: - type: boolean - title: |- - TODO: Remove enabled flag and find a better way to setup e2e tests - See: https://github.com/cosmos/interchain-security/issues/339 - blocks_per_distribution_transmission: - type: string - format: int64 - description: >- - ///////////////////// - - Distribution Params - - Number of blocks between ibc-token-transfers from the consumer chain - to - - the provider chain. Note that at this transmission event a fraction of - - the accumulated tokens are divided and sent consumer redistribution - - address. - distribution_transmission_channel: - type: string - description: >- - Channel, and provider-chain receiving address to send distribution - token - - transfers over. These parameters is auto-set during the consumer <-> - - provider handshake procedure. - provider_fee_pool_addr_str: - type: string - ccv_timeout_period: - type: string - title: Sent CCV related IBC packets will timeout after this duration - transfer_timeout_period: - type: string - title: Sent transfer related IBC packets will timeout after this duration - consumer_redistribution_fraction: - type: string - description: >- - The fraction of tokens allocated to the consumer redistribution - address - - during distribution events. The fraction is a string representing a - - decimal number. For example "0.75" would represent 75%. - historical_entries: - type: string - format: int64 - description: >- - The number of historical info entries to persist in store. - - This param is a part of the cosmos sdk staking module. In the case of - - a ccv enabled consumer chain, the ccv module acts as the staking - module. - unbonding_period: - type: string - description: |- - Unbonding period for the consumer, - which should be smaller than that of the provider in general. - title: Params defines the parameters for CCV consumer module interchain_security.ccv.provider.v1.Chain: type: object properties: @@ -51410,8 +50494,6 @@ definitions: The IBC sequence number of the recv packet. This field is used in the store key to ensure uniqueness. provider_val_cons_addr: - type: string - format: byte description: >- The provider's consensus address of the validator being slashed. @@ -51420,6 +50502,12 @@ definitions: This field is not used in the store key, but is persisted in value bytes, see QueueGlobalSlashEntry. + type: object + properties: + address: + type: string + format: byte + title: A validator's consensus address on the provider chain description: >- A persisted queue entry indicating that a slash packet data instance needs to be handled. @@ -51428,6 +50516,13 @@ definitions: handling times between consumers. interchain_security.ccv.provider.v1.MsgAssignConsumerKeyResponse: type: object + interchain_security.ccv.provider.v1.ProviderConsAddress: + type: object + properties: + address: + type: string + format: byte + title: A validator's consensus address on the provider chain interchain_security.ccv.provider.v1.QueryConsumerChainStartProposalsResponse: type: object properties: @@ -51627,8 +50722,8 @@ definitions: enabled: type: boolean title: >- - TODO: Remove enabled flag and find a better way to setup e2e - tests + TODO: Remove enabled flag and find a better way to setup + integration tests See: https://github.com/cosmos/interchain-security/issues/339 blocks_per_distribution_transmission: @@ -51695,13 +50790,27 @@ definitions: description: |- Unbonding period for the consumer, which should be smaller than that of the provider in general. + soft_opt_out_threshold: + type: string + title: >- + The threshold for the percentage of validators at the bottom + of the set who + + can opt out of running the consumer chain without being + punished. For example, a + + value of 0.05 means that the validators in the bottom 5% of + the set can opt out title: Params defines the parameters for CCV consumer module provider_client_id: type: string + description: empty for a new chain, filled in on restart. provider_channel_id: type: string + description: empty for a new chain, filled in on restart. new_chain: type: boolean + description: true for new chain GenesisState, false for chain restart. provider_client_state: description: ProviderClientState filled in on new chain, nil on restart. type: object @@ -51820,7 +50929,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. + Note this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_key: type: string enum: @@ -51832,7 +50944,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. + Note this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) prehash_value: type: string enum: @@ -51844,7 +50959,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' + title: >- + - NO_HASH: NO_HASH is the default if no data passed. + Note this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) length: type: string enum: @@ -51963,10 +51081,10 @@ definitions: - BITCOIN - SHA512_256 default: NO_HASH - description: ' - NO_HASH: NO_HASH is the default if no data passed. Note this is an illegal argument some places.' title: >- - hash is the algorithm that must be used for each - InnerOp + - NO_HASH: NO_HASH is the default if no data passed. + Note this is an illegal argument some places. + - BITCOIN: ripemd160(sha256(x)) description: >- InnerSpec contains all store-specific structure info to determine if two proofs from a @@ -52185,9 +51303,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -52247,6 +51367,11 @@ definitions: title: |- LastTransmissionBlockHeight is the last time validator holding pools were transmitted to the provider chain + preCCV: + type: boolean + title: >- + flag indicating whether the consumer CCV module starts in pre-CCV + state title: GenesisState defines the CCV consumer chain genesis state interchain_security.ccv.provider.v1.QueryThrottleStateResponse: type: object @@ -52263,10 +51388,12 @@ definitions: per replenish period this also serves as the max value for the meter. - last_full_time: + next_replenish_candidate: type: string format: date-time - title: last time the slash meter was full + title: >- + next time the slash meter could potentially be replenished, iff it's + not full packets: type: array items: @@ -52291,8 +51418,6 @@ definitions: The IBC sequence number of the recv packet. This field is used in the store key to ensure uniqueness. provider_val_cons_addr: - type: string - format: byte description: >- The provider's consensus address of the validator being slashed. @@ -52303,6 +51428,12 @@ definitions: This field is not used in the store key, but is persisted in value bytes, see QueueGlobalSlashEntry. + type: object + properties: + address: + type: string + format: byte + title: A validator's consensus address on the provider chain description: >- A persisted queue entry indicating that a slash packet data instance needs to be handled. @@ -52318,9 +51449,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -52378,9 +51511,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -52452,9 +51587,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -52516,8 +51653,6 @@ definitions: The IBC sequence number of the recv packet. This field is used in the store key to ensure uniqueness. provider_val_cons_addr: - type: string - format: byte description: >- The provider's consensus address of the validator being slashed. @@ -52527,6 +51662,12 @@ definitions: This field is not used in the store key, but is persisted in value bytes, see QueueGlobalSlashEntry. + type: object + properties: + address: + type: string + format: byte + title: A validator's consensus address on the provider chain description: >- A persisted queue entry indicating that a slash packet data instance needs to be handled. @@ -52542,9 +51683,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -52600,9 +51743,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -52671,9 +51816,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -52742,9 +51889,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator valset_update_id: @@ -52785,9 +51934,11 @@ definitions: address: type: string format: byte + title: The first 20 bytes of SHA256(public key) power: type: string format: int64 + description: The voting power title: PubKey pub_key = 2 [(gogoproto.nullable)=false]; title: Validator tendermint.abci.ValidatorUpdate: @@ -53047,12 +52198,15 @@ definitions: properties: neutron_denom: type: string - title: >- + title: |- Defines Neutron denom, which will be burned during fee processing, any other denom will be sent to Treasury + reserve_address: + type: string + title: Deprecated in v0.4.4. Is not used anymore treasury_address: type: string - title: Defines Treasury address + title: Defines treasury address description: Params defines the parameters for the module. neutron.feeburner.QueryParamsResponse: type: object @@ -53065,10 +52219,15 @@ definitions: type: string title: >- Defines Neutron denom, which will be burned during fee processing, - any other denom will be sent to Treasury + any + + other denom will be sent to Treasury + reserve_address: + type: string + title: Deprecated in v0.4.4. Is not used anymore treasury_address: type: string - title: Defines Treasury address + title: Defines treasury address description: QueryParamsResponse is response type for the Query/Params RPC method. neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse: type: object @@ -53451,6 +52610,14 @@ definitions: type: object properties: next_block_header: + title: >- + We need to know block X+1 to verify response of transaction for block + X + + since LastResultsHash is root hash of all results from the txs from + the + + previous block type: object properties: '@type': @@ -53607,15 +52774,8 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - We need to know block X+1 to verify response of transaction for block - X - - since LastResultsHash is root hash of all results from the txs from - the - - previous block header: + title: We need to know block X to verify inclusion of transaction for block X type: object properties: '@type': @@ -53772,7 +52932,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: We need to know block X to verify inclusion of transaction for block X tx: type: object properties: @@ -53787,8 +52946,10 @@ definitions: format: byte log: type: string + title: nondeterministic info: type: string + title: nondeterministic gas_wanted: type: string format: int64 @@ -53815,6 +52976,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -53826,6 +52988,7 @@ definitions: ResponseDeliverTx. Later, transactions may be queried using these events. + title: nondeterministic codespace: type: string delivery_proof: @@ -53931,9 +53094,11 @@ definitions: format: uint64 description: >- Amount of tx hashes to be removed during a single EndBlock. Can vary - to balance + to + + balance between network cleaning speed and EndBlock duration. A zero + value - between network cleaning speed and EndBlock duration. A zero value means no limit. description: Params defines the parameters for the module. neutron.interchainqueries.QueryLastRemoteHeightResponse: @@ -53980,9 +53145,11 @@ definitions: format: uint64 description: >- Amount of tx hashes to be removed during a single EndBlock. Can - vary to balance + vary to + + balance between network cleaning speed and EndBlock duration. A + zero value - between network cleaning speed and EndBlock duration. A zero value means no limit. description: QueryParamsResponse is response type for the Query/Params RPC method. neutron.interchainqueries.QueryRegisteredQueriesResponse: @@ -54259,6 +53426,14 @@ definitions: type: object properties: next_block_header: + title: >- + We need to know block X+1 to verify response of transaction + for block X + + since LastResultsHash is root hash of all results from the txs + from the + + previous block type: object properties: '@type': @@ -54427,15 +53602,10 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - We need to know block X+1 to verify response of transaction - for block X - - since LastResultsHash is root hash of all results from the txs - from the - - previous block header: + title: >- + We need to know block X to verify inclusion of transaction for + block X type: object properties: '@type': @@ -54604,9 +53774,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - We need to know block X to verify inclusion of transaction for - block X tx: type: object properties: @@ -54621,8 +53788,10 @@ definitions: format: byte log: type: string + title: nondeterministic info: type: string + title: nondeterministic gas_wanted: type: string format: int64 @@ -54649,6 +53818,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -54661,6 +53831,7 @@ definitions: Later, transactions may be queried using these events. + title: nondeterministic codespace: type: string delivery_proof: @@ -54771,6 +53942,14 @@ definitions: type: object properties: next_block_header: + title: >- + We need to know block X+1 to verify response of transaction for + block X + + since LastResultsHash is root hash of all results from the txs + from the + + previous block type: object properties: '@type': @@ -54933,15 +54112,10 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + header: title: >- - We need to know block X+1 to verify response of transaction for + We need to know block X to verify inclusion of transaction for block X - - since LastResultsHash is root hash of all results from the txs - from the - - previous block - header: type: object properties: '@type': @@ -55104,9 +54278,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - We need to know block X to verify inclusion of transaction for - block X tx: type: object properties: @@ -55121,8 +54292,10 @@ definitions: format: byte log: type: string + title: nondeterministic info: type: string + title: nondeterministic gas_wanted: type: string format: int64 @@ -55149,6 +54322,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -55160,6 +54334,7 @@ definitions: and ResponseDeliverTx. Later, transactions may be queried using these events. + title: nondeterministic codespace: type: string delivery_proof: @@ -55355,8 +54530,10 @@ definitions: format: byte log: type: string + title: nondeterministic info: type: string + title: nondeterministic gas_wanted: type: string format: int64 @@ -55383,6 +54560,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -55394,6 +54572,7 @@ definitions: ResponseDeliverTx. Later, transactions may be queried using these events. + title: nondeterministic codespace: type: string delivery_proof: @@ -55455,8 +54634,10 @@ definitions: format: byte log: type: string + title: nondeterministic info: type: string + title: nondeterministic gas_wanted: type: string format: int64 @@ -55483,6 +54664,7 @@ definitions: format: byte index: type: boolean + title: nondeterministic description: >- EventAttribute is a single key-value pair, associated with an event. @@ -55494,6 +54676,7 @@ definitions: ResponseDeliverTx. Later, transactions may be queried using these events. + title: nondeterministic codespace: type: string tendermint.crypto.Proof: @@ -55649,6 +54832,7 @@ definitions: type: object properties: denom_trace: + description: denom_trace returns the requested denomination trace information. type: object properties: path: @@ -55661,11 +54845,6 @@ definitions: base_denom: 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. @@ -55777,6 +54956,23 @@ definitions: type: object osmosis.tokenfactory.v1beta1.Params: type: object + properties: + denom_creation_fee: + 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. + fee_collector_address: + type: string title: Params holds parameters for the tokenfactory module osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse: type: object @@ -55808,6 +55004,26 @@ definitions: params: description: params defines the parameters of the module. type: object + properties: + denom_creation_fee: + 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. + fee_collector_address: + type: string title: Params holds parameters for the tokenfactory module description: QueryParamsResponse is the response type for the Query/Params RPC method. router.v1.Params: diff --git a/go.mod b/go.mod index 2e6eae592..79c4718d4 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/armon/go-metrics v0.4.1 github.com/confio/ics23/go v0.9.0 github.com/cosmos/admin-module v0.0.0-00010101000000-000000000000 + github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.45.15 github.com/cosmos/ibc-go/v4 v4.3.0 github.com/cosmos/interchain-security v1.0.1-0.20230419165046-6089b6121c33 @@ -18,7 +19,6 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.14.0 - github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.7.0 github.com/strangelove-ventures/packet-forward-middleware/v4 v4.0.5 @@ -55,7 +55,6 @@ require ( github.com/cometbft/cometbft-db v0.7.0 // indirect github.com/cosmos/btcutil v1.0.4 // indirect github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogoproto v1.4.6 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect @@ -75,6 +74,7 @@ require ( github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/getsentry/sentry-go v0.17.0 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect @@ -89,6 +89,7 @@ require ( github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect @@ -125,6 +126,7 @@ require ( github.com/prometheus/procfs v0.8.0 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/rs/cors v1.8.2 // indirect github.com/rs/zerolog v1.27.0 // indirect @@ -137,7 +139,6 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tendermint/spm v0.1.9 // indirect github.com/tidwall/btree v1.5.0 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect diff --git a/go.sum b/go.sum index de06070ec..aa7deae19 100644 --- a/go.sum +++ b/go.sum @@ -1001,8 +1001,6 @@ github.com/cosmos/ibc-go/v4 v4.3.0/go.mod h1:CcLvIoi9NNtIbNsxs4KjBGjYhlwqtsmXy1A github.com/cosmos/interchain-accounts v0.2.6 h1:TV2M2g1/Rb9MCNw1YePdBKE0rcEczNj1RGHT+2iRYas= github.com/cosmos/interchain-security v1.0.1-0.20230419165046-6089b6121c33 h1:gGeyeocVM771mWQUngG+INMnZLRn04xtTP8eHUKv8Fs= github.com/cosmos/interchain-security v1.0.1-0.20230419165046-6089b6121c33/go.mod h1:ux46JqLoUfPq7FKXYXkAiqwzSiIfcLEgtv+plrv9aRA= -github.com/cosmos/interchain-security v1.2.0 h1:DHC00F3diTXDBgTgLSB+O8qbs1p7DtTfUeO8XBEXsZo= -github.com/cosmos/interchain-security v1.2.0/go.mod h1:Y4onDsQuqkemGS7UqfyohahlBLt5gh1i8OVbPeMcuhA= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= @@ -1216,6 +1214,7 @@ github.com/getsentry/sentry-go v0.17.0 h1:UustVWnOoDFHBS7IJUB2QK/nB5pap748ZEp0sw github.com/getsentry/sentry-go v0.17.0/go.mod h1:B82dxtBvxG0KaPD8/hfSV+VcHD+Lg/xUS4JuQn1P4cM= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -1609,6 +1608,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 h1:gDLXvp5S9izjldquuoAhDzccbskOL6tDC5jMSyx3zxE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2/go.mod h1:7pdNwVWBBHGiCxa9lAszqCJMbfTISJ7oMftp8+UGV08= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -1727,7 +1728,6 @@ github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -2553,7 +2553,6 @@ github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t6 github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= @@ -2645,7 +2644,6 @@ github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrn github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/spm v0.1.9 h1:O1DJF4evS8wgk5SZqRcO29irNNtKQmTpvQ0xFzUiczI= github.com/tendermint/spm v0.1.9/go.mod h1:iHgfQ5YOI6ONc9E7ugGQolVdfSMHpeXfZ/OpXuN/42Q= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= diff --git a/network/init-neutrond.sh b/network/init-neutrond.sh index e19678d96..53fc612ae 100755 --- a/network/init-neutrond.sh +++ b/network/init-neutrond.sh @@ -606,7 +606,8 @@ $BINARY add-wasm-message execute "$DAO_CONTRACT_ADDRESS" "$ADD_SUBDAOS_MSG" --ru echo DAO $DAO_CONTRACT_ADDRESS sed -i -e 's/\"admins\":.*/\"admins\": [\"'"$DAO_CONTRACT_ADDRESS"'\"]/g' "$CHAIN_DIR/config/genesis.json" -sed -i -e 's/\"reserve_address\":.*/\"reserve_address\":\"'"$RESERVE_CONTRACT_ADDRESS"'\"/g' "$CHAIN_DIR/config/genesis.json" +sed -i -e 's/\"treasury_address\":.*/\"treasury_address\":\"'"$TREASURY_CONTRACT_ADDRESS"'\"/g' "$CHAIN_DIR/config/genesis.json" +sed -i -e 's/\"fee_collector_address\":.*/\"fee_collector_address\":\"'"$TREASURY_CONTRACT_ADDRESS"'\"/g' "$CHAIN_DIR/config/genesis.json" sed -i -e 's/\"security_address\":.*/\"security_address\":\"'"$DAO_CONTRACT_ADDRESS"'\",/g' "$CHAIN_DIR/config/genesis.json" sed -i -e 's/\"limit\":.*/\"limit\":5/g' "$CHAIN_DIR/config/genesis.json" sed -i -e 's/\"allow_messages\":.*/\"allow_messages\": [\"*\"]/g' "$CHAIN_DIR/config/genesis.json" diff --git a/proto/feeburner/params.proto b/proto/feeburner/params.proto index 2b1b4ca46..309b33524 100644 --- a/proto/feeburner/params.proto +++ b/proto/feeburner/params.proto @@ -9,15 +9,10 @@ option go_package = "github.com/neutron-org/neutron/x/feeburner/types"; message Params { option (gogoproto.goproto_stringer) = false; // Defines Neutron denom, which will be burned during fee processing, any - // other denom will be sent to Reserve + // other denom will be sent to Treasury string neutron_denom = 1; - // Defines reserve address - // TODO: it is important to remember that it used to be treasury_address here. - // A name conflict can lead to an error if the network is upgraded from - // a previous version to the current one (for example, on a testnet). - // This issue does not affect the mainnet, as the first version - // of neutron mainnet will include a proper name (reserve_address). - // If we still want to upgrade the network from the old version to the new one, - // we need to implement the handler to migrate treasury_address to reserve_address. + // Deprecated in v0.4.4. Is not used anymore string reserve_address = 2; + // Defines treasury address + string treasury_address = 3; } diff --git a/proto/osmosis/tokenfactory/v1beta1/params.proto b/proto/osmosis/tokenfactory/v1beta1/params.proto index c9454226b..4bd96f977 100644 --- a/proto/osmosis/tokenfactory/v1beta1/params.proto +++ b/proto/osmosis/tokenfactory/v1beta1/params.proto @@ -4,6 +4,18 @@ package osmosis.tokenfactory.v1beta1; import "gogoproto/gogo.proto"; option go_package = "github.com/neutron-org/neutron/x/tokenfactory/types"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; // Params holds parameters for the tokenfactory module -message Params {} +message Params { + // DenomCreationFee is the fee required to create a new denom using the tokenfactory module + repeated cosmos.base.v1beta1.Coin denom_creation_fee = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"denom_creation_fee\"", + (gogoproto.nullable) = false + ]; + + // FeeCollectorAddress is the address where fees collected from denom creation are sent to + string fee_collector_address = 2; +} diff --git a/wasmbinding/test/custom_message_test.go b/wasmbinding/test/custom_message_test.go index f912ecee3..259ec14a4 100644 --- a/wasmbinding/test/custom_message_test.go +++ b/wasmbinding/test/custom_message_test.go @@ -28,8 +28,12 @@ import ( icqkeeper "github.com/neutron-org/neutron/x/interchainqueries/keeper" icqtypes "github.com/neutron-org/neutron/x/interchainqueries/types" ictxkeeper "github.com/neutron-org/neutron/x/interchaintxs/keeper" + + tokenfactorytypes "github.com/neutron-org/neutron/x/tokenfactory/types" ) +const FeeCollectorAddress = "neutron1vguuxez2h5ekltfj9gjd62fs5k4rl2zy5hfrncasykzw08rezpfsd2rhm7" + type CustomMessengerTestSuite struct { testutil.IBCConnectionTestSuite neutron *app.App @@ -53,6 +57,11 @@ func (suite *CustomMessengerTestSuite) SetupTest() { suite.messenger.CronKeeper = &suite.neutron.CronKeeper suite.messenger.AdminKeeper = &suite.neutron.AdminmoduleKeeper suite.contractOwner = keeper.RandomAccountAddress(suite.T()) + + suite.messenger.TokenFactory.SetParams(suite.ctx, tokenfactorytypes.NewParams( + sdk.NewCoins(sdk.NewInt64Coin(tokenfactorytypes.DefaultNeutronDenom, 10_000_000)), + FeeCollectorAddress, + )) } func (suite *CustomMessengerTestSuite) TestRegisterInterchainAccount() { @@ -147,6 +156,12 @@ func (suite *CustomMessengerTestSuite) TestCreateDenomMsg() { suite.contractAddress = suite.InstantiateReflectContract(suite.ctx, suite.contractOwner, codeID) suite.Require().NotEmpty(suite.contractAddress) + senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() + coinsAmnt := sdk.NewCoins(sdk.NewCoin(params.DefaultDenom, sdk.NewInt(int64(10_000_000)))) + bankKeeper := suite.neutron.BankKeeper + err := bankKeeper.SendCoins(suite.ctx, senderAddress, suite.contractAddress, coinsAmnt) + suite.NoError(err) + fullMsg := bindings.NeutronMsg{ CreateDenom: &bindings.CreateDenom{ Subdenom: "SUN", @@ -169,6 +184,12 @@ func (suite *CustomMessengerTestSuite) TestMintMsg() { suite.contractAddress = suite.InstantiateReflectContract(suite.ctx, suite.contractOwner, codeID) suite.Require().NotEmpty(suite.contractAddress) + senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() + coinsAmnt := sdk.NewCoins(sdk.NewCoin(params.DefaultDenom, sdk.NewInt(int64(20_000_000)))) + bankKeeper := suite.neutron.BankKeeper + err := bankKeeper.SendCoins(suite.ctx, senderAddress, suite.contractAddress, coinsAmnt) + suite.NoError(err) + // lucky was broke balances := neutron.BankKeeper.GetAllBalances(suite.ctx, lucky) require.Empty(suite.T(), balances) diff --git a/wasmbinding/test/custom_query_test.go b/wasmbinding/test/custom_query_test.go index b9a4960c1..4313cdf31 100644 --- a/wasmbinding/test/custom_query_test.go +++ b/wasmbinding/test/custom_query_test.go @@ -7,7 +7,9 @@ import ( "github.com/stretchr/testify/suite" + "github.com/neutron-org/neutron/app/params" feerefundertypes "github.com/neutron-org/neutron/x/feerefunder/types" + tokenfactorytypes "github.com/neutron-org/neutron/x/tokenfactory/types" "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmvmtypes "github.com/CosmWasm/wasmvm/types" @@ -246,11 +248,22 @@ func (suite *CustomQuerierTestSuite) TestDenomAdmin() { owner = keeper.RandomAccountAddress(suite.T()) // We don't care what this address is ) + neutron.TokenFactoryKeeper.SetParams(ctx, tokenfactorytypes.NewParams( + sdk.NewCoins(sdk.NewInt64Coin(tokenfactorytypes.DefaultNeutronDenom, 10_000_000)), + FeeCollectorAddress, + )) + // Store code and instantiate reflect contract codeID := suite.StoreReflectCode(ctx, owner, "../testdata/reflect.wasm") contractAddress := suite.InstantiateReflectContract(ctx, owner, codeID) suite.Require().NotEmpty(contractAddress) + senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() + coinsAmnt := sdk.NewCoins(sdk.NewCoin(params.DefaultDenom, sdk.NewInt(int64(10_000_000)))) + bankKeeper := neutron.BankKeeper + err := bankKeeper.SendCoins(ctx, senderAddress, contractAddress, coinsAmnt) + suite.NoError(err) + denom, _ := neutron.TokenFactoryKeeper.CreateDenom(ctx, contractAddress.String(), "test") query := bindings.NeutronQuery{ @@ -259,7 +272,7 @@ func (suite *CustomQuerierTestSuite) TestDenomAdmin() { }, } resp := bindings.DenomAdminResponse{} - err := suite.queryCustom(ctx, contractAddress, query, &resp) + err = suite.queryCustom(ctx, contractAddress, query, &resp) suite.Require().NoError(err) suite.Require().Equal(contractAddress.String(), resp.Admin) diff --git a/x/feeburner/keeper/keeper.go b/x/feeburner/keeper/keeper.go index 435aaf725..e706c94b8 100644 --- a/x/feeburner/keeper/keeper.go +++ b/x/feeburner/keeper/keeper.go @@ -112,7 +112,7 @@ func (k Keeper) BurnAndDistribute(ctx sdk.Context) { } if len(fundsForReserve) > 0 { - addr, err := sdk.AccAddressFromBech32(params.ReserveAddress) + addr, err := sdk.AccAddressFromBech32(params.TreasuryAddress) if err != nil { // there's no way we face this kind of situation in production, since it means the chain is misconfigured // still, in test environments it might be the case when the chain is started without Reserve diff --git a/x/feeburner/keeper/keeper_test.go b/x/feeburner/keeper/keeper_test.go index db3ff2b14..67b2f3bcb 100644 --- a/x/feeburner/keeper/keeper_test.go +++ b/x/feeburner/keeper/keeper_test.go @@ -124,7 +124,7 @@ func TestKeeper_BurnAndDistribute_NonNtrn(t *testing.T) { defer ctrl.Finish() feeKeeper, ctx, mockBankKeeper, redistrAddr := setupBurnAndDistribute(t, ctrl, sdk.Coins{sdk.NewCoin("nonntrn", sdk.NewInt(50))}) - mockBankKeeper.EXPECT().SendCoins(ctx, redistrAddr, sdk.MustAccAddressFromBech32(feeKeeper.GetParams(ctx).ReserveAddress), sdk.Coins{sdk.NewCoin("nonntrn", sdk.NewInt(50))}) + mockBankKeeper.EXPECT().SendCoins(ctx, redistrAddr, sdk.MustAccAddressFromBech32(feeKeeper.GetParams(ctx).TreasuryAddress), sdk.Coins{sdk.NewCoin("nonntrn", sdk.NewInt(50))}) feeKeeper.BurnAndDistribute(ctx) @@ -137,7 +137,7 @@ func TestKeeper_BurnAndDistribute_SendCoinsFail(t *testing.T) { defer ctrl.Finish() feeKeeper, ctx, mockBankKeeper, redistrAddr := setupBurnAndDistribute(t, ctrl, sdk.Coins{sdk.NewCoin("nonntrn", sdk.NewInt(50))}) - mockBankKeeper.EXPECT().SendCoins(ctx, redistrAddr, sdk.MustAccAddressFromBech32(feeKeeper.GetParams(ctx).ReserveAddress), sdk.Coins{sdk.NewCoin("nonntrn", sdk.NewInt(50))}).Return(fmt.Errorf("testerror")) + mockBankKeeper.EXPECT().SendCoins(ctx, redistrAddr, sdk.MustAccAddressFromBech32(feeKeeper.GetParams(ctx).TreasuryAddress), sdk.Coins{sdk.NewCoin("nonntrn", sdk.NewInt(50))}).Return(fmt.Errorf("testerror")) assert.Panics(t, func() { feeKeeper.BurnAndDistribute(ctx) @@ -154,7 +154,7 @@ func TestKeeper_BurnAndDistribute_NtrnAndNonNtrn(t *testing.T) { feeKeeper, ctx, mockBankKeeper, redistrAddr := setupBurnAndDistribute(t, ctrl, coins) mockBankKeeper.EXPECT().BurnCoins(ctx, consumertypes.ConsumerRedistributeName, sdk.Coins{sdk.NewCoin(feetypes.DefaultNeutronDenom, sdk.NewInt(70))}) - mockBankKeeper.EXPECT().SendCoins(ctx, redistrAddr, sdk.MustAccAddressFromBech32(feeKeeper.GetParams(ctx).ReserveAddress), sdk.Coins{sdk.NewCoin("nonntrn", sdk.NewInt(20))}) + mockBankKeeper.EXPECT().SendCoins(ctx, redistrAddr, sdk.MustAccAddressFromBech32(feeKeeper.GetParams(ctx).TreasuryAddress), sdk.Coins{sdk.NewCoin("nonntrn", sdk.NewInt(20))}) feeKeeper.BurnAndDistribute(ctx) burnedAmount := feeKeeper.GetTotalBurnedNeutronsAmount(ctx) diff --git a/x/feeburner/types/params.go b/x/feeburner/types/params.go index 5138a423c..b6a232068 100644 --- a/x/feeburner/types/params.go +++ b/x/feeburner/types/params.go @@ -12,10 +12,12 @@ import ( var _ paramtypes.ParamSet = (*Params)(nil) var ( - KeyNeutronDenom = []byte("NeutronDenom") - DefaultNeutronDenom = params.DefaultDenom - KeyReserveAddress = []byte("ReserveAddress") - DefaultReserveAddress = "" + KeyNeutronDenom = []byte("NeutronDenom") + DefaultNeutronDenom = params.DefaultDenom + KeyReserveAddress = []byte("ReserveAddress") + DefaultReserveAddress = "" + KeyTreasuryAddress = []byte("TreasuryAddress") + DefaultTreasuryAddress = "" ) // ParamKeyTable the param key table for launch module @@ -29,22 +31,28 @@ func ParamKeyTable() paramtypes.KeyTable { paramtypes.NewParamSetPair( KeyReserveAddress, DefaultReserveAddress, - validateReserveAddress, + func(i interface{}) error { return nil }, + ), + paramtypes.NewParamSetPair( + KeyTreasuryAddress, + DefaultTreasuryAddress, + validateTreasuryAddress, ), ) } // NewParams creates a new Params instance -func NewParams(neutronDenom, reserveAddress string) Params { +func NewParams(neutronDenom, treasuryAddress string) Params { return Params{ - NeutronDenom: neutronDenom, - ReserveAddress: reserveAddress, + NeutronDenom: neutronDenom, + ReserveAddress: DefaultReserveAddress, + TreasuryAddress: treasuryAddress, } } // DefaultParams returns a default set of parameters func DefaultParams() Params { - return NewParams(DefaultNeutronDenom, DefaultReserveAddress) + return NewParams(DefaultNeutronDenom, DefaultTreasuryAddress) } // ParamSetPairs get the params.ParamSet @@ -58,7 +66,12 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair( KeyReserveAddress, &p.ReserveAddress, - validateReserveAddress, + func(i interface{}) error { return nil }, + ), + paramtypes.NewParamSetPair( + KeyTreasuryAddress, + &p.TreasuryAddress, + validateTreasuryAddress, ), } } @@ -70,7 +83,7 @@ func (p Params) Validate() error { return err } - err = validateReserveAddress(p.ReserveAddress) + err = validateTreasuryAddress(p.TreasuryAddress) if err != nil { return err } @@ -97,7 +110,7 @@ func validateNeutronDenom(i interface{}) error { return nil } -func validateReserveAddress(i interface{}) error { +func validateTreasuryAddress(i interface{}) error { v, ok := i.(string) if !ok { return fmt.Errorf("invalid parameter type: %T", i) diff --git a/x/feeburner/types/params.pb.go b/x/feeburner/types/params.pb.go index 89d2abde6..69ae7617b 100644 --- a/x/feeburner/types/params.pb.go +++ b/x/feeburner/types/params.pb.go @@ -26,10 +26,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the parameters for the module. type Params struct { // Defines Neutron denom, which will be burned during fee processing, any - // other denom will be sent to Reserve + // other denom will be sent to Treasury NeutronDenom string `protobuf:"bytes,1,opt,name=neutron_denom,json=neutronDenom,proto3" json:"neutron_denom,omitempty"` - // Defines reserve address + // Deprecated in v0.4.4. Is not used anymore ReserveAddress string `protobuf:"bytes,2,opt,name=reserve_address,json=reserveAddress,proto3" json:"reserve_address,omitempty"` + // Defines treasury address + TreasuryAddress string `protobuf:"bytes,3,opt,name=treasury_address,json=treasuryAddress,proto3" json:"treasury_address,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -78,6 +80,13 @@ func (m *Params) GetReserveAddress() string { return "" } +func (m *Params) GetTreasuryAddress() string { + if m != nil { + return m.TreasuryAddress + } + return "" +} + func init() { proto.RegisterType((*Params)(nil), "neutron.feeburner.Params") } @@ -85,20 +94,22 @@ func init() { func init() { proto.RegisterFile("feeburner/params.proto", fileDescriptor_ccaaf97f3dcc64c0) } var fileDescriptor_ccaaf97f3dcc64c0 = []byte{ - // 203 bytes of a gzipped FileDescriptorProto + // 226 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0x4b, 0x4d, 0x4d, 0x2a, 0x2d, 0xca, 0x4b, 0x2d, 0xd2, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xcc, 0x4b, 0x2d, 0x2d, 0x29, 0xca, 0xcf, 0xd3, 0x83, 0xcb, 0x4b, 0x89, - 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88, 0x42, 0xa5, 0x18, 0x2e, 0xb6, 0x00, - 0xb0, 0x46, 0x21, 0x65, 0x2e, 0x5e, 0xa8, 0xa6, 0xf8, 0x94, 0xd4, 0xbc, 0xfc, 0x5c, 0x09, 0x46, - 0x05, 0x46, 0x0d, 0xce, 0x20, 0x1e, 0xa8, 0xa0, 0x0b, 0x48, 0x4c, 0x48, 0x9d, 0x8b, 0xbf, 0x28, - 0xb5, 0x38, 0xb5, 0xa8, 0x2c, 0x35, 0x3e, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, 0x58, 0x82, 0x09, - 0xac, 0x8c, 0x0f, 0x2a, 0xec, 0x08, 0x11, 0xb5, 0x62, 0x99, 0xb1, 0x40, 0x9e, 0xc1, 0xc9, 0xeb, - 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, 0xa1, 0x36, 0xe8, 0xe6, 0x17, 0xa5, 0xc3, 0xd8, 0xfa, 0x15, - 0xfa, 0x08, 0x9f, 0x95, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x1d, 0x6c, 0x0c, 0x08, 0x00, - 0x00, 0xff, 0xff, 0xf8, 0x27, 0x6a, 0x9c, 0xf3, 0x00, 0x00, 0x00, + 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88, 0x42, 0xa5, 0x76, 0x46, 0x2e, 0xb6, + 0x00, 0xb0, 0x4e, 0x21, 0x65, 0x2e, 0x5e, 0xa8, 0xae, 0xf8, 0x94, 0xd4, 0xbc, 0xfc, 0x5c, 0x09, + 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x1e, 0xa8, 0xa0, 0x0b, 0x48, 0x4c, 0x48, 0x9d, 0x8b, 0xbf, + 0x28, 0xb5, 0x38, 0xb5, 0xa8, 0x2c, 0x35, 0x3e, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, 0x58, 0x82, + 0x09, 0xac, 0x8c, 0x0f, 0x2a, 0xec, 0x08, 0x11, 0x15, 0xd2, 0xe4, 0x12, 0x28, 0x29, 0x4a, 0x4d, + 0x2c, 0x2e, 0x2d, 0xaa, 0x84, 0xab, 0x64, 0x06, 0xab, 0xe4, 0x87, 0x89, 0x43, 0x95, 0x5a, 0xb1, + 0xcc, 0x58, 0x20, 0xcf, 0xe0, 0xe4, 0x75, 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, 0x50, 0xc7, 0xe8, + 0xe6, 0x17, 0xa5, 0xc3, 0xd8, 0xfa, 0x15, 0xfa, 0x88, 0x50, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, + 0x62, 0x03, 0x7b, 0xce, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xa7, 0x3d, 0x02, 0xb1, 0x1f, 0x01, + 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -121,6 +132,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.TreasuryAddress) > 0 { + i -= len(m.TreasuryAddress) + copy(dAtA[i:], m.TreasuryAddress) + i = encodeVarintParams(dAtA, i, uint64(len(m.TreasuryAddress))) + i-- + dAtA[i] = 0x1a + } if len(m.ReserveAddress) > 0 { i -= len(m.ReserveAddress) copy(dAtA[i:], m.ReserveAddress) @@ -163,6 +181,10 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovParams(uint64(l)) } + l = len(m.TreasuryAddress) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } return n } @@ -265,6 +287,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.ReserveAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TreasuryAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TreasuryAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/interchaintxs/types/tx.pb.go b/x/interchaintxs/types/tx.pb.go index 7738be28a..6fc83d648 100644 --- a/x/interchaintxs/types/tx.pb.go +++ b/x/interchaintxs/types/tx.pb.go @@ -6,12 +6,12 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" types1 "github.com/neutron-org/neutron/x/feerefunder/types" - _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/tokenfactory/keeper/admins_test.go b/x/tokenfactory/keeper/admins_test.go index 6ecc252ea..a001c1102 100644 --- a/x/tokenfactory/keeper/admins_test.go +++ b/x/tokenfactory/keeper/admins_test.go @@ -14,7 +14,7 @@ func (suite *KeeperTestSuite) TestAdminMsgs() { addr1bal := int64(0) suite.Setup() - suite.CreateDefaultDenom() + suite.CreateDefaultDenom(suite.ChainA.GetContext()) // Make sure that the admin is set correctly denom := strings.Split(suite.defaultDenom, "/") queryRes, err := suite.queryClient.DenomAuthorityMetadata(suite.ChainA.GetContext().Context(), &types.QueryDenomAuthorityMetadataRequest{ @@ -79,7 +79,7 @@ func (suite *KeeperTestSuite) TestMintDenom() { suite.Setup() // Create a denom - suite.CreateDefaultDenom() + suite.CreateDefaultDenom(suite.ChainA.GetContext()) for _, tc := range []struct { desc string @@ -129,7 +129,7 @@ func (suite *KeeperTestSuite) TestBurnDenom() { suite.Setup() // Create a denom. - suite.CreateDefaultDenom() + suite.CreateDefaultDenom(suite.ChainA.GetContext()) // mint 10 default token for testAcc[0] _, err := suite.msgServer.Mint(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgMint(suite.TestAccs[0].String(), sdk.NewInt64Coin(suite.defaultDenom, 10))) @@ -233,6 +233,9 @@ func (suite *KeeperTestSuite) TestChangeAdminDenom() { suite.Setup() // Create a denom and mint + senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() + suite.TopUpWallet(suite.ChainA.GetContext(), senderAddress, suite.TestAccs[0]) + res, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.Require().NoError(err) diff --git a/x/tokenfactory/keeper/createdenom.go b/x/tokenfactory/keeper/createdenom.go index 33f86dbf3..9d5192a63 100644 --- a/x/tokenfactory/keeper/createdenom.go +++ b/x/tokenfactory/keeper/createdenom.go @@ -4,6 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/neutron-org/neutron/x/tokenfactory/types" @@ -11,13 +12,22 @@ import ( // ConvertToBaseToken converts a fee amount in a whitelisted fee token to the base fee token amount func (k Keeper) CreateDenom(ctx sdk.Context, creatorAddr string, subdenom string) (newTokenDenom string, err error) { + err = k.chargeFeeForDenomCreation(ctx, creatorAddr) + if err != nil { + return "", sdkerrors.Wrapf(types.ErrUnableToCharge, "denom fee collection error: %v", err) + } + denom, err := k.validateCreateDenom(ctx, creatorAddr, subdenom) if err != nil { - return "", err + return "", sdkerrors.Wrapf(types.ErrInvalidDenom, "denom validation error: %v", err) } err = k.createDenomAfterValidation(ctx, creatorAddr, denom) - return denom, err + if err != nil { + return "", sdkerrors.Wrap(err, "create denom after validation error") + } + + return denom, nil } // Runs CreateDenom logic after the charge and all denom validation has been handled. @@ -38,7 +48,7 @@ func (k Keeper) createDenomAfterValidation(ctx sdk.Context, creatorAddr string, } err = k.setAuthorityMetadata(ctx, denom, authorityMetadata) if err != nil { - return err + return sdkerrors.Wrapf(types.ErrInvalidAuthorityMetadata, "unable to set authority metadata: %v", err) } k.addDenomFromCreator(ctx, creatorAddr, denom) @@ -54,7 +64,7 @@ func (k Keeper) validateCreateDenom(ctx sdk.Context, creatorAddr string, subdeno denom, err := types.GetTokenDenom(creatorAddr, subdenom) if err != nil { - return "", err + return "", sdkerrors.Wrapf(types.ErrTokenDenom, "wrong denom token: %v", err) } _, found := k.bankKeeper.GetDenomMetaData(ctx, denom) @@ -64,3 +74,33 @@ func (k Keeper) validateCreateDenom(ctx sdk.Context, creatorAddr string, subdeno return denom, nil } + +func (k Keeper) chargeFeeForDenomCreation(ctx sdk.Context, creatorAddr string) (err error) { + // Send creation fee to community pool + creationFee := k.GetParams(ctx).DenomCreationFee + accAddr, err := sdk.AccAddressFromBech32(creatorAddr) + if err != nil { + return sdkerrors.Wrapf(types.ErrUnableToCharge, "wrong creator address: %v", err) + } + + params := k.GetParams(ctx) + + if len(creationFee) > 0 { + feeCollectorAddr, err := sdk.AccAddressFromBech32(params.FeeCollectorAddress) + if err != nil { + return sdkerrors.Wrapf(types.ErrUnableToCharge, "wrong fee collector address: %v", err) + } + + err = k.bankKeeper.SendCoins( + ctx, + accAddr, feeCollectorAddr, + creationFee, + ) + + if err != nil { + return sdkerrors.Wrap(err, "unable to send coins to fee collector") + } + } + + return nil +} diff --git a/x/tokenfactory/keeper/createdenom_test.go b/x/tokenfactory/keeper/createdenom_test.go index d54857f9d..423dc4a1d 100644 --- a/x/tokenfactory/keeper/createdenom_test.go +++ b/x/tokenfactory/keeper/createdenom_test.go @@ -12,11 +12,30 @@ import ( func (suite *KeeperTestSuite) TestMsgCreateDenom() { suite.Setup() + // Create denom without enough funds + _, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) + suite.Require().ErrorContains(err, "unable to charge for denom creation") + // Creating a denom should work + senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() + suite.TopUpWallet(suite.ChainA.GetContext(), senderAddress, suite.TestAccs[0]) + + balance := suite.WalletBalance(suite.ChainA.GetContext(), suite.TestAccs[0].String()) + suite.Require().Equal(sdk.NewInt(TopUpCoinsAmount), balance) + + feeCollectorBalance := suite.WalletBalance(suite.ChainA.GetContext(), FeeCollectorAddress) + suite.Require().Equal(sdk.NewInt(0), feeCollectorBalance) + res, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.Require().NoError(err) suite.Require().NotEmpty(res.GetNewTokenDenom()) + balance = suite.WalletBalance(suite.ChainA.GetContext(), suite.TestAccs[0].String()) + suite.Require().Equal(sdk.NewInt(0), balance) + + feeCollectorBalance = suite.WalletBalance(suite.ChainA.GetContext(), FeeCollectorAddress) + suite.Require().Equal(sdk.NewInt(TopUpCoinsAmount), feeCollectorBalance) + // Make sure that the admin is set correctly denom := strings.Split(res.GetNewTokenDenom(), "/") @@ -33,6 +52,8 @@ func (suite *KeeperTestSuite) TestMsgCreateDenom() { suite.Require().Error(err) // Creating a second denom should work + suite.TopUpWallet(suite.ChainA.GetContext(), senderAddress, suite.TestAccs[0]) + res, err = suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "litecoin")) suite.Require().NoError(err) suite.Require().NotEmpty(res.GetNewTokenDenom()) @@ -45,6 +66,8 @@ func (suite *KeeperTestSuite) TestMsgCreateDenom() { suite.Require().Len(queryRes2.Denoms, 2) // Make sure that a second account can create a denom with the same subdenom + suite.TopUpWallet(suite.ChainA.GetContext(), senderAddress, suite.TestAccs[1]) + res, err = suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[1].String(), "bitcoin")) suite.Require().NoError(err) suite.Require().NotEmpty(res.GetNewTokenDenom()) @@ -70,6 +93,8 @@ func (suite *KeeperTestSuite) TestCreateDenom() { { desc: "subdenom and creator pair already exists", setup: func() { + senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() + suite.TopUpWallet(suite.ChainA.GetContext(), senderAddress, suite.TestAccs[0]) _, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.Require().NoError(err) }, @@ -94,6 +119,9 @@ func (suite *KeeperTestSuite) TestCreateDenom() { tc.setup() } // Create a denom + senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() + suite.TopUpWallet(suite.ChainA.GetContext(), senderAddress, suite.TestAccs[0]) + res, err := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[0].String(), tc.subdenom)) if tc.valid { suite.Require().NoError(err) diff --git a/x/tokenfactory/keeper/genesis.go b/x/tokenfactory/keeper/genesis.go index 131abce97..3c311eedb 100644 --- a/x/tokenfactory/keeper/genesis.go +++ b/x/tokenfactory/keeper/genesis.go @@ -1,8 +1,6 @@ package keeper import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/neutron-org/neutron/x/tokenfactory/types" @@ -25,7 +23,6 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { panic(err) } err = k.setAuthorityMetadata(ctx, genDenom.GetDenom(), genDenom.GetAuthorityMetadata()) - fmt.Println("set auth meta", genDenom.GetDenom(), genDenom.GetAuthorityMetadata(), err) if err != nil { panic(err) } diff --git a/x/tokenfactory/keeper/keeper_test.go b/x/tokenfactory/keeper/keeper_test.go index 932c2cc22..d09828399 100644 --- a/x/tokenfactory/keeper/keeper_test.go +++ b/x/tokenfactory/keeper/keeper_test.go @@ -1,23 +1,29 @@ package keeper_test import ( - "fmt" "testing" "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/suite" "github.com/tendermint/tendermint/crypto/ed25519" + sdktypes "github.com/cosmos/cosmos-sdk/types" + "github.com/neutron-org/neutron/app/params" "github.com/neutron-org/neutron/testutil" "github.com/neutron-org/neutron/x/tokenfactory/keeper" "github.com/neutron-org/neutron/x/tokenfactory/types" ) +const ( + FeeCollectorAddress = "neutron1vguuxez2h5ekltfj9gjd62fs5k4rl2zy5hfrncasykzw08rezpfsd2rhm7" + TopUpCoinsAmount = 1_000_000 +) + type KeeperTestSuite struct { testutil.IBCConnectionTestSuite - TestAccs []sdk.AccAddress + TestAccs []sdktypes.AccAddress QueryHelper *baseapp.QueryServiceTestHelper queryClient types.QueryClient @@ -38,13 +44,17 @@ func (suite *KeeperTestSuite) Setup() { Ctx: suite.ChainA.GetContext(), } suite.TestAccs = CreateRandomAccounts(3) - fmt.Printf("Setup: %s\n", suite.TestAccs) suite.SetupTokenFactory() suite.queryClient = types.NewQueryClient(suite.QueryHelper) tokeFactoryKeeper := suite.GetNeutronZoneApp(suite.ChainA).TokenFactoryKeeper + tokeFactoryKeeper.SetParams(suite.ChainA.GetContext(), types.NewParams( + sdktypes.NewCoins(sdktypes.NewInt64Coin(types.DefaultNeutronDenom, TopUpCoinsAmount)), + FeeCollectorAddress, + )) + suite.msgServer = keeper.NewMsgServerImpl(*tokeFactoryKeeper) } @@ -52,18 +62,41 @@ func (suite *KeeperTestSuite) SetupTokenFactory() { suite.GetNeutronZoneApp(suite.ChainA).TokenFactoryKeeper.CreateModuleAccount(suite.ChainA.GetContext()) } -func (suite *KeeperTestSuite) CreateDefaultDenom() { - fmt.Printf("CreateDefaultDenom: %s\n", suite.TestAccs) - res, _ := suite.msgServer.CreateDenom(sdk.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) +func (suite *KeeperTestSuite) CreateDefaultDenom(ctx sdktypes.Context) { + senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress() + suite.TopUpWallet(ctx, senderAddress, suite.TestAccs[0]) + + res, _ := suite.msgServer.CreateDenom(sdktypes.WrapSDKContext(suite.ChainA.GetContext()), types.NewMsgCreateDenom(suite.TestAccs[0].String(), "bitcoin")) suite.defaultDenom = res.GetNewTokenDenom() } +func (suite *KeeperTestSuite) TopUpWallet(ctx sdktypes.Context, sender sdktypes.AccAddress, contractAddress sdktypes.AccAddress) { + coinsAmnt := sdktypes.NewCoins(sdktypes.NewCoin(params.DefaultDenom, sdktypes.NewInt(TopUpCoinsAmount))) + bankKeeper := suite.GetNeutronZoneApp(suite.ChainA).BankKeeper + err := bankKeeper.SendCoins(ctx, sender, contractAddress, coinsAmnt) + suite.Require().NoError(err) +} + +func (suite *KeeperTestSuite) WalletBalance(ctx sdktypes.Context, address string) sdktypes.Int { + bankKeeper := suite.GetNeutronZoneApp(suite.ChainA).BankKeeper + balance, err := bankKeeper.Balance( + sdktypes.WrapSDKContext(ctx), + &banktypes.QueryBalanceRequest{ + Address: address, + Denom: params.DefaultDenom, + }, + ) + suite.Require().NoError(err) + + return balance.Balance.Amount +} + // CreateRandomAccounts is a function return a list of randomly generated AccAddresses -func CreateRandomAccounts(numAccts int) []sdk.AccAddress { - testAddrs := make([]sdk.AccAddress, numAccts) +func CreateRandomAccounts(numAccts int) []sdktypes.AccAddress { + testAddrs := make([]sdktypes.AccAddress, numAccts) for i := 0; i < numAccts; i++ { pk := ed25519.GenPrivKey().PubKey() - testAddrs[i] = sdk.AccAddress(pk.Address()) + testAddrs[i] = sdktypes.AccAddress(pk.Address()) } return testAddrs diff --git a/x/tokenfactory/types/errors.go b/x/tokenfactory/types/errors.go index 06991f19b..1a58c989b 100644 --- a/x/tokenfactory/types/errors.go +++ b/x/tokenfactory/types/errors.go @@ -19,4 +19,6 @@ var ( ErrSubdenomTooLong = sdkerrors.Register(ModuleName, 8, fmt.Sprintf("subdenom too long, max length is %d bytes", MaxSubdenomLength)) ErrCreatorTooLong = sdkerrors.Register(ModuleName, 9, fmt.Sprintf("creator too long, max length is %d bytes", MaxCreatorLength)) ErrDenomDoesNotExist = sdkerrors.Register(ModuleName, 10, "denom does not exist") + ErrUnableToCharge = sdkerrors.Register(ModuleName, 11, "unable to charge for denom creation") + ErrTokenDenom = sdkerrors.Register(ModuleName, 13, "wrong token denom") ) diff --git a/x/tokenfactory/types/expected_keepers.go b/x/tokenfactory/types/expected_keepers.go index 1f750fd8d..ffa4b5439 100644 --- a/x/tokenfactory/types/expected_keepers.go +++ b/x/tokenfactory/types/expected_keepers.go @@ -21,6 +21,7 @@ type BankKeeper interface { BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error + GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins } type AccountKeeper interface { diff --git a/x/tokenfactory/types/params.go b/x/tokenfactory/types/params.go index 355c0638f..9bbc18808 100644 --- a/x/tokenfactory/types/params.go +++ b/x/tokenfactory/types/params.go @@ -1,30 +1,88 @@ package types import ( + fmt "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + + "github.com/neutron-org/neutron/app/params" ) -// ParamTable for gamm module. +// Parameter store keys. +var ( + KeyDenomCreationFee = []byte("DenomCreationFee") + DefaultNeutronDenom = params.DefaultDenom + DefaultFeeAmount int64 = 1_000_000 + KeyFeeCollectorAddress = []byte("FeeCollectorAddress") + DefaultFeeCollectorAddress = "" +) + +// ParamTable for tokenfactory module. func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } -func NewParams(_ sdk.Coins) Params { - return Params{} +func NewParams(denomCreationFee sdk.Coins, feeCollectorAddress string) Params { + return Params{ + DenomCreationFee: denomCreationFee, + FeeCollectorAddress: feeCollectorAddress, + } } -// default gamm module parameters. +// default tokenfactory module parameters. func DefaultParams() Params { - return Params{} + return Params{ + DenomCreationFee: sdk.NewCoins(sdk.NewInt64Coin(DefaultNeutronDenom, DefaultFeeAmount)), + FeeCollectorAddress: DefaultFeeCollectorAddress, + } } // validate params. func (p Params) Validate() error { - return nil + if err := validateDenomCreationFee(p.DenomCreationFee); err != nil { + return err + } + + return validateFeeCollectorAddress(p.FeeCollectorAddress) } // Implements params.ParamSet. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{} + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyDenomCreationFee, &p.DenomCreationFee, validateDenomCreationFee), + paramtypes.NewParamSetPair(KeyFeeCollectorAddress, &p.FeeCollectorAddress, validateFeeCollectorAddress), + } +} + +func validateDenomCreationFee(i interface{}) error { + v, ok := i.(sdk.Coins) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if err := v.Validate(); err != nil { + return fmt.Errorf("invalid denom creation fee: %+v, %w", i, err) + } + + return nil +} + +func validateFeeCollectorAddress(i interface{}) error { + v, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + // Fee collector address might be explicitly empty in test environments + if len(v) == 0 { + return nil + } + + _, err := sdk.AccAddressFromBech32(v) + if err != nil { + return fmt.Errorf("invalid fee collector address: %w", err) + } + + return nil } diff --git a/x/tokenfactory/types/params.pb.go b/x/tokenfactory/types/params.pb.go index 726c350b6..5f8b77986 100644 --- a/x/tokenfactory/types/params.pb.go +++ b/x/tokenfactory/types/params.pb.go @@ -5,6 +5,9 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -25,6 +28,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params holds parameters for the tokenfactory module type Params struct { + // DenomCreationFee is the fee required to create a new denom using the tokenfactory module + DenomCreationFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=denom_creation_fee,json=denomCreationFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"denom_creation_fee" yaml:"denom_creation_fee"` + // FeeCollectorAddress is the address where fees collected from denom creation are sent to + FeeCollectorAddress string `protobuf:"bytes,2,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -60,6 +67,20 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo +func (m *Params) GetDenomCreationFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.DenomCreationFee + } + return nil +} + +func (m *Params) GetFeeCollectorAddress() string { + if m != nil { + return m.FeeCollectorAddress + } + return "" +} + func init() { proto.RegisterType((*Params)(nil), "osmosis.tokenfactory.v1beta1.Params") } @@ -69,18 +90,28 @@ func init() { } var fileDescriptor_cc8299d306f3ff47 = []byte{ - // 165 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcc, 0x2f, 0xce, 0xcd, - 0x2f, 0xce, 0x2c, 0xd6, 0x2f, 0xc9, 0xcf, 0x4e, 0xcd, 0x4b, 0x4b, 0x4c, 0x2e, 0xc9, 0x2f, 0xaa, - 0xd4, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x81, 0x2a, 0xd5, 0x43, 0x56, 0xaa, 0x07, 0x55, 0x2a, - 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xa8, 0x0f, 0x62, 0x41, 0xf4, 0x28, 0x71, 0x70, 0xb1, - 0x05, 0x80, 0xcd, 0x70, 0xf2, 0x3d, 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, - 0xe3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xbc, 0xd4, 0xd2, 0x92, - 0xa2, 0xfc, 0x3c, 0xdd, 0xfc, 0xa2, 0x74, 0x18, 0x5b, 0xbf, 0x02, 0xd5, 0x6d, 0x25, 0x95, 0x05, - 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xf3, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xf2, 0x19, - 0xfa, 0xc0, 0x00, 0x00, 0x00, + // 322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xb1, 0x4e, 0x02, 0x41, + 0x10, 0x86, 0x6f, 0x35, 0x21, 0xf1, 0x6c, 0xcc, 0xa9, 0x09, 0x10, 0xb3, 0x10, 0x2a, 0x2c, 0xb8, + 0x0d, 0xd0, 0xd9, 0x09, 0x89, 0x1d, 0x89, 0xa1, 0xb4, 0xb9, 0xec, 0xdd, 0xcd, 0x9d, 0x17, 0xb8, + 0x1d, 0xb2, 0xbb, 0x18, 0x79, 0x0b, 0x2b, 0x1f, 0xc2, 0x27, 0xa1, 0xa4, 0x31, 0xb1, 0x42, 0x03, + 0x6f, 0xe0, 0x13, 0x18, 0x76, 0x17, 0x83, 0xb1, 0xda, 0x99, 0xfc, 0xff, 0x7c, 0xf3, 0x67, 0xd6, + 0xbf, 0x46, 0x55, 0xa2, 0x2a, 0x14, 0xd3, 0x38, 0x01, 0x91, 0xf1, 0x44, 0xa3, 0x5c, 0xb0, 0xa7, + 0x6e, 0x0c, 0x9a, 0x77, 0xd9, 0x8c, 0x4b, 0x5e, 0xaa, 0x70, 0x26, 0x51, 0x63, 0x70, 0xe5, 0xac, + 0xe1, 0xa1, 0x35, 0x74, 0xd6, 0xfa, 0x45, 0x8e, 0x39, 0x1a, 0x23, 0xdb, 0x55, 0x76, 0xa6, 0x5e, + 0x4b, 0xcc, 0x50, 0x64, 0x05, 0xdb, 0x38, 0x89, 0xda, 0x8e, 0xc5, 0x5c, 0xc1, 0xef, 0xc2, 0x04, + 0x0b, 0x61, 0xf5, 0xd6, 0x3b, 0xf1, 0x2b, 0xf7, 0x66, 0x7f, 0xf0, 0x4a, 0xfc, 0x20, 0x05, 0x81, + 0x65, 0x94, 0x48, 0xe0, 0xba, 0x40, 0x11, 0x65, 0x00, 0x55, 0xd2, 0x3c, 0x6e, 0x9f, 0xf6, 0x6a, + 0xa1, 0xc3, 0xee, 0x40, 0xfb, 0x38, 0xe1, 0x10, 0x0b, 0x31, 0x18, 0x2d, 0xd7, 0x0d, 0xef, 0x7b, + 0xdd, 0xa8, 0x2d, 0x78, 0x39, 0xbd, 0x69, 0xfd, 0x47, 0xb4, 0xde, 0x3e, 0x1b, 0xed, 0xbc, 0xd0, + 0x8f, 0xf3, 0x38, 0x4c, 0xb0, 0x74, 0x01, 0xdd, 0xd3, 0x51, 0xe9, 0x84, 0xe9, 0xc5, 0x0c, 0x94, + 0xa1, 0xa9, 0xf1, 0x99, 0x01, 0x0c, 0xdd, 0xfc, 0x1d, 0x40, 0xd0, 0xf3, 0x2f, 0x33, 0x80, 0x28, + 0xc1, 0xe9, 0x14, 0x76, 0xe7, 0x88, 0x78, 0x9a, 0x4a, 0x50, 0xaa, 0x7a, 0xd4, 0x24, 0xed, 0x93, + 0xf1, 0x79, 0x06, 0x30, 0xdc, 0x6b, 0xb7, 0x56, 0x1a, 0x8c, 0x96, 0x1b, 0x4a, 0x56, 0x1b, 0x4a, + 0xbe, 0x36, 0x94, 0xbc, 0x6c, 0xa9, 0xb7, 0xda, 0x52, 0xef, 0x63, 0x4b, 0xbd, 0x87, 0xfe, 0x41, + 0x12, 0x01, 0x73, 0x2d, 0x51, 0x74, 0x50, 0xe6, 0xfb, 0x9a, 0x3d, 0xff, 0xfd, 0x24, 0x13, 0x2d, + 0xae, 0x98, 0x6b, 0xf5, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x58, 0x8c, 0xda, 0x7f, 0xc9, 0x01, + 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -103,6 +134,27 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.FeeCollectorAddress) > 0 { + i -= len(m.FeeCollectorAddress) + copy(dAtA[i:], m.FeeCollectorAddress) + i = encodeVarintParams(dAtA, i, uint64(len(m.FeeCollectorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DenomCreationFee) > 0 { + for iNdEx := len(m.DenomCreationFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DenomCreationFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } return len(dAtA) - i, nil } @@ -123,6 +175,16 @@ func (m *Params) Size() (n int) { } var l int _ = l + if len(m.DenomCreationFee) > 0 { + for _, e := range m.DenomCreationFee { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } + l = len(m.FeeCollectorAddress) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } return n } @@ -161,6 +223,72 @@ func (m *Params) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomCreationFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomCreationFee = append(m.DenomCreationFee, types.Coin{}) + if err := m.DenomCreationFee[len(m.DenomCreationFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeCollectorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeCollectorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:])