mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-27 08:45:19 +00:00
614d4e40fe
* Update cometbft, cosmos, ethermint, and ibc-go * Replace github.com/tendermint/tendermint by github.com/cometbft/cometbft * Replace github.com/tendermint/tm-db by github.com/cometbft/cometbft-db * Replace gogo/protobuf with cosmos/gogoproto & simapp replacement * Replace cosmos-sdk/simapp/helpers with cosmos-sdk/testutil/sims * Remove no longer used simulations * Replace ibchost with ibcexported See https://github.com/cosmos/ibc-go/blob/v7.2.2/docs/migrations/v6-to-v7.md#ibc-module-constants * Add new consensus params keeper * Add consensus keeper to blockers * Fix keeper and module issues in app.go * Add IsSendEnabledCoins and update SetParams interface changes * Fix protobuf build for cosmos 47 (#1800) * fix cp errors by using -f; fix lint by only linting our proto dir; and use proofs.proto directly from ics23 for ibc-go v7 * run proto-all; commit updated third party deps and swagger changes * regenerate proto files * use correct gocosmos build plugin for buf * re-gen all protobuf files to update paths for new gocosmos plugin * update protoc and buf to latest versions * fix staking keeper issues in app.go * update tally handler for gov changes * chain id fix and flag fixes * update deps for cometbft 47.7 upgrade * remove all module legacy queriers * update stakingKeeper to pointer * Replace ModuleCdc from govv1beta1 to govcodec * remove simulations * abci.LastCommitInfo → abci.CommitInfo * Remove unused code in keys.go * simapp.MakeTestEncodingConfig -> moduletestutil.MakeTestEncodingConfi * Fix chain id issues in tests * Fix remaining unit test issues * Update changelog for upgrade * Fix e2e tests using updated kvtool * Update protonet to v47 compatible genesis * Bump cometbft-db to v0.9.1-kava.1 * Update kvtool * Remove extra changelog * Fix merged rocksdb issues * go mod cleanup * Bump cometbft-db to v9 and go to 1.21 * Bump rocksdb version to v8.10.0 * Update kvtool to latest version * Update gin to v1.9.0 * Use ibctm.ModuleName in app_test * Fallback to genesis chain id instead of client toml * Remove all simulations * Fix cdp migrations issue with v47 * Update dependencies to correct tags --------- Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
349 lines
13 KiB
Protocol Buffer
349 lines
13 KiB
Protocol Buffer
syntax = "proto3";
|
|
package cosmos.bank.v1beta1;
|
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
import "cosmos/bank/v1beta1/bank.proto";
|
|
import "cosmos_proto/cosmos.proto";
|
|
import "cosmos/query/v1/query.proto";
|
|
import "amino/amino.proto";
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
|
|
|
// Query defines the gRPC querier service.
|
|
service Query {
|
|
// Balance queries the balance of a single coin for a single account.
|
|
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom";
|
|
}
|
|
|
|
// AllBalances queries the balance of all coins for a single account.
|
|
//
|
|
// When called from another module, this query might consume a high amount of
|
|
// gas if the pagination field is incorrectly set.
|
|
rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}";
|
|
}
|
|
|
|
// SpendableBalances queries the spendable balance of all coins for a single
|
|
// account.
|
|
//
|
|
// When called from another module, this query might consume a high amount of
|
|
// gas if the pagination field is incorrectly set.
|
|
//
|
|
// Since: cosmos-sdk 0.46
|
|
rpc SpendableBalances(QuerySpendableBalancesRequest) returns (QuerySpendableBalancesResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}";
|
|
}
|
|
|
|
// SpendableBalanceByDenom queries the spendable balance of a single denom for
|
|
// a single account.
|
|
//
|
|
// When called from another module, this query might consume a high amount of
|
|
// gas if the pagination field is incorrectly set.
|
|
//
|
|
// Since: cosmos-sdk 0.47
|
|
rpc SpendableBalanceByDenom(QuerySpendableBalanceByDenomRequest) returns (QuerySpendableBalanceByDenomResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}/by_denom";
|
|
}
|
|
|
|
// TotalSupply queries the total supply of all coins.
|
|
//
|
|
// When called from another module, this query might consume a high amount of
|
|
// gas if the pagination field is incorrectly set.
|
|
rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/supply";
|
|
}
|
|
|
|
// SupplyOf queries the supply of a single coin.
|
|
//
|
|
// When called from another module, this query might consume a high amount of
|
|
// gas if the pagination field is incorrectly set.
|
|
rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/supply/by_denom";
|
|
}
|
|
|
|
// Params queries the parameters of x/bank module.
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/params";
|
|
}
|
|
|
|
// DenomsMetadata queries the client metadata of a given coin denomination.
|
|
rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}";
|
|
}
|
|
|
|
// DenomsMetadata queries the client metadata for all registered coin
|
|
// denominations.
|
|
rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata";
|
|
}
|
|
|
|
// DenomOwners queries for all account addresses that own a particular token
|
|
// denomination.
|
|
//
|
|
// When called from another module, this query might consume a high amount of
|
|
// gas if the pagination field is incorrectly set.
|
|
//
|
|
// Since: cosmos-sdk 0.46
|
|
rpc DenomOwners(QueryDenomOwnersRequest) returns (QueryDenomOwnersResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}";
|
|
}
|
|
|
|
// SendEnabled queries for SendEnabled entries.
|
|
//
|
|
// This query only returns denominations that have specific SendEnabled settings.
|
|
// Any denomination that does not have a specific setting will use the default
|
|
// params.default_send_enabled, and will not be returned by this query.
|
|
//
|
|
// Since: cosmos-sdk 0.47
|
|
rpc SendEnabled(QuerySendEnabledRequest) returns (QuerySendEnabledResponse) {
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cosmos/bank/v1beta1/send_enabled";
|
|
}
|
|
}
|
|
|
|
// QueryBalanceRequest is the request type for the Query/Balance RPC method.
|
|
message QueryBalanceRequest {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// address is the address to query balances for.
|
|
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// denom is the coin denom to query balances for.
|
|
string denom = 2;
|
|
}
|
|
|
|
// QueryBalanceResponse is the response type for the Query/Balance RPC method.
|
|
message QueryBalanceResponse {
|
|
// balance is the balance of the coin.
|
|
cosmos.base.v1beta1.Coin balance = 1;
|
|
}
|
|
|
|
// QueryBalanceRequest is the request type for the Query/AllBalances RPC method.
|
|
message QueryAllBalancesRequest {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// address is the address to query balances for.
|
|
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// pagination defines an optional pagination for the request.
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
|
}
|
|
|
|
// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC
|
|
// method.
|
|
message QueryAllBalancesResponse {
|
|
// balances is the balances of all the coins.
|
|
repeated cosmos.base.v1beta1.Coin balances = 1 [
|
|
(gogoproto.nullable) = false,
|
|
(amino.dont_omitempty) = true,
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
|
];
|
|
|
|
// pagination defines the pagination in the response.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QuerySpendableBalancesRequest defines the gRPC request structure for querying
|
|
// an account's spendable balances.
|
|
//
|
|
// Since: cosmos-sdk 0.46
|
|
message QuerySpendableBalancesRequest {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// address is the address to query spendable balances for.
|
|
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// pagination defines an optional pagination for the request.
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
|
}
|
|
|
|
// QuerySpendableBalancesResponse defines the gRPC response structure for querying
|
|
// an account's spendable balances.
|
|
//
|
|
// Since: cosmos-sdk 0.46
|
|
message QuerySpendableBalancesResponse {
|
|
// balances is the spendable balances of all the coins.
|
|
repeated cosmos.base.v1beta1.Coin balances = 1 [
|
|
(gogoproto.nullable) = false,
|
|
(amino.dont_omitempty) = true,
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
|
];
|
|
|
|
// pagination defines the pagination in the response.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QuerySpendableBalanceByDenomRequest defines the gRPC request structure for
|
|
// querying an account's spendable balance for a specific denom.
|
|
//
|
|
// Since: cosmos-sdk 0.47
|
|
message QuerySpendableBalanceByDenomRequest {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// address is the address to query balances for.
|
|
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// denom is the coin denom to query balances for.
|
|
string denom = 2;
|
|
}
|
|
|
|
// QuerySpendableBalanceByDenomResponse defines the gRPC response structure for
|
|
// querying an account's spendable balance for a specific denom.
|
|
//
|
|
// Since: cosmos-sdk 0.47
|
|
message QuerySpendableBalanceByDenomResponse {
|
|
// balance is the balance of the coin.
|
|
cosmos.base.v1beta1.Coin balance = 1;
|
|
}
|
|
|
|
|
|
// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC
|
|
// method.
|
|
message QueryTotalSupplyRequest {
|
|
option (gogoproto.equal) = false;
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// pagination defines an optional pagination for the request.
|
|
//
|
|
// Since: cosmos-sdk 0.43
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
}
|
|
|
|
// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC
|
|
// method
|
|
message QueryTotalSupplyResponse {
|
|
// supply is the supply of the coins
|
|
repeated cosmos.base.v1beta1.Coin supply = 1 [
|
|
(gogoproto.nullable) = false,
|
|
(amino.dont_omitempty) = true,
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
|
];
|
|
|
|
// pagination defines the pagination in the response.
|
|
//
|
|
// Since: cosmos-sdk 0.43
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method.
|
|
message QuerySupplyOfRequest {
|
|
// denom is the coin denom to query balances for.
|
|
string denom = 1;
|
|
}
|
|
|
|
// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.
|
|
message QuerySupplyOfResponse {
|
|
// amount is the supply of the coin.
|
|
cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// QueryParamsRequest defines the request type for querying x/bank parameters.
|
|
message QueryParamsRequest {}
|
|
|
|
// QueryParamsResponse defines the response type for querying x/bank parameters.
|
|
message QueryParamsResponse {
|
|
Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method.
|
|
message QueryDenomsMetadataRequest {
|
|
// pagination defines an optional pagination for the request.
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
}
|
|
|
|
// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC
|
|
// method.
|
|
message QueryDenomsMetadataResponse {
|
|
// metadata provides the client information for all the registered tokens.
|
|
repeated Metadata metadatas = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
|
|
// pagination defines the pagination in the response.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method.
|
|
message QueryDenomMetadataRequest {
|
|
// denom is the coin denom to query the metadata for.
|
|
string denom = 1;
|
|
}
|
|
|
|
// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC
|
|
// method.
|
|
message QueryDenomMetadataResponse {
|
|
// metadata describes and provides all the client information for the requested token.
|
|
Metadata metadata = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query,
|
|
// which queries for a paginated set of all account holders of a particular
|
|
// denomination.
|
|
message QueryDenomOwnersRequest {
|
|
// denom defines the coin denomination to query all account holders for.
|
|
string denom = 1;
|
|
|
|
// pagination defines an optional pagination for the request.
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
|
}
|
|
|
|
// DenomOwner defines structure representing an account that owns or holds a
|
|
// particular denominated token. It contains the account address and account
|
|
// balance of the denominated token.
|
|
//
|
|
// Since: cosmos-sdk 0.46
|
|
message DenomOwner {
|
|
// address defines the address that owns a particular denomination.
|
|
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// balance is the balance of the denominated coin for an account.
|
|
cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
}
|
|
|
|
// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query.
|
|
//
|
|
// Since: cosmos-sdk 0.46
|
|
message QueryDenomOwnersResponse {
|
|
repeated DenomOwner denom_owners = 1;
|
|
|
|
// pagination defines the pagination in the response.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QuerySendEnabledRequest defines the RPC request for looking up SendEnabled entries.
|
|
//
|
|
// Since: cosmos-sdk 0.47
|
|
message QuerySendEnabledRequest {
|
|
// denoms is the specific denoms you want look up. Leave empty to get all entries.
|
|
repeated string denoms = 1;
|
|
// pagination defines an optional pagination for the request. This field is
|
|
// only read if the denoms field is empty.
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 99;
|
|
}
|
|
|
|
// QuerySendEnabledResponse defines the RPC response of a SendEnable query.
|
|
//
|
|
// Since: cosmos-sdk 0.47
|
|
message QuerySendEnabledResponse {
|
|
repeated SendEnabled send_enabled = 1;
|
|
// pagination defines the pagination in the response. This field is only
|
|
// populated if the denoms field in the request is empty.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 99;
|
|
}
|