diff --git a/.github/workflows/release-umee-docker.yml b/.github/workflows/release-umee-docker.yml index d86ed84951..bd2275015d 100644 --- a/.github/workflows/release-umee-docker.yml +++ b/.github/workflows/release-umee-docker.yml @@ -46,6 +46,11 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate swagger docs + run: | + make proto-swagger-gen + make proto-update-swagger-docs - name: Build and push uses: docker/build-push-action@v4 diff --git a/.github/workflows/release-umee.yml b/.github/workflows/release-umee.yml index 5ef76af362..591964ffb6 100644 --- a/.github/workflows/release-umee.yml +++ b/.github/workflows/release-umee.yml @@ -29,6 +29,11 @@ jobs: run: echo "TM_VERSION=$(go list -m github.com/tendermint/tendermint | sed 's:.* ::')" >> $GITHUB_ENV # useful to test builds. However will require to add "push" rule to the "on" section + - name: generate and update swagger docs + run: | + make proto-swagger-gen + make proto-update-swagger-docs + - name: goreleaser test-build uses: goreleaser/goreleaser-action@v4 if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Enable:ReleaseBuild') diff --git a/.gitignore b/.gitignore index 41e4cc9541..e4ee17afb9 100644 --- a/.gitignore +++ b/.gitignore @@ -47,5 +47,10 @@ private* #IntelliJ .idea/ -#VsCode +#Vscode .vscode + +# Swagger UI +swagger/statik/statik.go +swagger/swagger-ui + diff --git a/Makefile b/Makefile index 7eea2e8f0d..cb80315b8a 100644 --- a/Makefile +++ b/Makefile @@ -359,3 +359,8 @@ proto-lint: proto-check-breaking: @echo "Checking for breaking changes" @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main + +proto-update-swagger-docs: + @echo "Updating Protobuf Swagger Docs" + @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \ + sh ./contrib/scripts/protoc-update-swagger-docs.sh; fi \ No newline at end of file diff --git a/README.md b/README.md index 5e2e5da1b6..c9414119a3 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,11 @@ Umee will allow a multitude of decentralized debt products. - [Table of Contents](#table-of-contents) - [Releases](#releases) - [Release Compatibility Matrix](#release-compatibility-matrix) -- [Active Networks](#active-networks) + - [Price Feeder](#price-feeder) + - [libwasmvm](#libwasmvm) + - [Active Networks](#active-networks) - [Build](#build) + - [Recommended Database Backend](#recommended-database-backend) - [Swagger](#swagger) - [Cosmovisor](#cosmovisor) - [Liquidators](#liquidators) @@ -107,6 +110,25 @@ db_backend = "rocksdb" ### Swagger +- To update the latest swagger docs, follow these steps + +Generate the latest swagger: + + ```bash + $ make proto-swagger-gen + $ make proto-update-swagger-docs + ``` + +Build the new binary or install the new binary with the latest swagger docs: + + ```bash + $ make build + # or + $ make install + ``` + +Make sure to execute these commands whenever you want to update the swagger documentation. + - To enable it, modify the node config at `$UMEE_HOME/config/app.toml` to `api.swagger` `true` - Run the node normally `umeed start` - Enter the swagger docs `http://localhost:1317/swagger/` diff --git a/contrib/scripts/protoc-swagger-gen.sh b/contrib/scripts/protoc-swagger-gen.sh index 0d23ccdc6a..dae416773d 100755 --- a/contrib/scripts/protoc-swagger-gen.sh +++ b/contrib/scripts/protoc-swagger-gen.sh @@ -1,8 +1,7 @@ #!/usr/bin/env bash - set -eo pipefail -if ! [ -x "$(command -v swagger-combine )" ]; then +if ! [ -x "$(command -v swagger-combine)" ]; then echo 'Error: swagger-combine is not installed. Install with $~ npm i -g swagger-combine' >&2 exit 1 fi @@ -19,6 +18,7 @@ for dir in $proto_dirs; do done cd .. + # combine swagger files # uses nodejs package `swagger-combine`. # all the individual swagger files need to be configured in `config.json` for merging diff --git a/contrib/scripts/protoc-update-swagger-docs.sh b/contrib/scripts/protoc-update-swagger-docs.sh new file mode 100644 index 0000000000..a2e60ce704 --- /dev/null +++ b/contrib/scripts/protoc-update-swagger-docs.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +set -eo pipefail + +SWAGGER_DIR=./swagger +SWAGGER_UI_DIR=${SWAGGER_DIR}/swagger-ui + +# TODO: needs to fix merge issue of cosmos swagger and ibc-go swagger +# SDK_VERSION=$(go list -m -f '{{ .Version }}' github.com/cosmos/cosmos-sdk) +# IBC_VERSION=$(go list -m -f '{{ .Version }}' github.com/cosmos/ibc-go/v6) + +# SDK_RAW_URL=https://raw.githubusercontent.com/cosmos/cosmos-sdk/${SDK_VERSION}/client/docs/swagger-ui/swagger.yaml +# IBC_RAW_URL=https://raw.githubusercontent.com/cosmos/ibc-go/${IBC_VERSION}/docs/client/swagger-ui/swagger.yaml + +# # download Cosmos SDK swagger yaml file +# echo "SDK version ${SDK_VERSION}" +# wget "${SDK_RAW_URL}" -O ./tmp-swagger-gen/cosmos-sdk-swagger.yaml + +# # download IBC swagger yaml file +# echo "IBC version ${IBC_VERSION}" +# wget "${IBC_RAW_URL}" -O ./tmp-swagger-gen/ibc-go-swagger.yaml + +SWAGGER_UI_VERSION=4.18.3 +SWAGGER_UI_DOWNLOAD_URL=https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${SWAGGER_UI_VERSION}.zip +SWAGGER_UI_PACKAGE_NAME=${SWAGGER_DIR}/swagger-ui-${SWAGGER_UI_VERSION} + +# if swagger-ui does not exist locally, download swagger-ui and move dist directory to +# swagger-ui directory, then remove zip file and unzipped swagger-ui directory +if [ ! -d ${SWAGGER_UI_DIR} ]; then + # download swagger-ui + wget ${SWAGGER_UI_DOWNLOAD_URL} -O ${SWAGGER_UI_PACKAGE_NAME}.zip + # unzip swagger-ui package + unzip ${SWAGGER_UI_PACKAGE_NAME}.zip -d ${SWAGGER_DIR} + # move swagger-ui dist directory to swagger-ui directory + mv ${SWAGGER_UI_PACKAGE_NAME}/dist ${SWAGGER_UI_DIR} + # remove swagger-ui zip file and unzipped swagger-ui directory + rm -rf ${SWAGGER_UI_PACKAGE_NAME}.zip ${SWAGGER_UI_PACKAGE_NAME} + # replacing default swagger with our generated swagger yaml file + sed -i 's+https://petstore.swagger.io/v2/swagger.json+./swagger.yaml+g' ${SWAGGER_DIR}/swagger-ui/swagger-initializer.js +fi + +# move generated swagger yaml file to swagger-ui directory +cp ${SWAGGER_DIR}/swagger.yaml ${SWAGGER_DIR}/swagger-ui/ + +# install statik if not present +go install github.com/rakyll/statik + +# generate statik golang code using updated swagger-ui directory +statik -src=${SWAGGER_DIR}/swagger-ui -dest=${SWAGGER_DIR} -f -m + +# log whether or not the swagger directory was updated +if [ -n "$(git status ${SWAGGER_DIR} --porcelain)" ]; then + echo "Swagger is updated" +else + echo "Swagger in sync" +fi \ No newline at end of file diff --git a/swagger/proto-config-gen.json b/swagger/proto-config-gen.json index f3bfaee077..a658f766ef 100644 --- a/swagger/proto-config-gen.json +++ b/swagger/proto-config-gen.json @@ -21,6 +21,30 @@ "Params": "OracleParams" } } + }, + { + "url": "./tmp-swagger-gen/umee/uibc/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "UIBCParams" + } + } + }, + { + "url": "./tmp-swagger-gen/umee/ugov/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "UGovParams" + } + } + }, + { + "url": "./tmp-swagger-gen/umee/incentive/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "IncentiveParams" + } + } } ] -} +} \ No newline at end of file diff --git a/swagger/statik/init.go b/swagger/statik/init.go new file mode 100644 index 0000000000..defdb7673f --- /dev/null +++ b/swagger/statik/init.go @@ -0,0 +1 @@ +package statik diff --git a/swagger/swagger.go b/swagger/swagger.go index fdfc801c31..604c8bc2e6 100644 --- a/swagger/swagger.go +++ b/swagger/swagger.go @@ -1,18 +1,22 @@ package swagger import ( - "embed" "net/http" "github.com/gorilla/mux" - "github.com/ignite/cli/ignite/pkg/openapiconsole" -) + "github.com/rakyll/statik/fs" -//go:embed swagger.yaml -var Docs embed.FS + // unnamed import of statik for swagger UI support + _ "github.com/umee-network/umee/v5/swagger/statik" +) // RegisterSwaggerAPI registers swagger route with API Server func RegisterSwaggerAPI(rtr *mux.Router) { - rtr.Handle("/swagger.yaml", http.FileServer(http.FS(Docs))) - rtr.HandleFunc("/swagger/", openapiconsole.Handler("umee", "/swagger.yaml")) + statikFS, err := fs.New() + if err != nil { + panic(err) + } + + staticServer := http.FileServer(statikFS) + rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer)) } diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 19d2c72598..8d9e322d50 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -1905,6 +1905,1333 @@ paths: type: string tags: - Query + /umee/uibc/v1/all-outflows: + get: + summary: AllOutflow returns outflows for each denom in the current quota period. + operationId: AllOutflows + responses: + '200': + description: A successful response. + schema: + type: object + properties: + outflows: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + title: QueryOutflowResponse defines response type of Query/Outflow + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/uibc/v1/outflows: + get: + summary: |- + Outflow returns IBC denom outflows in the current quota period. + If denom is not specified, returns sum of all registered outflows. + operationId: Outflows + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + title: QueryOutflowResponse defines response type of Query/Outflow + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: denom + in: query + required: false + type: string + tags: + - Query + /umee/uibc/v1/params: + get: + summary: Params queries the parameters of the x/uibc module. + operationId: UIBCParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + type: object + properties: + ibc_status: + description: >- + ibc_status defines the IBC ICS20 status (transfer quota or + transfers disabled). + type: string + enum: + - IBC_TRANSFER_STATUS_UNSPECIFIED + - IBC_TRANSFER_STATUS_QUOTA_DISABLED + - IBC_TRANSFER_STATUS_QUOTA_ENABLED + - IBC_TRANSFER_STATUS_QUOTA_OUT_DISABLED + - IBC_TRANSFER_STATUS_QUOTA_IN_DISABLED + - IBC_TRANSFER_STATUS_TRANSFERS_PAUSED + default: IBC_TRANSFER_STATUS_UNSPECIFIED + title: >- + IBCTransferStatus status of ibc-transfer quota check for + inflow and outflow + total_quota: + type: string + title: >- + total_quota defines the total outflow limit of + ibc-transfer in USD + token_quota: + type: string + title: token_quota defines the outflow limit per token in USD + quota_duration: + type: string + title: >- + quota_duration defines quota expires for each ibc-transfer + denom in seconds + title: Params of x/uibc module + description: >- + QueryParamsResponse defines the response structure for the Params + gRPC + + service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/ugov/v1/min-gas-price: + get: + summary: MinGasPrice returns minimum transaction fees. + operationId: MinGasPrice + responses: + '200': + description: A successful response. + schema: + type: object + properties: + min_gas_price: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: QueryMinGasPriceResponse response type. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/incentive/v1/account_bonds/{address}: + get: + summary: >- + AccountBonds queries all bonded collateral and unbondings associated + with an account. + operationId: AccountBonds + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bonded: + 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. + unbonding: + 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. + unbondings: + type: array + items: + type: object + properties: + start: + type: string + format: int64 + end: + type: string + format: int64 + uToken: + 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: >- + Unbonding is a structure that tracks an in-progress token + unbonding. + + It tracks both its start time and end time, so that if the + module's + + unbonding time changes, the unbonding can complete at the + earlier of + + its original end time or its new one based on the new + parameter. + description: >- + QueryAccountBondsResponse defines the response structure for the + AccountBonds gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: address + in: path + required: true + type: string + tags: + - Query + /umee/incentive/v1/actual_rates: + get: + summary: >- + ActualRates queries the hypothetical return of a bonded uToken + denomination + + if current incentive rewards continued for one year. The response is an + sdk.Dec + + representing an oracle-adjusted APY. + operationId: ActualRates + responses: + '200': + description: A successful response. + schema: + type: object + properties: + APY: + type: string + description: APY is the oracle price-adjusted APY of the bonded uToken. + description: >- + QueryActualRatesResponse defines the response structure for the + ActualRates gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: uToken + description: >- + uToken is the uToken denomination whose current annual rate of + rewards is being queried. + in: query + required: false + type: string + tags: + - Query + /umee/incentive/v1/current_rates: + get: + summary: >- + CurrentRates queries the hypothetical return of a bonded uToken + denomination + + if current incentive rewards continued for one year. The response is an + sdk.Coins + + of base token rewards, per reference amount (usually 10^exponent of the + uToken.) + operationId: CurrentRates + responses: + '200': + description: A successful response. + schema: + type: object + properties: + reference_bond: + 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. + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + Rewards are the amount of base token rewards that the + reference amount of bonded uTokens would earn + + if current rates continued for a full year. + description: >- + QueryCurrentRatesResponse defines the response structure for the + CurrentRates gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: uToken + description: >- + uToken is the uToken denomination whose current annual rate of + rewards is being queried. + in: query + required: false + type: string + tags: + - Query + /umee/incentive/v1/last_reward_time: + get: + summary: >- + LastRewardTime queries the last block time at which incentive rewards + were calculated. + operationId: LastRewardTime + responses: + '200': + description: A successful response. + schema: + type: object + properties: + time: + type: string + format: int64 + description: >- + QueryLastRewardTimeResponse defines the response structure for the + LastRewardTime gRPC + + service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/incentive/v1/params: + get: + summary: Params queries the parameters of the x/incentive module. + operationId: IncentiveParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + type: object + properties: + max_unbondings: + type: integer + format: int64 + description: >- + max_unbondings is the maximum amount of concurrent + unbondings an address can have + + of each bonded uToken denom. Zero is interpreted as no + limit. + unbonding_duration: + type: string + format: int64 + description: unbonding_duration is the unbonding duration (in seconds). + emergency_unbond_fee: + type: string + description: >- + emergency_unbond_fee is the portion of a bond that is paid + when it is instantly + + released using MsgEmergencyUnbond. For example, 0.01 is a + 1% fee. Ranges 0-1. + description: Params defines the parameters for the incentive module. + description: >- + QueryParamsResponse defines the response structure for the Params + gRPC + + service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/incentive/v1/pending_rewards/{address}: + get: + summary: >- + PendingRewards queries unclaimed incentive rewards associated with an + account. + operationId: PendingRewards + responses: + '200': + description: A successful response. + schema: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + QueryPendingRewardsResponse defines the response structure for the + PendingRewards gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: address + in: path + required: true + type: string + tags: + - Query + /umee/incentive/v1/program/{id}: + get: + summary: IncentiveProgram queries a single incentive program by ID. + operationId: IncentiveProgram + responses: + '200': + description: A successful response. + schema: + type: object + properties: + program: + type: object + properties: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it has + been created. + + It is zero when the program is being proposed by + governance, and is set + + to its final value when the proposal passes. + start_time: + type: string + format: int64 + description: >- + start_time is the unix time (in seconds) at which the + incentives begin. + + If a program is passed after its intended start time, its + start time + + will be increased to the current time, with program + duration unchanged. + duration: + type: string + format: int64 + description: >- + duration is the length of the incentive program from start + time to + + completion in seconds. + uToken: + type: string + description: >- + uToken is the incentivized uToken collateral denom. + Suppliers who collateralize + + this asset then bond it to the incentive module are + eligible for this program's + + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This + can happen when + + a program passes if funding from community fund, or any + time before the + + program's start time if funding with MsgSponsor. A program + that reaches + + its start time without being funded is cancelled. + total_rewards: + 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. + remaining_rewards: + 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: >- + IncentiveProgram defines a liquidity mining incentive program + on a single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryIncentivePrograResponse defines the response structure for + the + + IncentiveProgram gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: id + description: ID specifies which program to query for + in: path + required: true + type: integer + format: int64 + tags: + - Query + /umee/incentive/v1/programs/completed: + get: + summary: >- + CompletedIncentivePrograms queries for all incentives programs that have + been passed + + by governance, and either run to completion or expired immediately due + to not being funded. + operationId: CompletedIncentivePrograms + responses: + '200': + description: A successful response. + schema: + type: object + properties: + programs: + type: array + items: + type: object + properties: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it + has been created. + + It is zero when the program is being proposed by + governance, and is set + + to its final value when the proposal passes. + start_time: + type: string + format: int64 + description: >- + start_time is the unix time (in seconds) at which the + incentives begin. + + If a program is passed after its intended start time, + its start time + + will be increased to the current time, with program + duration unchanged. + duration: + type: string + format: int64 + description: >- + duration is the length of the incentive program from + start time to + + completion in seconds. + uToken: + type: string + description: >- + uToken is the incentivized uToken collateral denom. + Suppliers who collateralize + + this asset then bond it to the incentive module are + eligible for this program's + + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This + can happen when + + a program passes if funding from community fund, or any + time before the + + program's start time if funding with MsgSponsor. A + program that reaches + + its start time without being funded is cancelled. + total_rewards: + 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. + remaining_rewards: + 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: >- + IncentiveProgram defines a liquidity mining incentive + program on a single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryCompletedIncentiveProgramsResponse defines the response + structure for the + + CompletedIncentivePrograms gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/incentive/v1/programs/ongoing: + get: + summary: >- + OngoingIncentivePrograms queries for all incentives programs that have + been passed + + by governance, funded, and started but not yet completed. + operationId: OngoingIncentivePrograms + responses: + '200': + description: A successful response. + schema: + type: object + properties: + programs: + type: array + items: + type: object + properties: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it + has been created. + + It is zero when the program is being proposed by + governance, and is set + + to its final value when the proposal passes. + start_time: + type: string + format: int64 + description: >- + start_time is the unix time (in seconds) at which the + incentives begin. + + If a program is passed after its intended start time, + its start time + + will be increased to the current time, with program + duration unchanged. + duration: + type: string + format: int64 + description: >- + duration is the length of the incentive program from + start time to + + completion in seconds. + uToken: + type: string + description: >- + uToken is the incentivized uToken collateral denom. + Suppliers who collateralize + + this asset then bond it to the incentive module are + eligible for this program's + + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This + can happen when + + a program passes if funding from community fund, or any + time before the + + program's start time if funding with MsgSponsor. A + program that reaches + + its start time without being funded is cancelled. + total_rewards: + 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. + remaining_rewards: + 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: >- + IncentiveProgram defines a liquidity mining incentive + program on a single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryOngoingIncentiveProgramsResponse defines the response + structure for the + + OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC + service handlers. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/incentive/v1/programs/upcoming: + get: + summary: >- + UpcomingIncentivePrograms queries for all incentives programs that have + been passed + + by governance, but not yet started. They may or may not have been + funded. + operationId: UpcomingIncentivePrograms + responses: + '200': + description: A successful response. + schema: + type: object + properties: + programs: + type: array + items: + type: object + properties: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it + has been created. + + It is zero when the program is being proposed by + governance, and is set + + to its final value when the proposal passes. + start_time: + type: string + format: int64 + description: >- + start_time is the unix time (in seconds) at which the + incentives begin. + + If a program is passed after its intended start time, + its start time + + will be increased to the current time, with program + duration unchanged. + duration: + type: string + format: int64 + description: >- + duration is the length of the incentive program from + start time to + + completion in seconds. + uToken: + type: string + description: >- + uToken is the incentivized uToken collateral denom. + Suppliers who collateralize + + this asset then bond it to the incentive module are + eligible for this program's + + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This + can happen when + + a program passes if funding from community fund, or any + time before the + + program's start time if funding with MsgSponsor. A + program that reaches + + its start time without being funded is cancelled. + total_rewards: + 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. + remaining_rewards: + 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: >- + IncentiveProgram defines a liquidity mining incentive + program on a single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryUpcomingIncentiveProgramsResponse defines the response + structure for the + + OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC + service handlers. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /umee/incentive/v1/total_bonded: + get: + summary: TotalBonded queries the sum of all bonded collateral uTokens. + operationId: TotalBonded + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bonded: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + QueryTotalBondedResponse defines the response structure for the + TotalBonded gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: denom + description: >- + denom is an optional field which causes the query to return the + totals of only one uToken. + in: query + required: false + type: string + tags: + - Query + /umee/incentive/v1/total_unbonding: + get: + summary: TotalUnbonding queries the sum of all unbonding collateral uTokens. + operationId: TotalUnbonding + responses: + '200': + description: A successful response. + schema: + type: object + properties: + unbonding: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + QueryTotalUnbondingResponse defines the response structure for the + TotalUnbonding gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: denom + description: >- + denom is an optional field which causes the query to return the + totals of only one uToken. + in: query + required: false + type: string + tags: + - Query definitions: cosmos.base.v1beta1.Coin: type: object @@ -2721,535 +4048,1414 @@ definitions: for the affected Token. - The time span covered by the historic median will be: - oracle.Params.median_stamp_period * oracle.Params.historic_stamp_period * historic_medians. - description: >- - Token defines a token, along with its metadata and parameters, in - the Umee + The time span covered by the historic median will be: + oracle.Params.median_stamp_period * oracle.Params.historic_stamp_period * historic_medians. + description: >- + Token defines a token, along with its metadata and parameters, in + the Umee + + capital facility that can be supplied and borrowed. + + See + https://github.com/umee-network/umee/blob/main/docs/design_docs/010-market-params.md + + for more details. + description: |- + QueryRegisteredTokensResponse defines the response structure for the + RegisteredTokens gRPC service handler. + umee.leverage.v1.Token: + type: object + properties: + base_denom: + type: string + description: >- + Base Denom is the denomination of the underlying base token. Must be + the base + + denom as registered in the Bank module (so IBC denom for IBC tokens). + reserve_factor: + type: string + description: >- + Reserve Factor defines what portion of accrued interest goes to + reserves + + when this token is borrowed. + + Valid values: 0-1. + collateral_weight: + type: string + description: >- + Collateral Weight defines what portion of the total value of the asset + + can contribute to a users borrowing power. If the collateral weight is + + zero, using this asset as collateral against borrowing will be + disabled. + + Must be smaller than `liquidation_threshold`. + + Valid values: 0-1. + liquidation_threshold: + type: string + description: |- + Liquidation Threshold defines what amount of the total value of the + asset as a collateral can contribute to a user's liquidation threshold + (above which they become eligible for liquidation). + Must be bigger than `collateral_weight`. + Valid values: 0-1. + See also: min_close_factor. + base_borrow_rate: + type: string + title: |- + Base Borrow Rate defines the minimum interest rate for borrowing this + asset. + Valid values: 0-∞ + kink_borrow_rate: + type: string + title: |- + Kink Borrow Rate defines the interest rate for borrowing this + asset when supply utilization is equal to 'kink_utilization'. + Valid values: 0-∞ + max_borrow_rate: + type: string + title: |- + Max Borrow Rate defines the interest rate for borrowing this + asset when supply utilization is at its maximum. + Valid values: 0-∞ + kink_utilization: + type: string + description: |- + Kink Utilization defines the supply utilization value where + the kink in the borrow interest rate function occurs. + Valid values: 0-1. + liquidation_incentive: + type: string + description: |- + Liquidation Incentive determines the portion of bonus collateral of + a token type liquidators receive as a liquidation reward. + Valid values: 0-1. + symbol_denom: + type: string + description: Symbol Denom is the human readable denomination of this token. + exponent: + type: integer + format: int64 + description: >- + Exponent is the power of ten by which to multiply, in order to convert + + an amount of the token denoted in its symbol denom to the actual + amount + + of its base denom. + enable_msg_supply: + type: boolean + description: >- + Enable Msg Supply allows supplying for lending or collateral using + this + + token. `false` means that a token can no longer be supplied. + + Note that withdrawing is always enabled. Disabling supply would + + be one step in phasing out an asset type. + enable_msg_borrow: + type: boolean + description: >- + Enable Msg Borrow allows borrowing of this token. Note that repaying + is + + always enabled. Disabling borrowing would be one step in phasing out + an + + asset type, but could also be used from the start for asset types + meant + + to be collateral only, like meTokens. + blacklist: + type: boolean + description: >- + Blacklist should only be used to eliminate an asset completely. A + blacklisted + + asset is treated as though its oracle price is zero, and thus ignored + by + + calculations such as collateral value and borrow limit. Can still be + repaid + + or withdrawn, but not liquidated. A blacklisted token must have + enable_msg_supply + + and enable_msg_borrow set to false. Such tokens can be safely removed + from the + + oracle and price feeder as well. + max_collateral_share: + type: string + description: >- + Max Collateral Share specifies how much of the system's overall + collateral + + can be provided by a given token. 1.0 means that the token has no + restriction. + + 0.1 means maximum 10% of system's total collateral value can be + provided by this token. + + Valid values: 0-1. + max_supply_utilization: + type: string + description: >- + Max Supply Utilization specifies the maximum supply utilization a + token is + + allowed to reach as a direct result of user borrowing. New borrows are + not allowed when + + the supply utilization is above `max_supply_utilization`. + supply_utilization(token) = total_borrowed(token) / total_supply(token) + Valid values: 0-1. + min_collateral_liquidity: + type: string + title: >- + Min Collateral Liquidity specifies min limit for the following + function: + collateral_liquidity(token) = available(token) / total_collateral(token) + Borrowing, collateralizing, or withdrawing assets is not allowed when + the + + result of such action invalidates min_collateral_liquidity. + + Liquidity can only drop below this value due to interest or + liquidations. + + The goal is to assure that there is enough available (not borrowed) + token to be available + + for withdraw when there is a collateral liquidation and the liquidator + needs to + + withdraw uToken. + + Valid values: 0 - inf + max_supply: + type: string + description: >- + Max Supply is the maximum amount of tokens the protocol can hold. + + Adding more supply of the given token to the protocol will return an + error. + + Must be a non negative value. 0 means that there is no limit. + + To mark a token as not valid for supply, `msg_supply` must be set to + false. + historic_medians: + type: integer + format: int64 + description: >- + Historic Medians is the number of median historic prices to request + from + + the oracle module when evaluating new borrow positions containing this + token. + + All MsgBorrow, MsgWithdraw, and MsgDecollateralize must result in + healthy + + borrow positions under both current and historic prices. The default + value of + + zero for this field causes current price to be used in those + calculations + + for the affected Token. + + The time span covered by the historic median will be: + oracle.Params.median_stamp_period * oracle.Params.historic_stamp_period * historic_medians. + description: >- + Token defines a token, along with its metadata and parameters, in the Umee + + capital facility that can be supplied and borrowed. - capital facility that can be supplied and borrowed. + See + https://github.com/umee-network/umee/blob/main/docs/design_docs/010-market-params.md - See - https://github.com/umee-network/umee/blob/main/docs/design_docs/010-market-params.md + for more details. + cosmos.base.v1beta1.DecCoin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - for more details. + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + umee.oracle.v1.AggregateExchangeRatePrevote: + type: object + properties: + hash: + type: string + voter: + type: string + submit_block: + type: string + format: uint64 + title: |- + AggregateExchangeRatePrevote - + struct for aggregate prevoting on the ExchangeRateVote. + The purpose of aggregate prevote is to hide vote exchange rates with hash + which is formatted as hex string in SHA256("{salt}:{exchange + rate}{denom},...,{exchange rate}{denom}:{voter}") + umee.oracle.v1.AggregateExchangeRateVote: + type: object + properties: + exchange_rate_tuples: + type: array + items: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates data + to store + voter: + type: string description: |- - QueryRegisteredTokensResponse defines the response structure for the - RegisteredTokens gRPC service handler. - umee.leverage.v1.Token: + AggregateExchangeRateVote - struct for voting on + the exchange rates of USD denominated in various assets. + umee.oracle.v1.Denom: type: object properties: base_denom: type: string - description: >- - Base Denom is the denomination of the underlying base token. Must be - the base - - denom as registered in the Bank module (so IBC denom for IBC tokens). - reserve_factor: + symbol_denom: type: string - description: >- - Reserve Factor defines what portion of accrued interest goes to - reserves - - when this token is borrowed. - - Valid values: 0-1. - collateral_weight: + exponent: + type: integer + format: int64 + title: Denom - the object to hold configurations of each denom + umee.oracle.v1.ExchangeRateTuple: + type: object + properties: + denom: type: string - description: >- - Collateral Weight defines what portion of the total value of the asset - - can contribute to a users borrowing power. If the collateral weight is - - zero, using this asset as collateral against borrowing will be - disabled. - - Must be smaller than `liquidation_threshold`. - - Valid values: 0-1. - liquidation_threshold: + exchange_rate: type: string - description: |- - Liquidation Threshold defines what amount of the total value of the - asset as a collateral can contribute to a user's liquidation threshold - (above which they become eligible for liquidation). - Must be bigger than `collateral_weight`. - Valid values: 0-1. - See also: min_close_factor. - base_borrow_rate: + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates data to + store + umee.oracle.v1.Params: + type: object + properties: + vote_period: type: string - title: |- - Base Borrow Rate defines the minimum interest rate for borrowing this - asset. - Valid values: 0-∞ - kink_borrow_rate: + format: uint64 + vote_threshold: type: string - title: |- - Kink Borrow Rate defines the interest rate for borrowing this - asset when supply utilization is equal to 'kink_utilization'. - Valid values: 0-∞ - max_borrow_rate: + reward_band: type: string - title: |- - Max Borrow Rate defines the interest rate for borrowing this - asset when supply utilization is at its maximum. - Valid values: 0-∞ - kink_utilization: + reward_distribution_window: + type: string + format: uint64 + accept_list: + type: array + items: + type: object + properties: + base_denom: + type: string + symbol_denom: + type: string + exponent: + type: integer + format: int64 + title: Denom - the object to hold configurations of each denom + slash_fraction: + type: string + slash_window: type: string + format: uint64 + min_valid_per_window: + type: string + historic_stamp_period: + type: string + format: uint64 description: |- - Kink Utilization defines the supply utilization value where - the kink in the borrow interest rate function occurs. - Valid values: 0-1. - liquidation_incentive: + Historic Stamp Period represents the amount of blocks the oracle + module waits before recording a new historic price. + median_stamp_period: type: string + format: uint64 description: |- - Liquidation Incentive determines the portion of bonus collateral of - a token type liquidators receive as a liquidation reward. - Valid values: 0-1. - symbol_denom: + Median Stamp Period represents the amount blocks the oracle module + waits between calculating and stamping a new median and standard + deviation of that median. + maximum_price_stamps: type: string - description: Symbol Denom is the human readable denomination of this token. - exponent: - type: integer - format: int64 + format: uint64 + description: |- + Maximum Price Stamps represents the maximum amount of historic prices + the oracle module will store before pruning via FIFO. + maximum_median_stamps: + type: string + format: uint64 + description: |- + Maximum Median Stamps represents the maximum amount of medians the + oracle module will store before pruning via FIFO. + description: Params defines the parameters for the oracle module. + umee.oracle.v1.Price: + type: object + properties: + exchange_rate_tuple: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates data to + store + block_num: + type: string + format: uint64 + title: Price is an instance of a price "stamp" + umee.oracle.v1.QueryActiveExchangeRatesResponse: + type: object + properties: + active_rates: + type: array + items: + type: string description: >- - Exponent is the power of ten by which to multiply, in order to convert + activeRates defines a list of the denomination which oracle prices + agreed + + upon. + description: |- + QueryActiveExchangeRatesResponse is response type for the + Query/ActiveExchangeRates RPC method. + umee.oracle.v1.QueryAggregatePrevoteResponse: + type: object + properties: + aggregate_prevote: + type: object + properties: + hash: + type: string + voter: + type: string + submit_block: + type: string + format: uint64 + title: >- + AggregateExchangeRatePrevote - + + struct for aggregate prevoting on the ExchangeRateVote. + + The purpose of aggregate prevote is to hide vote exchange rates with + hash + + which is formatted as hex string in SHA256("{salt}:{exchange + + rate}{denom},...,{exchange rate}{denom}:{voter}") + description: |- + QueryAggregatePrevoteResponse is response type for the + Query/AggregatePrevote RPC method. + umee.oracle.v1.QueryAggregatePrevotesResponse: + type: object + properties: + aggregate_prevotes: + type: array + items: + type: object + properties: + hash: + type: string + voter: + type: string + submit_block: + type: string + format: uint64 + title: >- + AggregateExchangeRatePrevote - - an amount of the token denoted in its symbol denom to the actual - amount + struct for aggregate prevoting on the ExchangeRateVote. - of its base denom. - enable_msg_supply: - type: boolean - description: >- - Enable Msg Supply allows supplying for lending or collateral using - this + The purpose of aggregate prevote is to hide vote exchange rates with + hash - token. `false` means that a token can no longer be supplied. + which is formatted as hex string in SHA256("{salt}:{exchange - Note that withdrawing is always enabled. Disabling supply would + rate}{denom},...,{exchange rate}{denom}:{voter}") + title: >- + aggregate_prevotes defines all oracle aggregate prevotes submitted in + the - be one step in phasing out an asset type. - enable_msg_borrow: - type: boolean - description: >- - Enable Msg Borrow allows borrowing of this token. Note that repaying - is + current vote period + description: |- + QueryAggregatePrevotesResponse is response type for the + Query/AggregatePrevotes RPC method. + umee.oracle.v1.QueryAggregateVoteResponse: + type: object + properties: + aggregate_vote: + title: >- + aggregate_vote defines oracle aggregate vote submitted by a validator + in - always enabled. Disabling borrowing would be one step in phasing out - an + the current vote period + type: object + properties: + exchange_rate_tuples: + type: array + items: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates + data to store + voter: + type: string + description: |- + AggregateExchangeRateVote - struct for voting on + the exchange rates of USD denominated in various assets. + description: |- + QueryAggregateVoteResponse is response type for the + Query/AggregateVote RPC method. + umee.oracle.v1.QueryAggregateVotesResponse: + type: object + properties: + aggregate_votes: + type: array + items: + type: object + properties: + exchange_rate_tuples: + type: array + items: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates + data to store + voter: + type: string + description: |- + AggregateExchangeRateVote - struct for voting on + the exchange rates of USD denominated in various assets. + title: >- + aggregate_votes defines all oracle aggregate votes submitted in the + current - asset type, but could also be used from the start for asset types - meant + vote period + description: |- + QueryAggregateVotesResponse is response type for the + Query/AggregateVotes RPC method. + umee.oracle.v1.QueryAvgPriceResponse: + type: object + properties: + price: + type: string + title: QueryAvgPriceResponse is a response type for AvgPrice method + umee.oracle.v1.QueryExchangeRatesResponse: + type: object + properties: + exchange_rates: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - to be collateral only, like meTokens. - blacklist: - type: boolean + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + exchange_rates defines a list of the exchange rate for all whitelisted + denoms. + description: |- + QueryExchangeRatesResponse is response type for the + Query/ExchangeRates RPC method. + umee.oracle.v1.QueryFeederDelegationResponse: + type: object + properties: + feeder_addr: + type: string + title: feeder_addr defines the feeder delegation of a validator + description: |- + QueryFeederDelegationResponse is response type for the + Query/FeederDelegation RPC method. + umee.oracle.v1.QueryMedianDeviationsResponse: + type: object + properties: + medianDeviations: + type: array + items: + type: object + properties: + exchange_rate_tuple: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates + data to store + block_num: + type: string + format: uint64 + title: Price is an instance of a price "stamp" description: >- - Blacklist should only be used to eliminate an asset completely. A - blacklisted - - asset is treated as though its oracle price is zero, and thus ignored - by - - calculations such as collateral value and borrow limit. Can still be - repaid - - or withdrawn, but not liquidated. A blacklisted token must have - enable_msg_supply - - and enable_msg_borrow set to false. Such tokens can be safely removed - from the + medians defines a list of the median deviations for all stamped + denoms. + description: |- + QueryMedianDeviationsResponse is response type for the + Query/MedianDeviations RPC method. + umee.oracle.v1.QueryMediansResponse: + type: object + properties: + medians: + type: array + items: + type: object + properties: + exchange_rate_tuple: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates + data to store + block_num: + type: string + format: uint64 + title: Price is an instance of a price "stamp" + description: medians defines a list of the medians for all stamped denoms. + description: |- + QueryMediansResponse is response type for the + Query/Medians RPC method. + umee.oracle.v1.QueryMissCounterResponse: + type: object + properties: + miss_counter: + type: string + format: uint64 + title: miss_counter defines the oracle miss counter of a validator + description: |- + QueryMissCounterResponse is response type for the + Query/MissCounter RPC method. + umee.oracle.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + vote_period: + type: string + format: uint64 + vote_threshold: + type: string + reward_band: + type: string + reward_distribution_window: + type: string + format: uint64 + accept_list: + type: array + items: + type: object + properties: + base_denom: + type: string + symbol_denom: + type: string + exponent: + type: integer + format: int64 + title: Denom - the object to hold configurations of each denom + slash_fraction: + type: string + slash_window: + type: string + format: uint64 + min_valid_per_window: + type: string + historic_stamp_period: + type: string + format: uint64 + description: |- + Historic Stamp Period represents the amount of blocks the oracle + module waits before recording a new historic price. + median_stamp_period: + type: string + format: uint64 + description: |- + Median Stamp Period represents the amount blocks the oracle module + waits between calculating and stamping a new median and standard + deviation of that median. + maximum_price_stamps: + type: string + format: uint64 + description: >- + Maximum Price Stamps represents the maximum amount of historic + prices - oracle and price feeder as well. - max_collateral_share: + the oracle module will store before pruning via FIFO. + maximum_median_stamps: + type: string + format: uint64 + description: |- + Maximum Median Stamps represents the maximum amount of medians the + oracle module will store before pruning via FIFO. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + umee.oracle.v1.QuerySlashWindowResponse: + type: object + properties: + window_progress: type: string + format: uint64 + description: |- + window_progress defines the number of voting periods + since the last slashing event would have taken place. + description: |- + QuerySlashWindowResponse is response type for the + Query/SlashWindow RPC method. + umee.uibc.v1.IBCTransferStatus: + type: string + enum: + - IBC_TRANSFER_STATUS_UNSPECIFIED + - IBC_TRANSFER_STATUS_QUOTA_DISABLED + - IBC_TRANSFER_STATUS_QUOTA_ENABLED + - IBC_TRANSFER_STATUS_QUOTA_OUT_DISABLED + - IBC_TRANSFER_STATUS_QUOTA_IN_DISABLED + - IBC_TRANSFER_STATUS_TRANSFERS_PAUSED + default: IBC_TRANSFER_STATUS_UNSPECIFIED + description: |- + - IBC_TRANSFER_STATUS_UNSPECIFIED: UNSPECIFIED defines a no-op status. + - IBC_TRANSFER_STATUS_QUOTA_DISABLED: DISABLED: all inflow and outflow quota checks are disabled. + - IBC_TRANSFER_STATUS_QUOTA_ENABLED: ENABLED: all inflow and outflow quota checks are enabled. + - IBC_TRANSFER_STATUS_QUOTA_OUT_DISABLED: DISABLED OUT: outflow quota check is disabled, while the inflow quota check is enabled. + - IBC_TRANSFER_STATUS_QUOTA_IN_DISABLED: DISABLED IN: inflow quota check is disabled, while the outflow quota check is enabled. + - IBC_TRANSFER_STATUS_TRANSFERS_PAUSED: PAUSED: all IBC transfers are paused. + title: >- + IBCTransferStatus status of ibc-transfer quota check for inflow and + outflow + umee.uibc.v1.Params: + type: object + properties: + ibc_status: description: >- - Max Collateral Share specifies how much of the system's overall - collateral - - can be provided by a given token. 1.0 means that the token has no - restriction. - - 0.1 means maximum 10% of system's total collateral value can be - provided by this token. - - Valid values: 0-1. - max_supply_utilization: + ibc_status defines the IBC ICS20 status (transfer quota or transfers + disabled). type: string - description: >- - Max Supply Utilization specifies the maximum supply utilization a - token is - - allowed to reach as a direct result of user borrowing. New borrows are - not allowed when - - the supply utilization is above `max_supply_utilization`. - supply_utilization(token) = total_borrowed(token) / total_supply(token) - Valid values: 0-1. - min_collateral_liquidity: + enum: + - IBC_TRANSFER_STATUS_UNSPECIFIED + - IBC_TRANSFER_STATUS_QUOTA_DISABLED + - IBC_TRANSFER_STATUS_QUOTA_ENABLED + - IBC_TRANSFER_STATUS_QUOTA_OUT_DISABLED + - IBC_TRANSFER_STATUS_QUOTA_IN_DISABLED + - IBC_TRANSFER_STATUS_TRANSFERS_PAUSED + default: IBC_TRANSFER_STATUS_UNSPECIFIED + title: >- + IBCTransferStatus status of ibc-transfer quota check for inflow and + outflow + total_quota: + type: string + title: total_quota defines the total outflow limit of ibc-transfer in USD + token_quota: + type: string + title: token_quota defines the outflow limit per token in USD + quota_duration: type: string title: >- - Min Collateral Liquidity specifies min limit for the following - function: - collateral_liquidity(token) = available(token) / total_collateral(token) - Borrowing, collateralizing, or withdrawing assets is not allowed when - the - - result of such action invalidates min_collateral_liquidity. - - Liquidity can only drop below this value due to interest or - liquidations. + quota_duration defines quota expires for each ibc-transfer denom in + seconds + title: Params of x/uibc module + umee.uibc.v1.QueryAllOutflowsResponse: + type: object + properties: + outflows: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - The goal is to assure that there is enough available (not borrowed) - token to be available + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + title: QueryOutflowResponse defines response type of Query/Outflow + umee.uibc.v1.QueryOutflowsResponse: + type: object + properties: + amount: + type: string + title: QueryOutflowResponse defines response type of Query/Outflow + umee.uibc.v1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + ibc_status: + description: >- + ibc_status defines the IBC ICS20 status (transfer quota or + transfers disabled). + type: string + enum: + - IBC_TRANSFER_STATUS_UNSPECIFIED + - IBC_TRANSFER_STATUS_QUOTA_DISABLED + - IBC_TRANSFER_STATUS_QUOTA_ENABLED + - IBC_TRANSFER_STATUS_QUOTA_OUT_DISABLED + - IBC_TRANSFER_STATUS_QUOTA_IN_DISABLED + - IBC_TRANSFER_STATUS_TRANSFERS_PAUSED + default: IBC_TRANSFER_STATUS_UNSPECIFIED + title: >- + IBCTransferStatus status of ibc-transfer quota check for inflow + and outflow + total_quota: + type: string + title: total_quota defines the total outflow limit of ibc-transfer in USD + token_quota: + type: string + title: token_quota defines the outflow limit per token in USD + quota_duration: + type: string + title: >- + quota_duration defines quota expires for each ibc-transfer denom + in seconds + title: Params of x/uibc module + description: |- + QueryParamsResponse defines the response structure for the Params gRPC + service handler. + umee.ugov.v1.QueryMinGasPriceResponse: + type: object + properties: + min_gas_price: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - for withdraw when there is a collateral liquidation and the liquidator - needs to + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: QueryMinGasPriceResponse response type. + umee.incentive.v1.IncentiveProgram: + type: object + properties: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it has been + created. - withdraw uToken. + It is zero when the program is being proposed by governance, and is + set - Valid values: 0 - inf - max_supply: + to its final value when the proposal passes. + start_time: type: string + format: int64 description: >- - Max Supply is the maximum amount of tokens the protocol can hold. - - Adding more supply of the given token to the protocol will return an - error. + start_time is the unix time (in seconds) at which the incentives + begin. - Must be a non negative value. 0 means that there is no limit. + If a program is passed after its intended start time, its start time - To mark a token as not valid for supply, `msg_supply` must be set to - false. - historic_medians: - type: integer + will be increased to the current time, with program duration + unchanged. + duration: + type: string format: int64 + description: |- + duration is the length of the incentive program from start time to + completion in seconds. + uToken: + type: string description: >- - Historic Medians is the number of median historic prices to request - from - - the oracle module when evaluating new borrow positions containing this - token. - - All MsgBorrow, MsgWithdraw, and MsgDecollateralize must result in - healthy + uToken is the incentivized uToken collateral denom. Suppliers who + collateralize - borrow positions under both current and historic prices. The default - value of + this asset then bond it to the incentive module are eligible for this + program's - zero for this field causes current price to be used in those - calculations + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This can happen + when - for the affected Token. + a program passes if funding from community fund, or any time before + the - The time span covered by the historic median will be: - oracle.Params.median_stamp_period * oracle.Params.historic_stamp_period * historic_medians. - description: >- - Token defines a token, along with its metadata and parameters, in the Umee + program's start time if funding with MsgSponsor. A program that + reaches - capital facility that can be supplied and borrowed. + its start time without being funded is cancelled. + total_rewards: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - See - https://github.com/umee-network/umee/blob/main/docs/design_docs/010-market-params.md + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + remaining_rewards: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - for more details. - cosmos.base.v1beta1.DecCoin: - type: object - properties: - denom: - type: string - amount: - type: string + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - umee.oracle.v1.AggregateExchangeRatePrevote: + IncentiveProgram defines a liquidity mining incentive program on a single + locked uToken denom that will run for a set amount of time. + umee.incentive.v1.Params: type: object properties: - hash: - type: string - voter: + max_unbondings: + type: integer + format: int64 + description: >- + max_unbondings is the maximum amount of concurrent unbondings an + address can have + + of each bonded uToken denom. Zero is interpreted as no limit. + unbonding_duration: type: string - submit_block: + format: int64 + description: unbonding_duration is the unbonding duration (in seconds). + emergency_unbond_fee: type: string - format: uint64 - title: |- - AggregateExchangeRatePrevote - - struct for aggregate prevoting on the ExchangeRateVote. - The purpose of aggregate prevote is to hide vote exchange rates with hash - which is formatted as hex string in SHA256("{salt}:{exchange - rate}{denom},...,{exchange rate}{denom}:{voter}") - umee.oracle.v1.AggregateExchangeRateVote: + description: >- + emergency_unbond_fee is the portion of a bond that is paid when it is + instantly + + released using MsgEmergencyUnbond. For example, 0.01 is a 1% fee. + Ranges 0-1. + description: Params defines the parameters for the incentive module. + umee.incentive.v1.QueryAccountBondsResponse: type: object properties: - exchange_rate_tuples: + bonded: type: array items: type: object properties: denom: type: string - exchange_rate: + amount: type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates data - to store - voter: - type: string - description: |- - AggregateExchangeRateVote - struct for voting on - the exchange rates of USD denominated in various assets. - umee.oracle.v1.Denom: - type: object - properties: - base_denom: - type: string - symbol_denom: - type: string - exponent: - type: integer - format: int64 - title: Denom - the object to hold configurations of each denom - umee.oracle.v1.ExchangeRateTuple: + 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. + unbonding: + 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. + unbondings: + type: array + items: + type: object + properties: + start: + type: string + format: int64 + end: + type: string + format: int64 + uToken: + 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: |- + Unbonding is a structure that tracks an in-progress token unbonding. + It tracks both its start time and end time, so that if the module's + unbonding time changes, the unbonding can complete at the earlier of + its original end time or its new one based on the new parameter. + description: >- + QueryAccountBondsResponse defines the response structure for the + AccountBonds gRPC service handler. + umee.incentive.v1.QueryActualRatesResponse: type: object properties: - denom: - type: string - exchange_rate: + APY: type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates data to - store - umee.oracle.v1.Params: + description: APY is the oracle price-adjusted APY of the bonded uToken. + description: >- + QueryActualRatesResponse defines the response structure for the + ActualRates gRPC service handler. + umee.incentive.v1.QueryCompletedIncentiveProgramsResponse: type: object properties: - vote_period: - type: string - format: uint64 - vote_threshold: - type: string - reward_band: - type: string - reward_distribution_window: - type: string - format: uint64 - accept_list: + programs: type: array items: type: object properties: - base_denom: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it has been + created. + + It is zero when the program is being proposed by governance, and + is set + + to its final value when the proposal passes. + start_time: type: string - symbol_denom: + format: int64 + description: >- + start_time is the unix time (in seconds) at which the incentives + begin. + + If a program is passed after its intended start time, its start + time + + will be increased to the current time, with program duration + unchanged. + duration: type: string - exponent: - type: integer format: int64 - title: Denom - the object to hold configurations of each denom - slash_fraction: - type: string - slash_window: - type: string - format: uint64 - min_valid_per_window: - type: string - historic_stamp_period: - type: string - format: uint64 - description: |- - Historic Stamp Period represents the amount of blocks the oracle - module waits before recording a new historic price. - median_stamp_period: - type: string - format: uint64 - description: |- - Median Stamp Period represents the amount blocks the oracle module - waits between calculating and stamping a new median and standard - deviation of that median. - maximum_price_stamps: - type: string - format: uint64 - description: |- - Maximum Price Stamps represents the maximum amount of historic prices - the oracle module will store before pruning via FIFO. - maximum_median_stamps: - type: string - format: uint64 - description: |- - Maximum Median Stamps represents the maximum amount of medians the - oracle module will store before pruning via FIFO. - description: Params defines the parameters for the oracle module. - umee.oracle.v1.Price: + description: >- + duration is the length of the incentive program from start time + to + + completion in seconds. + uToken: + type: string + description: >- + uToken is the incentivized uToken collateral denom. Suppliers + who collateralize + + this asset then bond it to the incentive module are eligible for + this program's + + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This can + happen when + + a program passes if funding from community fund, or any time + before the + + program's start time if funding with MsgSponsor. A program that + reaches + + its start time without being funded is cancelled. + total_rewards: + 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. + remaining_rewards: + 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: >- + IncentiveProgram defines a liquidity mining incentive program on a + single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryCompletedIncentiveProgramsResponse defines the response structure for + the + + CompletedIncentivePrograms gRPC service handler. + umee.incentive.v1.QueryCurrentRatesResponse: type: object properties: - exchange_rate_tuple: + reference_bond: type: object properties: denom: type: string - exchange_rate: + amount: type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates data to - store - block_num: - type: string - format: uint64 - title: Price is an instance of a price "stamp" - umee.oracle.v1.QueryActiveExchangeRatesResponse: - type: object - properties: - active_rates: + 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. + rewards: type: array items: - type: string + 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: >- - activeRates defines a list of the denomination which oracle prices - agreed + Rewards are the amount of base token rewards that the reference amount + of bonded uTokens would earn - upon. - description: |- - QueryActiveExchangeRatesResponse is response type for the - Query/ActiveExchangeRates RPC method. - umee.oracle.v1.QueryAggregatePrevoteResponse: + if current rates continued for a full year. + description: >- + QueryCurrentRatesResponse defines the response structure for the + CurrentRates gRPC service handler. + umee.incentive.v1.QueryIncentiveProgramResponse: type: object properties: - aggregate_prevote: + program: type: object properties: - hash: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it has been + created. + + It is zero when the program is being proposed by governance, and + is set + + to its final value when the proposal passes. + start_time: type: string - voter: + format: int64 + description: >- + start_time is the unix time (in seconds) at which the incentives + begin. + + If a program is passed after its intended start time, its start + time + + will be increased to the current time, with program duration + unchanged. + duration: type: string - submit_block: + format: int64 + description: |- + duration is the length of the incentive program from start time to + completion in seconds. + uToken: type: string - format: uint64 - title: >- - AggregateExchangeRatePrevote - + description: >- + uToken is the incentivized uToken collateral denom. Suppliers who + collateralize - struct for aggregate prevoting on the ExchangeRateVote. + this asset then bond it to the incentive module are eligible for + this program's - The purpose of aggregate prevote is to hide vote exchange rates with - hash + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This can + happen when - which is formatted as hex string in SHA256("{salt}:{exchange + a program passes if funding from community fund, or any time + before the - rate}{denom},...,{exchange rate}{denom}:{voter}") + program's start time if funding with MsgSponsor. A program that + reaches + + its start time without being funded is cancelled. + total_rewards: + 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. + remaining_rewards: + 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: >- + IncentiveProgram defines a liquidity mining incentive program on a + single + + locked uToken denom that will run for a set amount of time. description: |- - QueryAggregatePrevoteResponse is response type for the - Query/AggregatePrevote RPC method. - umee.oracle.v1.QueryAggregatePrevotesResponse: + QueryIncentivePrograResponse defines the response structure for the + IncentiveProgram gRPC service handler. + umee.incentive.v1.QueryLastRewardTimeResponse: type: object properties: - aggregate_prevotes: + time: + type: string + format: int64 + description: >- + QueryLastRewardTimeResponse defines the response structure for the + LastRewardTime gRPC + + service handler. + umee.incentive.v1.QueryOngoingIncentiveProgramsResponse: + type: object + properties: + programs: type: array items: type: object properties: - hash: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it has been + created. + + It is zero when the program is being proposed by governance, and + is set + + to its final value when the proposal passes. + start_time: type: string - voter: + format: int64 + description: >- + start_time is the unix time (in seconds) at which the incentives + begin. + + If a program is passed after its intended start time, its start + time + + will be increased to the current time, with program duration + unchanged. + duration: type: string - submit_block: + format: int64 + description: >- + duration is the length of the incentive program from start time + to + + completion in seconds. + uToken: type: string - format: uint64 - title: >- - AggregateExchangeRatePrevote - + description: >- + uToken is the incentivized uToken collateral denom. Suppliers + who collateralize - struct for aggregate prevoting on the ExchangeRateVote. + this asset then bond it to the incentive module are eligible for + this program's - The purpose of aggregate prevote is to hide vote exchange rates with - hash + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This can + happen when - which is formatted as hex string in SHA256("{salt}:{exchange + a program passes if funding from community fund, or any time + before the - rate}{denom},...,{exchange rate}{denom}:{voter}") - title: >- - aggregate_prevotes defines all oracle aggregate prevotes submitted in - the + program's start time if funding with MsgSponsor. A program that + reaches - current vote period - description: |- - QueryAggregatePrevotesResponse is response type for the - Query/AggregatePrevotes RPC method. - umee.oracle.v1.QueryAggregateVoteResponse: - type: object - properties: - aggregate_vote: - title: >- - aggregate_vote defines oracle aggregate vote submitted by a validator - in + its start time without being funded is cancelled. + total_rewards: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - the current vote period - type: object - properties: - exchange_rate_tuples: - type: array - items: + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + remaining_rewards: type: object properties: denom: type: string - exchange_rate: + amount: type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates - data to store - voter: + 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: >- + IncentiveProgram defines a liquidity mining incentive program on a + single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryOngoingIncentiveProgramsResponse defines the response structure for + the + + OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service + handlers. + umee.incentive.v1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + max_unbondings: + type: integer + format: int64 + description: >- + max_unbondings is the maximum amount of concurrent unbondings an + address can have + + of each bonded uToken denom. Zero is interpreted as no limit. + unbonding_duration: type: string - description: |- - AggregateExchangeRateVote - struct for voting on - the exchange rates of USD denominated in various assets. + format: int64 + description: unbonding_duration is the unbonding duration (in seconds). + emergency_unbond_fee: + type: string + description: >- + emergency_unbond_fee is the portion of a bond that is paid when it + is instantly + + released using MsgEmergencyUnbond. For example, 0.01 is a 1% fee. + Ranges 0-1. + description: Params defines the parameters for the incentive module. description: |- - QueryAggregateVoteResponse is response type for the - Query/AggregateVote RPC method. - umee.oracle.v1.QueryAggregateVotesResponse: + QueryParamsResponse defines the response structure for the Params gRPC + service handler. + umee.incentive.v1.QueryPendingRewardsResponse: type: object properties: - aggregate_votes: + rewards: type: array items: type: object properties: - exchange_rate_tuples: - type: array - items: - type: object - properties: - denom: - type: string - exchange_rate: - type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates - data to store - voter: + denom: + type: string + amount: type: string description: |- - AggregateExchangeRateVote - struct for voting on - the exchange rates of USD denominated in various assets. - title: >- - aggregate_votes defines all oracle aggregate votes submitted in the - current + Coin defines a token with a denomination and an amount. - vote period - description: |- - QueryAggregateVotesResponse is response type for the - Query/AggregateVotes RPC method. - umee.oracle.v1.QueryAvgPriceResponse: - type: object - properties: - price: - type: string - title: QueryAvgPriceResponse is a response type for AvgPrice method - umee.oracle.v1.QueryExchangeRatesResponse: + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QueryPendingRewardsResponse defines the response structure for the + PendingRewards gRPC service handler. + umee.incentive.v1.QueryTotalBondedResponse: type: object properties: - exchange_rates: + bonded: type: array items: type: object @@ -3259,163 +5465,159 @@ definitions: amount: type: string description: |- - DecCoin defines a token with a denomination and a decimal amount. + Coin defines a token with a denomination and an amount. - NOTE: The amount field is an Dec which implements the custom method + NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. - description: |- - exchange_rates defines a list of the exchange rate for all whitelisted - denoms. - description: |- - QueryExchangeRatesResponse is response type for the - Query/ExchangeRates RPC method. - umee.oracle.v1.QueryFeederDelegationResponse: - type: object - properties: - feeder_addr: - type: string - title: feeder_addr defines the feeder delegation of a validator - description: |- - QueryFeederDelegationResponse is response type for the - Query/FeederDelegation RPC method. - umee.oracle.v1.QueryMedianDeviationsResponse: + description: >- + QueryTotalBondedResponse defines the response structure for the + TotalBonded gRPC service handler. + umee.incentive.v1.QueryTotalUnbondingResponse: type: object properties: - medianDeviations: + unbonding: type: array items: type: object properties: - exchange_rate_tuple: - type: object - properties: - denom: - type: string - exchange_rate: - type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates - data to store - block_num: + denom: type: string - format: uint64 - title: Price is an instance of a price "stamp" - description: >- - medians defines a list of the median deviations for all stamped - denoms. - description: |- - QueryMedianDeviationsResponse is response type for the - Query/MedianDeviations RPC method. - umee.oracle.v1.QueryMediansResponse: + 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: >- + QueryTotalUnbondingResponse defines the response structure for the + TotalUnbonding gRPC service handler. + umee.incentive.v1.QueryUpcomingIncentiveProgramsResponse: type: object properties: - medians: + programs: type: array items: type: object properties: - exchange_rate_tuple: + ID: + type: integer + format: int64 + description: >- + ID uniquely identifies the incentive program after it has been + created. + + It is zero when the program is being proposed by governance, and + is set + + to its final value when the proposal passes. + start_time: + type: string + format: int64 + description: >- + start_time is the unix time (in seconds) at which the incentives + begin. + + If a program is passed after its intended start time, its start + time + + will be increased to the current time, with program duration + unchanged. + duration: + type: string + format: int64 + description: >- + duration is the length of the incentive program from start time + to + + completion in seconds. + uToken: + type: string + description: >- + uToken is the incentivized uToken collateral denom. Suppliers + who collateralize + + this asset then bond it to the incentive module are eligible for + this program's + + rewards. + funded: + type: boolean + description: >- + funded indicates whether a program bas been funded. This can + happen when + + a program passes if funding from community fund, or any time + before the + + program's start time if funding with MsgSponsor. A program that + reaches + + its start time without being funded is cancelled. + total_rewards: type: object properties: denom: type: string - exchange_rate: + amount: type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates - data to store - block_num: - type: string - format: uint64 - title: Price is an instance of a price "stamp" - description: medians defines a list of the medians for all stamped denoms. - description: |- - QueryMediansResponse is response type for the - Query/Medians RPC method. - umee.oracle.v1.QueryMissCounterResponse: - type: object - properties: - miss_counter: - type: string - format: uint64 - title: miss_counter defines the oracle miss counter of a validator - description: |- - QueryMissCounterResponse is response type for the - Query/MissCounter RPC method. - umee.oracle.v1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - vote_period: - type: string - format: uint64 - vote_threshold: - type: string - reward_band: - type: string - reward_distribution_window: - type: string - format: uint64 - accept_list: - type: array - items: + 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. + remaining_rewards: type: object properties: - base_denom: + denom: type: string - symbol_denom: + amount: type: string - exponent: - type: integer - format: int64 - title: Denom - the object to hold configurations of each denom - slash_fraction: - type: string - slash_window: - type: string - format: uint64 - min_valid_per_window: - type: string - historic_stamp_period: - type: string - format: uint64 - description: |- - Historic Stamp Period represents the amount of blocks the oracle - module waits before recording a new historic price. - median_stamp_period: - type: string - format: uint64 - description: |- - Median Stamp Period represents the amount blocks the oracle module - waits between calculating and stamping a new median and standard - deviation of that median. - maximum_price_stamps: - type: string - format: uint64 - description: >- - Maximum Price Stamps represents the maximum amount of historic - prices + description: >- + Coin defines a token with a denomination and an amount. - the oracle module will store before pruning via FIFO. - maximum_median_stamps: - type: string - format: uint64 - description: |- - Maximum Median Stamps represents the maximum amount of medians the - oracle module will store before pruning via FIFO. - description: QueryParamsResponse is the response type for the Query/Params RPC method. - umee.oracle.v1.QuerySlashWindowResponse: + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + IncentiveProgram defines a liquidity mining incentive program on a + single + + locked uToken denom that will run for a set amount of time. + description: >- + QueryUpcomingIncentiveProgramsResponse defines the response structure for + the + + OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service + handlers. + umee.incentive.v1.Unbonding: type: object properties: - window_progress: + start: type: string - format: uint64 + format: int64 + end: + type: string + format: int64 + uToken: + type: object + properties: + denom: + type: string + amount: + type: string description: |- - window_progress defines the number of voting periods - since the last slashing event would have taken place. + 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: |- - QuerySlashWindowResponse is response type for the - Query/SlashWindow RPC method. + Unbonding is a structure that tracks an in-progress token unbonding. + It tracks both its start time and end time, so that if the module's + unbonding time changes, the unbonding can complete at the earlier of + its original end time or its new one based on the new parameter. diff --git a/tools/tools.go b/tools/tools.go index ed7e85ad23..226740cf4b 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -11,4 +11,7 @@ import ( _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/mgechev/revive" _ "mvdan.cc/gofumpt" + + // unnamed import of statik for swagger UI support + _ "github.com/umee-network/umee/v4/swagger/statik" )