diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index abe696c52..8918b1055 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,4 +64,4 @@ jobs: ${{ runner.os }}-go-${{ matrix.go-version }}- - name: Run all tests - run: make test-unit \ No newline at end of file + run: make test \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0fcfc9e06..52d0f5f94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,16 +14,29 @@ RUN apk add --no-cache ca-certificates build-base git # RUN apk add libusb-dev linux-headers WORKDIR /code + +# Download dependencies and CosmWasm libwasmvm if found. +ADD go.mod go.sum ./ +RUN set -eux; \ + export ARCH=$(uname -m); \ + WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm | awk '{print $2}'); \ + if [ ! -z "${WASM_VERSION}" ]; then \ + wget -O /lib/libwasmvm_muslc.a https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/libwasmvm_muslc.${ARCH}.a; \ + fi; \ + go mod download; + +# Copy over code + COPY . /code/ # See https://github.com/CosmWasm/wasmvm/releases -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a -RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a -RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32 +# ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a +# ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.1.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a +# RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 9ecb037336bd56076573dc18c26631a9d2099a7f2b40dc04b6cae31ffb4c8f9a +# RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 6e4de7ba9bad4ae9679c7f9ecf7e283dd0160e71567c6a7be6ae47c81ebe7f32 -# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc` -RUN cp "/lib/libwasmvm_muslc.$(uname -m).a" /lib/libwasmvm_muslc.a +# # Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc` +# RUN cp "/lib/libwasmvm_muslc.$(uname -m).a" /lib/libwasmvm_muslc.a # force it to use static lib (from above) not standard libgo_cosmwasm.so file # then log output of file /code/bin/comdex @@ -34,11 +47,11 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \ && (file /code/bin/comdex | grep "statically linked") # -------------------------------------------------------- -#FROM alpine:3.16 -FROM golang +FROM alpine:3.16 +# FROM golang COPY --from=go-builder /code/bin/comdex /usr/bin/comdex -RUN apt update && apt install -y python3 protobuf-compiler +# RUN apt update && apt install -y python3 protobuf-compiler COPY docker/* /opt/ RUN chmod +x /opt/*.sh diff --git a/Makefile b/Makefile index d10eebd38..0b5f24011 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ endif PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') LEDGER_ENABLED ?= true SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') -TM_VERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::') # grab everything after the space in "github.com/tendermint/tendermint v0.34.7" +TM_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') # grab everything after the space in "github.com/cometbft/cometbft v0.37.2" DOCKER := $(shell which docker) DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8 BUILDDIR ?= $(CURDIR)/build @@ -71,7 +71,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=comdex \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \ - -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TM_VERSION) + -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TM_VERSION) ifeq (cleveldb,$(findstring cleveldb,$(COMDEX_BUILD_OPTIONS))) ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb @@ -186,8 +186,19 @@ endif .PHONY: run-tests test test-all $(TEST_TARGETS) -protoVer=v0.1 -containerProtoGenSwagger=comdex-proto-gen-swagger-$(protoVer) +############################################################################### +### Protobuf ### +############################################################################### + +protoVer=0.13.0 +protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) +protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) + +proto-gen: + @echo "============ Generating Protobuf files ============" + @$(protoImage) sh ./scripts/proto-gen.sh + @echo "============ Generating Protobuf files complete ============" +.PHONY: proto-gen proto-swagger-gen: @echo @@ -204,7 +215,6 @@ proto-swagger-gen: @echo @echo "=========== Docs Generation Complete ============" @echo -.PHONY: docs test-sim-nondeterminism: @echo "Running non-determinism test..." diff --git a/app/ante.go b/app/ante.go index 5516326b1..b7fa16018 100644 --- a/app/ante.go +++ b/app/ante.go @@ -9,8 +9,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC @@ -18,7 +19,7 @@ import ( type HandlerOptions struct { ante.HandlerOptions wasmConfig wasm.Config - txCounterStoreKey sdk.StoreKey + txCounterStoreKey storetypes.StoreKey IBCChannelKeeper *ibckeeper.Keeper GovKeeper govkeeper.Keeper Cdc codec.BinaryCodec @@ -44,21 +45,20 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { ante.NewSetUpContextDecorator(), wasmkeeper.NewLimitSimulationGasDecorator(options.wasmConfig.SimulationGasLimit), wasmkeeper.NewCountTXDecorator(options.txCounterStoreKey), - ante.NewRejectExtensionOptionsDecorator(), decorators.NewGovPreventSpamDecorator(options.Cdc, options.GovKeeper), - ante.NewMempoolFeeDecorator(), + ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), ante.NewValidateBasicDecorator(), ante.NewTxTimeoutHeightDecorator(), ante.NewValidateMemoDecorator(options.AccountKeeper), ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper), + ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewSetPubKeyDecorator(options.AccountKeeper), ante.NewValidateSigCountDecorator(options.AccountKeeper), ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer), ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), ante.NewIncrementSequenceDecorator(options.AccountKeeper), - ibcante.NewAnteDecorator(options.IBCChannelKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCChannelKeeper), } return sdk.ChainAnteDecorators(anteDecorators...), nil diff --git a/app/app.go b/app/app.go index a99d35666..895fd73e8 100644 --- a/app/app.go +++ b/app/app.go @@ -14,32 +14,34 @@ import ( "github.com/gorilla/mux" "github.com/spf13/cast" - ibchooks "github.com/osmosis-labs/osmosis/x/ibc-hooks" - ibchookskeeper "github.com/osmosis-labs/osmosis/x/ibc-hooks/keeper" - ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" - ibcratelimit "github.com/osmosis-labs/osmosis/v15/x/ibc-rate-limit" - "github.com/osmosis-labs/osmosis/v15/x/ibc-rate-limit/ibcratelimitmodule" - ibcratelimittypes "github.com/osmosis-labs/osmosis/v15/x/ibc-rate-limit/types" + ibchooks "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7" + ibchookskeeper "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/keeper" + ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/types" - packetforward "github.com/strangelove-ventures/packet-forward-middleware/v4/router" - packetforwardkeeper "github.com/strangelove-ventures/packet-forward-middleware/v4/router/keeper" - packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" + consensus "github.com/cosmos/cosmos-sdk/x/consensus" + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + + packetforward "github.com/strangelove-ventures/packet-forward-middleware/v7/router" + packetforwardkeeper "github.com/strangelove-ventures/packet-forward-middleware/v7/router/keeper" + packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types" "github.com/rakyll/statik/fs" - ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" - icahost "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" + ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" + icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" + ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - wasmclient "github.com/CosmWasm/wasmd/x/wasm/client" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" - "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server/api" @@ -51,7 +53,6 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" - authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -67,7 +68,6 @@ import ( crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/evidence" @@ -81,6 +81,8 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/mint" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" @@ -98,27 +100,33 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ibctransfer "github.com/cosmos/ibc-go/v4/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v4/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v4/modules/core" - ibcclient "github.com/cosmos/ibc-go/v4/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v4/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - ibcporttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" - + ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" + ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" + ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" + ibctransfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v7/modules/core" + ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" + ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" + ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + ibcporttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibchost "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" "github.com/comdex-official/comdex/x/liquidation" liquidationkeeper "github.com/comdex-official/comdex/x/liquidation/keeper" liquidationtypes "github.com/comdex-official/comdex/x/liquidation/types" + runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" - abcitypes "github.com/tendermint/tendermint/abci/types" - tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - tmprototypes "github.com/tendermint/tendermint/proto/tendermint/types" - tmdb "github.com/tendermint/tm-db" + tmdb "github.com/cometbft/cometbft-db" + abcitypes "github.com/cometbft/cometbft/abci/types" + tmjson "github.com/cometbft/cometbft/libs/json" + "github.com/cometbft/cometbft/libs/log" + tmos "github.com/cometbft/cometbft/libs/os" + tmprototypes "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/comdex-official/comdex/x/asset" assetclient "github.com/comdex-official/comdex/x/asset/client" @@ -184,14 +192,14 @@ import ( auctionsV2client "github.com/comdex-official/comdex/x/auctionsV2/client" auctionsV2keeper "github.com/comdex-official/comdex/x/auctionsV2/keeper" auctionsV2types "github.com/comdex-official/comdex/x/auctionsV2/types" - icq "github.com/cosmos/ibc-apps/modules/async-icq/v4" - icqkeeper "github.com/cosmos/ibc-apps/modules/async-icq/v4/keeper" - icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v4/types" + icq "github.com/cosmos/ibc-apps/modules/async-icq/v7" + icqkeeper "github.com/cosmos/ibc-apps/modules/async-icq/v7/keeper" + icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types" cwasm "github.com/comdex-official/comdex/app/wasm" mv12 "github.com/comdex-official/comdex/app/upgrades/mainnet/v12" - tv12_1 "github.com/comdex-official/comdex/app/upgrades/testnet/v12_1" + tv13 "github.com/comdex-official/comdex/app/upgrades/testnet/v13" ) const ( @@ -231,13 +239,11 @@ func GetGovProposalHandlers() []govclient.ProposalHandler { lendclient.AddDepreciatePoolsHandler, lendclient.AddEModePairsHandler, paramsclient.ProposalHandler, - distrclient.ProposalHandler, - upgradeclient.ProposalHandler, - upgradeclient.CancelProposalHandler, + upgradeclient.LegacyProposalHandler, + upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, } - proposalHandlers = append(proposalHandlers, wasmclient.ProposalHandlers...) proposalHandlers = append(proposalHandlers, assetclient.AddAssetsHandler...) proposalHandlers = append(proposalHandlers, liquidityclient.LiquidityProposalHandler...) proposalHandlers = append(proposalHandlers, liquidationsV2client.LiquidationsV2Handler...) @@ -263,21 +269,23 @@ var ( // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, - genutil.AppModuleBasic{}, + genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, - gov.NewAppModuleBasic(GetGovProposalHandlers()...), + gov.NewAppModuleBasic(GetGovProposalHandlers()), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, authzmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, + ibctm.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, + consensus.AppModuleBasic{}, vesting.AppModuleBasic{}, vault.AppModuleBasic{}, asset.AppModuleBasic{}, @@ -295,10 +303,10 @@ var ( liquidity.AppModuleBasic{}, rewards.AppModuleBasic{}, ica.AppModuleBasic{}, + ibcfee.AppModuleBasic{}, liquidationsV2.AppModuleBasic{}, auctionsV2.AppModuleBasic{}, ibchooks.AppModuleBasic{}, - ibcratelimitmodule.AppModuleBasic{}, packetforward.AppModuleBasic{}, ) ) @@ -328,9 +336,9 @@ type App struct { invCheckPeriod uint // keys to access the substores - keys map[string]*sdk.KVStoreKey - tkeys map[string]*sdk.TransientStoreKey - mkeys map[string]*sdk.MemoryStoreKey + keys map[string]*storetypes.KVStoreKey + tkeys map[string]*storetypes.TransientStoreKey + mkeys map[string]*storetypes.MemoryStoreKey // keepers AccountKeeper authkeeper.AccountKeeper @@ -339,15 +347,16 @@ type App struct { BankBaseKeeper *bankkeeper.BaseKeeper AuthzKeeper authzkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper + StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper + CrisisKeeper *crisiskeeper.Keeper + UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper IbcKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly + IBCFeeKeeper ibcfeekeeper.Keeper IbcHooksKeeper *ibchookskeeper.Keeper ICAHostKeeper icahostkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper @@ -381,14 +390,13 @@ type App struct { // IBC modules // transfer module - RawIcs20TransferAppModule ibctransfer.AppModule - RateLimitingICS4Wrapper *ibcratelimit.ICS4Wrapper - TransferStack *ibchooks.IBCMiddleware Ics20WasmHooks *ibchooks.WasmHooks HooksICS4Wrapper ibchooks.ICS4Middleware PacketForwardKeeper *packetforwardkeeper.Keeper ICQKeeper *icqkeeper.Keeper + ConsensusParamsKeeper consensusparamkeeper.Keeper + WasmKeeper wasm.Keeper ContractKeeper *wasmkeeper.PermissionedKeeper // the module manager @@ -420,12 +428,12 @@ func New( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, icahosttypes.StoreKey, upgradetypes.StoreKey, - evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, + evidencetypes.StoreKey, ibctransfertypes.StoreKey, ibcfeetypes.StoreKey, capabilitytypes.StoreKey, vaulttypes.StoreKey, assettypes.StoreKey, collectortypes.StoreKey, liquidationtypes.StoreKey, markettypes.StoreKey, bandoraclemoduletypes.StoreKey, lockertypes.StoreKey, wasm.StoreKey, authzkeeper.StoreKey, auctiontypes.StoreKey, tokenminttypes.StoreKey, rewardstypes.StoreKey, feegrant.StoreKey, liquiditytypes.StoreKey, esmtypes.ModuleName, lendtypes.StoreKey, - liquidationsV2types.StoreKey, auctionsV2types.StoreKey, ibchookstypes.StoreKey, packetforwardtypes.StoreKey, icqtypes.StoreKey, + liquidationsV2types.StoreKey, auctionsV2types.StoreKey, ibchookstypes.StoreKey, packetforwardtypes.StoreKey, icqtypes.StoreKey, consensusparamtypes.StoreKey, crisistypes.StoreKey, ) ) @@ -453,15 +461,14 @@ func New( ) //nolint:godox //TODO: refactor this code - app.ParamsKeeper.Subspace(authtypes.ModuleName) - app.ParamsKeeper.Subspace(banktypes.ModuleName) - app.ParamsKeeper.Subspace(stakingtypes.ModuleName) - app.ParamsKeeper.Subspace(minttypes.ModuleName) - app.ParamsKeeper.Subspace(distrtypes.ModuleName) - app.ParamsKeeper.Subspace(slashingtypes.ModuleName) - app.ParamsKeeper.Subspace(govtypes.ModuleName). - WithKeyTable(govtypes.ParamKeyTable()) - app.ParamsKeeper.Subspace(crisistypes.ModuleName) + app.ParamsKeeper.Subspace(authtypes.ModuleName).WithKeyTable(authtypes.ParamKeyTable()) + app.ParamsKeeper.Subspace(banktypes.ModuleName).WithKeyTable(banktypes.ParamKeyTable()) + app.ParamsKeeper.Subspace(stakingtypes.ModuleName).WithKeyTable(stakingtypes.ParamKeyTable()) + app.ParamsKeeper.Subspace(minttypes.ModuleName).WithKeyTable(minttypes.ParamKeyTable()) + app.ParamsKeeper.Subspace(distrtypes.ModuleName).WithKeyTable(distrtypes.ParamKeyTable()) + app.ParamsKeeper.Subspace(slashingtypes.ModuleName).WithKeyTable(slashingtypes.ParamKeyTable()) + app.ParamsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable()) + app.ParamsKeeper.Subspace(crisistypes.ModuleName).WithKeyTable(crisistypes.ParamKeyTable()) app.ParamsKeeper.Subspace(ibctransfertypes.ModuleName) app.ParamsKeeper.Subspace(ibchost.ModuleName) app.ParamsKeeper.Subspace(icahosttypes.SubModuleName) @@ -474,23 +481,24 @@ func New( app.ParamsKeeper.Subspace(liquidationtypes.ModuleName) app.ParamsKeeper.Subspace(lockertypes.ModuleName) app.ParamsKeeper.Subspace(bandoraclemoduletypes.ModuleName) - app.ParamsKeeper.Subspace(wasmtypes.ModuleName) + app.ParamsKeeper.Subspace(wasmtypes.ModuleName).WithKeyTable(wasmtypes.ParamKeyTable()) app.ParamsKeeper.Subspace(auctiontypes.ModuleName) app.ParamsKeeper.Subspace(tokenminttypes.ModuleName) app.ParamsKeeper.Subspace(liquiditytypes.ModuleName) app.ParamsKeeper.Subspace(rewardstypes.ModuleName) app.ParamsKeeper.Subspace(liquidationsV2types.ModuleName) app.ParamsKeeper.Subspace(auctionsV2types.ModuleName) - app.ParamsKeeper.Subspace(ibcratelimittypes.ModuleName) app.ParamsKeeper.Subspace(icqtypes.ModuleName) app.ParamsKeeper.Subspace(packetforwardtypes.ModuleName).WithKeyTable(packetforwardtypes.ParamKeyTable()) // set the BaseApp's parameter store - baseApp.SetParamStore( - app.ParamsKeeper. - Subspace(baseapp.Paramspace). - WithKeyTable(paramskeeper.ConsensusParamsKeyTable()), - ) + // baseApp.SetParamStore( + // app.ParamsKeeper. + // Subspace(baseapp.Paramspace). + // WithKeyTable(paramskeeper.ConsensusParamsKeyTable()), + // ) + app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, keys[consensusparamtypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String()) + baseApp.SetParamStore(&app.ConsensusParamsKeeper) // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper( @@ -503,7 +511,7 @@ func New( var ( scopedIBCKeeper = app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) scopedTransferKeeper = app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - scopedIBCOracleKeeper = app.CapabilityKeeper.ScopeToModule(markettypes.ModuleName) + scopedIBCOracleKeeper = app.CapabilityKeeper.ScopeToModule(markettypes.ModuleName) // can remove it scopedWasmKeeper = app.CapabilityKeeper.ScopeToModule(wasm.ModuleName) scopedICAHostKeeper = app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) scopedBandoracleKeeper = app.CapabilityKeeper.ScopeToModule(bandoraclemoduletypes.ModuleName) @@ -514,60 +522,64 @@ func New( app.AccountKeeper = authkeeper.NewAccountKeeper( app.cdc, app.keys[authtypes.StoreKey], - app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, app.ModuleAccountsPermissions(), + AccountAddressPrefix, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.BankKeeper = bankkeeper.NewBaseKeeper( app.cdc, app.keys[banktypes.StoreKey], app.AccountKeeper, - app.GetSubspace(banktypes.ModuleName), - app.ModuleAccountAddrs(), + nil, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) stakingKeeper := stakingkeeper.NewKeeper( app.cdc, app.keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.GetSubspace(stakingtypes.ModuleName), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.MintKeeper = mintkeeper.NewKeeper( app.cdc, app.keys[minttypes.StoreKey], - app.GetSubspace(minttypes.ModuleName), - &stakingKeeper, + stakingKeeper, app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.DistrKeeper = distrkeeper.NewKeeper( app.cdc, app.keys[distrtypes.StoreKey], - app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, + stakingKeeper, authtypes.FeeCollectorName, - app.ModuleAccountAddrs(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.SlashingKeeper = slashingkeeper.NewKeeper( app.cdc, + encoding.Amino, app.keys[slashingtypes.StoreKey], - &stakingKeeper, - app.GetSubspace(slashingtypes.ModuleName), + stakingKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), + app.cdc, + app.keys[crisistypes.StoreKey], invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.AuthzKeeper = authzkeeper.NewKeeper( keys[authzkeeper.StoreKey], app.cdc, baseApp.MsgServiceRouter(), + app.AccountKeeper, ) app.UpgradeKeeper = upgradekeeper.NewKeeper( @@ -576,15 +588,21 @@ func New( app.cdc, homePath, app.BaseApp, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // register the staking hooks // NOTE: StakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = *stakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks( - app.DistrKeeper.Hooks(), - app.SlashingKeeper.Hooks(), - ), + // app.StakingKeeper = *stakingKeeper.SetHooks( + // stakingtypes.NewMultiStakingHooks( + // app.DistrKeeper.Hooks(), + // app.SlashingKeeper.Hooks(), + // ), + // ) + stakingKeeper.SetHooks( + stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), + app.SlashingKeeper.Hooks()), ) + app.StakingKeeper = stakingKeeper // Create IBC Keeper app.IbcKeeper = ibckeeper.NewKeeper( @@ -602,11 +620,56 @@ func New( ) app.IbcHooksKeeper = &hooksKeeper - app.WireICS20PreWasmKeeper(appCodec, baseApp, app.IbcHooksKeeper, scopedTransferKeeper) + cmdxPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() + wasmHooks := ibchooks.NewWasmHooks(app.IbcHooksKeeper, &app.WasmKeeper, cmdxPrefix) // The contract keeper needs to be set later + app.Ics20WasmHooks = &wasmHooks + app.HooksICS4Wrapper = ibchooks.NewICS4Middleware( + app.IbcKeeper.ChannelKeeper, + app.Ics20WasmHooks, + ) + + // Do not use this middleware for anything except x/wasm requirement. + // The spec currently requires new channels to be created, to use it. + // We need to wait for Channel Upgradability before we can use this for any other middleware. + app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( + appCodec, + app.keys[ibcfeetypes.StoreKey], + app.HooksICS4Wrapper, // replaced with IBC middleware + app.IbcKeeper.ChannelKeeper, + &app.IbcKeeper.PortKeeper, + app.AccountKeeper, + app.BankKeeper, + ) + + app.PacketForwardKeeper = packetforwardkeeper.NewKeeper( + appCodec, + app.keys[packetforwardtypes.StoreKey], + app.GetSubspace(packetforwardtypes.ModuleName), + app.IbcTransferKeeper, // Will be zero-value here. Reference is set later on with SetTransferKeeper. + app.IbcKeeper.ChannelKeeper, + app.DistrKeeper, + app.BankKeeper, + app.IbcKeeper.ChannelKeeper, + ) + + app.IbcTransferKeeper = ibctransferkeeper.NewKeeper( + appCodec, + app.keys[ibctransfertypes.StoreKey], + app.GetSubspace(ibctransfertypes.ModuleName), + app.PacketForwardKeeper, + app.IbcKeeper.ChannelKeeper, + &app.IbcKeeper.PortKeeper, + app.AccountKeeper, + app.BankKeeper, + scopedTransferKeeper, + ) + + app.PacketForwardKeeper.SetTransferKeeper(app.IbcTransferKeeper) app.ICAHostKeeper = icahostkeeper.NewKeeper( appCodec, app.keys[icahosttypes.StoreKey], app.GetSubspace(icahosttypes.SubModuleName), + app.HooksICS4Wrapper, app.IbcKeeper.ChannelKeeper, &app.IbcKeeper.PortKeeper, app.AccountKeeper, @@ -614,7 +677,6 @@ func New( app.MsgServiceRouter(), ) - icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) app.AssetKeeper = assetkeeper.NewKeeper( app.cdc, app.keys[assettypes.StoreKey], @@ -826,8 +888,9 @@ func New( app.IbcKeeper.ChannelKeeper, // may be replaced with middleware app.IbcKeeper.ChannelKeeper, &app.IbcKeeper.PortKeeper, - scopedICQKeeper, + app.ScopedICQKeeper, app.GRPCQueryRouter(), + // NewQuerierWrapper(baseApp), // in-case of strangelove-ventures icq ) app.ICQKeeper = &icqKeeper @@ -841,18 +904,18 @@ func New( if err != nil { panic(fmt.Sprintf("error while reading wasm config: %s", err)) } - supportedFeatures := "iterator,staking,stargate,comdex,cosmwasm_1_1" + supportedFeatures := "iterator,staking,stargate,comdex,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3" wasmOpts = append(cwasm.RegisterCustomPlugins(&app.LockerKeeper, &app.TokenmintKeeper, &app.AssetKeeper, &app.Rewardskeeper, &app.CollectorKeeper, &app.LiquidationKeeper, &app.AuctionKeeper, &app.EsmKeeper, &app.VaultKeeper, &app.LendKeeper, &app.LiquidityKeeper, &app.MarketKeeper), wasmOpts...) app.WasmKeeper = wasmkeeper.NewKeeper( app.cdc, keys[wasmtypes.StoreKey], - app.GetSubspace(wasmtypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, - app.DistrKeeper, + distrkeeper.NewQuerier(app.DistrKeeper), + app.IBCFeeKeeper, app.IbcKeeper.ChannelKeeper, &app.IbcKeeper.PortKeeper, scopedWasmKeeper, @@ -862,19 +925,18 @@ func New( wasmDir, wasmConfig, supportedFeatures, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), wasmOpts..., ) - // Pass the contract keeper to all the structs (generally ICS4Wrappers for ibc middlewares) that need it + // set the contract keeper for the Ics20WasmHooks app.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(app.WasmKeeper) - app.RateLimitingICS4Wrapper.ContractKeeper = app.ContractKeeper - app.Ics20WasmHooks.ContractKeeper = app.ContractKeeper + app.Ics20WasmHooks.ContractKeeper = &app.WasmKeeper // register the proposal types - govRouter := govtypes.NewRouter() - govRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). + govRouter := govtypesv1beta1.NewRouter() + govRouter.AddRoute(govtypes.RouterKey, govtypesv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). AddRoute(assettypes.RouterKey, asset.NewUpdateAssetProposalHandler(app.AssetKeeper)). AddRoute(lendtypes.RouterKey, lend.NewLendHandler(app.LendKeeper)). @@ -889,37 +951,56 @@ func New( govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, wasmEnabledProposals)) } - app.GovKeeper = govkeeper.NewKeeper( - app.cdc, - app.keys[govtypes.StoreKey], - app.GetSubspace(govtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - &stakingKeeper, - govRouter, + govKeeper := govkeeper.NewKeeper( + app.cdc, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper, + app.StakingKeeper, app.MsgServiceRouter(), govtypes.DefaultConfig(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + govKeeper.SetLegacyRouter(govRouter) + app.GovKeeper = *govKeeper + + // Create Transfer Stack + var transferStack ibcporttypes.IBCModule + transferStack = ibctransfer.NewIBCModule(app.IbcTransferKeeper) + transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper) + transferStack = ibchooks.NewIBCMiddleware(transferStack, &app.HooksICS4Wrapper) + transferStack = packetforward.NewIBCMiddleware( + transferStack, + app.PacketForwardKeeper, + 0, + packetforwardkeeper.DefaultForwardTransferPacketTimeoutTimestamp, + packetforwardkeeper.DefaultRefundTransferPacketTimeoutTimestamp, ) var ( - evidenceRouter = evidencetypes.NewRouter() - ibcRouter = ibcporttypes.NewRouter() - // transferModule = ibctransfer.NewAppModule(app.IbcTransferKeeper) - // transferIBCModule = ibctransfer.NewIBCModule(app.IbcTransferKeeper) + evidenceRouter = evidencetypes.NewRouter() + ibcRouter = ibcporttypes.NewRouter() oracleModule = market.NewAppModule(app.cdc, app.MarketKeeper, app.BandoracleKeeper, app.AssetKeeper) bandOracleIBCModule = bandoraclemodule.NewIBCModule(app.BandoracleKeeper) ) - // ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule) - ibcRouter.AddRoute(ibctransfertypes.ModuleName, app.TransferStack) + // RecvPacket, message that originates from core IBC and goes down to app, the flow is: + // channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket + var icaHostStack ibcporttypes.IBCModule + icaHostStack = icahost.NewIBCModule(app.ICAHostKeeper) + icaHostStack = ibcfee.NewIBCMiddleware(icaHostStack, app.IBCFeeKeeper) + + // Create fee enabled wasm ibc Stack + var wasmStack ibcporttypes.IBCModule + wasmStack = wasm.NewIBCHandler(app.WasmKeeper, app.IbcKeeper.ChannelKeeper, app.IBCFeeKeeper) + wasmStack = ibcfee.NewIBCMiddleware(wasmStack, app.IBCFeeKeeper) + + ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack) ibcRouter.AddRoute(bandoraclemoduletypes.ModuleName, bandOracleIBCModule) - ibcRouter.AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IbcKeeper.ChannelKeeper, app.IbcKeeper.ChannelKeeper)) - ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule) + ibcRouter.AddRoute(wasm.ModuleName, wasmStack) + ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostStack) ibcRouter.AddRoute(icqtypes.ModuleName, icqModule) app.IbcKeeper.SetRouter(ibcRouter) // Create evidence Keeper for to register the IBC light client misbehaviour evidence route app.EvidenceKeeper = *evidencekeeper.NewKeeper( app.cdc, app.keys[evidencetypes.StoreKey], - &app.StakingKeeper, + app.StakingKeeper, app.SlashingKeeper, ) app.EvidenceKeeper.SetRouter(evidenceRouter) @@ -935,23 +1016,25 @@ func New( app.mm = module.NewManager( genutil.NewAppModule(app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, encoding.TxConfig), - auth.NewAppModule(app.cdc, app.AccountKeeper, nil), + auth.NewAppModule(app.cdc, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(app.cdc, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(app.cdc, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - gov.NewAppModule(app.cdc, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(app.cdc, app.MintKeeper, app.AccountKeeper), - slashing.NewAppModule(app.cdc, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - distr.NewAppModule(app.cdc, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - staking.NewAppModule(app.cdc, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), + bank.NewAppModule(app.cdc, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), + capability.NewAppModule(app.cdc, *app.CapabilityKeeper, false), + crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), + gov.NewAppModule(app.cdc, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), + mint.NewAppModule(app.cdc, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), // nil -> SDK's default inflation function. + slashing.NewAppModule(app.cdc, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), + distr.NewAppModule(app.cdc, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), + staking.NewAppModule(app.cdc, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), upgrade.NewAppModule(app.UpgradeKeeper), evidence.NewAppModule(app.EvidenceKeeper), authzmodule.NewAppModule(app.cdc, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), ibc.NewAppModule(app.IbcKeeper), + ibcfee.NewAppModule(app.IBCFeeKeeper), ica.NewAppModule(nil, &app.ICAHostKeeper), params.NewAppModule(app.ParamsKeeper), - app.RawIcs20TransferAppModule, + // app.RawIcs20TransferAppModule, + ibctransfer.NewAppModule(app.IbcTransferKeeper), asset.NewAppModule(app.cdc, app.AssetKeeper), vault.NewAppModule(app.cdc, app.VaultKeeper), oracleModule, @@ -961,14 +1044,13 @@ func New( collector.NewAppModule(app.cdc, app.CollectorKeeper, app.AccountKeeper, app.BankKeeper), esm.NewAppModule(app.cdc, app.EsmKeeper, app.AccountKeeper, app.BankKeeper, app.AssetKeeper), lend.NewAppModule(app.cdc, app.LendKeeper, app.AccountKeeper, app.BankKeeper), - wasm.NewAppModule(app.cdc, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), + wasm.NewAppModule(app.cdc, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)), auction.NewAppModule(app.cdc, app.AuctionKeeper, app.AccountKeeper, app.BankKeeper, app.CollectorKeeper, app.AssetKeeper, app.EsmKeeper), tokenmint.NewAppModule(app.cdc, app.TokenmintKeeper, app.AccountKeeper, app.BankKeeper), liquidity.NewAppModule(app.cdc, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper, app.AssetKeeper), rewards.NewAppModule(app.cdc, app.Rewardskeeper, app.AccountKeeper, app.BankKeeper), liquidationsV2.NewAppModule(app.cdc, app.NewliqKeeper, app.AccountKeeper, app.BankKeeper), auctionsV2.NewAppModule(app.cdc, app.NewaucKeeper, app.BankKeeper), - ibcratelimitmodule.NewAppModule(*app.RateLimitingICS4Wrapper), ibchooks.NewAppModule(app.AccountKeeper), icq.NewAppModule(*app.ICQKeeper), packetforward.NewAppModule(app.PacketForwardKeeper), @@ -1014,10 +1096,11 @@ func New( esmtypes.ModuleName, liquidationsV2types.ModuleName, auctionsV2types.ModuleName, - ibcratelimittypes.ModuleName, ibchookstypes.ModuleName, icqtypes.ModuleName, packetforwardtypes.ModuleName, + ibcfeetypes.ModuleName, + consensusparamtypes.ModuleName, ) app.mm.SetOrderEndBlockers( @@ -1056,10 +1139,11 @@ func New( esmtypes.ModuleName, liquidationsV2types.ModuleName, auctionsV2types.ModuleName, - ibcratelimittypes.ModuleName, ibchookstypes.ModuleName, icqtypes.ModuleName, packetforwardtypes.ModuleName, + ibcfeetypes.ModuleName, + consensusparamtypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -1102,14 +1186,14 @@ func New( crisistypes.ModuleName, liquidationsV2types.ModuleName, auctionsV2types.ModuleName, - ibcratelimittypes.ModuleName, ibchookstypes.ModuleName, icqtypes.ModuleName, packetforwardtypes.ModuleName, + ibcfeetypes.ModuleName, + consensusparamtypes.ModuleName, ) - app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encoding.Amino) + app.mm.RegisterInvariants(app.CrisisKeeper) app.configurator = module.NewConfigurator(app.cdc, app.MsgServiceRouter(), app.GRPCQueryRouter()) app.mm.RegisterServices(app.configurator) app.registerUpgradeHandlers() @@ -1118,6 +1202,14 @@ func New( app.MountTransientStores(app.tkeys) app.MountMemoryStores(app.mkeys) + // SDK v47 - since we do not use dep inject, this gives us access to newer gRPC services. + autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.mm.Modules)) + reflectionSvc, err := runtimeservices.NewReflectionService() + if err != nil { + panic(err) + } + reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc) + // initialize BaseApp app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) @@ -1181,90 +1273,6 @@ func New( return app } -// WireICS20PreWasmKeeper Create the IBC Transfer Stack from bottom to top: -// -// * SendPacket. Originates from the transferKeeper and goes up the stack: -// transferKeeper.SendPacket -> ibc_rate_limit.SendPacket -> ibc_hooks.SendPacket -> channel.SendPacket -// * RecvPacket, message that originates from core IBC and goes down to app, the flow is the other way -// channel.RecvPacket -> ibc_hooks.OnRecvPacket -> ibc_rate_limit.OnRecvPacket -> forward.OnRecvPacket -> transfer.OnRecvPacket -// -// Note that the forward middleware is only integrated on the "reveive" direction. It can be safely skipped when sending. -// Note also that the forward middleware is called "router", but we are using the name "forward" for clarity -// This may later be renamed upstream: https://github.com/strangelove-ventures/packet-forward-middleware/issues/10 -// -// After this, the wasm keeper is required to be set on both -// a.WasmHooks AND a.RateLimitingICS4Wrapper -func (a *App) WireICS20PreWasmKeeper( - appCodec codec.Codec, - bApp *baseapp.BaseApp, - hooksKeeper *ibchookskeeper.Keeper, - scopedTransferKeeper capabilitykeeper.ScopedKeeper, -) { - // Setup the ICS4Wrapper used by the hooks middleware - cmdxPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() - wasmHooks := ibchooks.NewWasmHooks(hooksKeeper, nil, cmdxPrefix) // The contract keeper needs to be set later - a.Ics20WasmHooks = &wasmHooks - a.HooksICS4Wrapper = ibchooks.NewICS4Middleware( - a.IbcKeeper.ChannelKeeper, - a.Ics20WasmHooks, - ) - - // ChannelKeeper wrapper for rate limiting SendPacket(). The wasmKeeper needs to be added after it's created - rateLimitingICS4Wrapper := ibcratelimit.NewICS4Middleware( - a.HooksICS4Wrapper, - &a.AccountKeeper, - // wasm keeper we set later. - nil, - a.BankBaseKeeper, - a.GetSubspace(ibcratelimittypes.ModuleName), - ) - a.RateLimitingICS4Wrapper = &rateLimitingICS4Wrapper - - // Create Transfer Keepers - transferKeeper := ibctransferkeeper.NewKeeper( - appCodec, - a.keys[ibctransfertypes.StoreKey], - a.GetSubspace(ibctransfertypes.ModuleName), - // The ICS4Wrapper is replaced by the rateLimitingICS4Wrapper instead of the channel - a.RateLimitingICS4Wrapper, - a.IbcKeeper.ChannelKeeper, - &a.IbcKeeper.PortKeeper, - a.AccountKeeper, - a.BankKeeper, - scopedTransferKeeper, - ) - a.IbcTransferKeeper = transferKeeper - a.RawIcs20TransferAppModule = ibctransfer.NewAppModule(a.IbcTransferKeeper) - // Packet Forward Middleware - // Initialize packet forward middleware router - a.PacketForwardKeeper = packetforwardkeeper.NewKeeper( - appCodec, - a.keys[packetforwardtypes.StoreKey], - a.GetSubspace(packetforwardtypes.ModuleName), - a.IbcTransferKeeper, - a.IbcKeeper.ChannelKeeper, - a.DistrKeeper, - a.BankKeeper, - // The ICS4Wrapper is replaced by the HooksICS4Wrapper instead of the channel so that sending can be overridden by the middleware - a.HooksICS4Wrapper, - ) - a.PacketForwardKeeper.SetTransferKeeper(transferKeeper) - packetForwardMiddleware := packetforward.NewIBCMiddleware( - ibctransfer.NewIBCModule(a.IbcTransferKeeper), - a.PacketForwardKeeper, - 0, - packetforwardkeeper.DefaultForwardTransferPacketTimeoutTimestamp, - packetforwardkeeper.DefaultRefundTransferPacketTimeoutTimestamp, - ) - - // RateLimiting IBC Middleware - rateLimitingTransferModule := ibcratelimit.NewIBCModule(packetForwardMiddleware, a.RateLimitingICS4Wrapper) - - // Hooks Middleware - hooksTransferModule := ibchooks.NewIBCMiddleware(&rateLimitingTransferModule, &a.HooksICS4Wrapper) - a.TransferStack = &hooksTransferModule -} - // Name returns the name of the App func (a *App) Name() string { return a.BaseApp.Name() } @@ -1285,7 +1293,7 @@ func (a *App) InitChainer(ctx sdk.Context, req abcitypes.RequestInitChain) abcit panic(err) } a.UpgradeKeeper.SetModuleVersionMap(ctx, a.mm.GetVersionMap()) - return a.mm.InitGenesis(ctx, a.cdc, state) + return a.mm.InitGenesis(ctx, a.AppCodec(), state) } // LoadHeight loads a particular height. @@ -1321,7 +1329,7 @@ func (a *App) LegacyAmino() *codec.LegacyAmino { // // NOTE: This is solely to be used for testing purposes as it may be desirable // for modules to register their own custom testing types. -func (a *App) AppCodec() codec.BinaryCodec { +func (a *App) AppCodec() codec.Codec { return a.cdc } @@ -1333,21 +1341,21 @@ func (a *App) InterfaceRegistry() codectypes.InterfaceRegistry { // GetKey returns the KVStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. -func (a *App) GetKey(storeKey string) *sdk.KVStoreKey { +func (a *App) GetKey(storeKey string) *storetypes.KVStoreKey { return a.keys[storeKey] } // GetTKey returns the TransientStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. -func (a *App) GetTKey(storeKey string) *sdk.TransientStoreKey { +func (a *App) GetTKey(storeKey string) *storetypes.TransientStoreKey { return a.tkeys[storeKey] } // GetMemKey returns the MemStoreKey for the provided mem key. // // NOTE: This is solely used for testing purposes. -func (a *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey { +func (a *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { return a.mkeys[storeKey] } @@ -1363,17 +1371,14 @@ func (a *App) GetSubspace(moduleName string) paramstypes.Subspace { // API server. func (a *App) RegisterAPIRoutes(server *api.Server, apiConfig serverconfig.APIConfig) { ctx := server.ClientCtx - rpc.RegisterRoutes(ctx, server.Router) - // Register legacy tx routes. - authrest.RegisterTxRoutes(ctx, server.Router) // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(ctx, server.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. tmservice.RegisterGRPCGatewayRoutes(ctx, server.GRPCGatewayRouter) // Register legacy and grpc-gateway routes for all modules. - ModuleBasics.RegisterRESTRoutes(ctx, server.Router) ModuleBasics.RegisterGRPCGatewayRoutes(ctx, server.GRPCGatewayRouter) + nodeservice.RegisterGRPCGatewayRoutes(ctx, server.GRPCGatewayRouter) // register swagger API from root so that other applications can override easily if apiConfig.Swagger { @@ -1400,7 +1405,12 @@ func (a *App) RegisterTxService(ctx client.Context) { // RegisterTendermintService implements the Application.RegisterTendermintService method. func (a *App) RegisterTendermintService(ctx client.Context) { - tmservice.RegisterTendermintService(a.BaseApp.GRPCQueryRouter(), ctx, a.interfaceRegistry) + tmservice.RegisterTendermintService(ctx, a.BaseApp.GRPCQueryRouter(), a.interfaceRegistry, a.Query) +} + +// RegisterNodeService registers the node gRPC Query service. +func (a *App) RegisterNodeService(clientCtx client.Context) { + nodeservice.RegisterNodeService(clientCtx, a.GRPCQueryRouter()) } func (a *App) ModuleAccountsPermissions() map[string][]string { @@ -1437,6 +1447,7 @@ func (a *App) ModuleAccountsPermissions() map[string][]string { liquidationsV2types.ModuleName: {authtypes.Minter, authtypes.Burner}, auctionsV2types.ModuleName: {authtypes.Minter, authtypes.Burner}, icatypes.ModuleName: nil, + ibcfeetypes.ModuleName: nil, assettypes.ModuleName: nil, icqtypes.ModuleName: nil, } @@ -1457,10 +1468,10 @@ func (a *App) registerUpgradeHandlers() { mv12.UpgradeName, mv12.CreateUpgradeHandlerV12(a.mm, a.configurator, a.ICQKeeper, a.NewliqKeeper, a.NewaucKeeper, a.BankKeeper, a.CollectorKeeper, a.LendKeeper, a.AuctionKeeper, a.LiquidationKeeper, a.AssetKeeper), ) - case upgradeInfo.Name == tv12_1.UpgradeName: + case upgradeInfo.Name == tv13.UpgradeName: a.UpgradeKeeper.SetUpgradeHandler( - tv12_1.UpgradeName, - tv12_1.CreateUpgradeHandlerV121(a.mm, a.configurator, a.WasmKeeper), + tv13.UpgradeName, + tv13.CreateUpgradeHandlerV13(a.mm, a.configurator, a.cdc, a.keys[capabilitytypes.ModuleName], a.CapabilityKeeper, a.WasmKeeper, a.ParamsKeeper, a.ConsensusParamsKeeper, *a.IbcKeeper, a.GovKeeper, *a.StakingKeeper, a.MintKeeper, a.SlashingKeeper, a.BandoracleKeeper), ) } @@ -1474,7 +1485,7 @@ func (a *App) registerUpgradeHandlers() { } } -func upgradeHandlers(upgradeInfo storetypes.UpgradeInfo, a *App, storeUpgrades *storetypes.StoreUpgrades) *storetypes.StoreUpgrades { +func upgradeHandlers(upgradeInfo upgradetypes.Plan, a *App, storeUpgrades *storetypes.StoreUpgrades) *storetypes.StoreUpgrades { switch { case upgradeInfo.Name == mv12.UpgradeName && !a.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height): @@ -1485,9 +1496,13 @@ func upgradeHandlers(upgradeInfo storetypes.UpgradeInfo, a *App, storeUpgrades * auctionsV2types.ModuleName, }, } - case upgradeInfo.Name == tv12_1.UpgradeName && !a.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height): + case upgradeInfo.Name == tv13.UpgradeName && !a.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height): storeUpgrades = &storetypes.StoreUpgrades{ - Added: []string{}, + Added: []string{ + crisistypes.StoreKey, + consensusparamtypes.StoreKey, + ibcfeetypes.StoreKey, + }, } } return storeUpgrades diff --git a/app/decorators/gov_filter.go b/app/decorators/gov_filter.go index 966be7653..0dc94c5de 100644 --- a/app/decorators/gov_filter.go +++ b/app/decorators/gov_filter.go @@ -6,7 +6,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) var MiniumInitialDepositRate = sdk.NewDecWithPrec(25, 2) @@ -42,7 +42,7 @@ func (gpsd GovPreventSpamDecorator) checkSpamSubmitProposalMsg(ctx sdk.Context, validMsg := func(m sdk.Msg) error { if msg, ok := m.(*govtypes.MsgSubmitProposal); ok { // prevent spam gov msg - depositParams := gpsd.govKeeper.GetDepositParams(ctx) + depositParams := gpsd.govKeeper.GetParams(ctx) miniumInitialDeposit := gpsd.calcMiniumInitialDeposit(depositParams.MinDeposit) if msg.InitialDeposit.IsAllLT(miniumInitialDeposit) { return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "not enough initial deposit. required: %v", miniumInitialDeposit) diff --git a/app/encoding.go b/app/encoding.go index 7cffee9f6..dbff1d136 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -9,10 +9,10 @@ import ( ) type EncodingConfig struct { - Amino *codec.LegacyAmino InterfaceRegistry codectypes.InterfaceRegistry - Marshaler codec.ProtoCodecMarshaler + Marshaler codec.Codec TxConfig client.TxConfig + Amino *codec.LegacyAmino } func NewEncodingConfig() EncodingConfig { diff --git a/app/export.go b/app/export.go index ee300d661..156f53a60 100644 --- a/app/export.go +++ b/app/export.go @@ -4,18 +4,18 @@ import ( "encoding/json" "log" + tmprototypes "github.com/cometbft/cometbft/proto/tendermint/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - tmprototypes "github.com/tendermint/tendermint/proto/tendermint/types" ) // ExportAppStateAndValidators exports the state of the application for a genesis // file. func (a *App) ExportAppStateAndValidators( - forZeroHeight bool, jailAllowedAddrs []string, + forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block ctx := a.NewContext(true, tmprototypes.Header{Height: a.LastBlockHeight()}) @@ -27,7 +27,7 @@ func (a *App) ExportAppStateAndValidators( a.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := a.mm.ExportGenesis(ctx, a.cdc) + genState := a.mm.ExportGenesisForModules(ctx, a.cdc, modulesToExport) appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err diff --git a/app/mock.go b/app/mock.go new file mode 100644 index 000000000..41eab28fd --- /dev/null +++ b/app/mock.go @@ -0,0 +1,50 @@ +package app + +import ( + "github.com/cometbft/cometbft/crypto" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" + + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +) + +var _ tmtypes.PrivValidator = PV{} + +// PV implements PrivValidator without any safety or persistence. +// Only use it for testing. +type PV struct { + PrivKey cryptotypes.PrivKey +} + +func NewPV() PV { + return PV{ed25519.GenPrivKey()} +} + +// GetPubKey implements PrivValidator interface +func (pv PV) GetPubKey() (crypto.PubKey, error) { + return cryptocodec.ToTmPubKeyInterface(pv.PrivKey.PubKey()) +} + +// SignVote implements PrivValidator interface +func (pv PV) SignVote(chainID string, vote *tmproto.Vote) error { + signBytes := tmtypes.VoteSignBytes(chainID, vote) + sig, err := pv.PrivKey.Sign(signBytes) + if err != nil { + return err + } + vote.Signature = sig + return nil +} + +// SignProposal implements PrivValidator interface +func (pv PV) SignProposal(chainID string, proposal *tmproto.Proposal) error { + signBytes := tmtypes.ProposalSignBytes(chainID, proposal) + sig, err := pv.PrivKey.Sign(signBytes) + if err != nil { + return err + } + proposal.Signature = sig + return nil +} diff --git a/app/querier.go b/app/querier.go new file mode 100644 index 000000000..1cda480f7 --- /dev/null +++ b/app/querier.go @@ -0,0 +1,26 @@ +// this file used from osmosis, ref: https://github.com/CosmosContracts/juno/v16/blob/2ce971f4c6aa85d3ef7ba33d60e0ae74b923ab83/app/keepers/querier.go +// Original Author: https://github.com/nicolaslara + +package app + +import ( + abci "github.com/cometbft/cometbft/abci/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// QuerierWrapper is a local wrapper around BaseApp that exports only the Queryable interface. +// This is used to pass the baseApp to Async ICQ without exposing all methods +type QuerierWrapper struct { + querier sdk.Queryable +} + +var _ sdk.Queryable = QuerierWrapper{} + +func NewQuerierWrapper(querier sdk.Queryable) QuerierWrapper { + return QuerierWrapper{querier: querier} +} + +func (q QuerierWrapper) Query(req abci.RequestQuery) abci.ResponseQuery { + return q.querier.Query(req) +} diff --git a/app/test_helpers.go b/app/test_helpers.go index f03aac9a2..9e4f2cf00 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -1,23 +1,33 @@ package app import ( + "cosmossdk.io/math" "encoding/json" - "time" - - "github.com/cosmos/cosmos-sdk/simapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/std" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/require" + "testing" + "time" + // simappparams "cosmossdk.io/simapp/params" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) // DefaultConsensusParams defines the default Tendermint consensus params used in // App testing. -var DefaultConsensusParams = &abci.ConsensusParams{ - Block: &abci.BlockParams{ +var DefaultConsensusParams = &tmproto.ConsensusParams{ + Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, @@ -33,8 +43,8 @@ var DefaultConsensusParams = &abci.ConsensusParams{ }, } -func MakeTestEncodingConfig() simappparams.EncodingConfig { - encodingConfig := simappparams.MakeTestEncodingConfig() +func MakeTestEncodingConfig() moduletestutil.TestEncodingConfig { + encodingConfig := moduletestutil.MakeTestEncodingConfig() std.RegisterLegacyAminoCodec(encodingConfig.Amino) std.RegisterInterfaces(encodingConfig.InterfaceRegistry) ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino) @@ -42,38 +52,146 @@ func MakeTestEncodingConfig() simappparams.EncodingConfig { return encodingConfig } -func setup(withGenesis bool, invCheckPeriod uint) (*App, GenesisState) { +func setup(t *testing.T, withGenesis bool) (*App, GenesisState) { db := dbm.NewMemDB() - encCdc := MakeTestEncodingConfig() - app := New(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, invCheckPeriod, MakeEncodingConfig(), simapp.EmptyAppOptions{}, GetWasmEnabledProposals(), EmptyWasmOpts) + //encCdc := MakeTestEncodingConfig() + app := New(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeEncodingConfig(), simtestutil.EmptyAppOptions{}, GetWasmEnabledProposals(), EmptyWasmOpts) if withGenesis { - return app, NewDefaultGenesisState(encCdc.Marshaler) + return app, NewDefaultGenesisState(app.AppCodec()) } return app, GenesisState{} } // Setup initializes a new App. A Nop logger is set in App. -func Setup(isCheckTx bool) *App { - app, genesisState := setup(!isCheckTx, 5) - if !isCheckTx { - // init chain must be called to stop deliverState from being nil - stateBytes, err := json.MarshalIndent(genesisState, "", " ") - if err != nil { - panic(err) - } +func Setup(t *testing.T, isCheckTx bool) *App { + t.Helper() - // Initialize the chain - app.InitChain( - abci.RequestInitChain{ - Validators: []abci.ValidatorUpdate{}, - ConsensusParams: DefaultConsensusParams, - AppStateBytes: stateBytes, - }, - ) + privVal := NewPV() + pubKey, err := privVal.GetPubKey() + require.NoError(t, err) + + // create validator set with single validator + validator := tmtypes.NewValidator(pubKey, 1) + valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) + + // generate genesis account + senderPrivKey := secp256k1.GenPrivKey() + acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) + balance := banktypes.Balance{ + Address: acc.GetAddress().String(), + Coins: sdk.NewCoins(sdk.NewCoin("ucmdx", sdk.NewInt(100000000000000))), } + app := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, balance) + + return app +} + +func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *App { + t.Helper() + + app, genesisState := setup(t, true) + genesisState = genesisStateWithValSet(t, app, genesisState, valSet, genAccs, balances...) + + stateBytes, err := json.MarshalIndent(genesisState, "", " ") + require.NoError(t, err) + + // init chain will set the validator set and initialize the genesis accounts + app.InitChain( + abci.RequestInitChain{ + Validators: []abci.ValidatorUpdate{}, + ConsensusParams: DefaultConsensusParams, + AppStateBytes: stateBytes, + Time: time.Now().UTC(), + InitialHeight: 1, + }, + ) + + // commit genesis changes + app.Commit() + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{ + Height: app.LastBlockHeight() + 1, + AppHash: app.LastCommitID().Hash, + ValidatorsHash: valSet.Hash(), + NextValidatorsHash: valSet.Hash(), + Time: time.Now().UTC(), + }}) + return app } +func genesisStateWithValSet(t *testing.T, + app *App, genesisState GenesisState, + valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, + balances ...banktypes.Balance, +) GenesisState { + codec := app.AppCodec() + + // set genesis accounts + authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) + genesisState[authtypes.ModuleName] = codec.MustMarshalJSON(authGenesis) + + validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) + delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) + + bondAmt := sdk.DefaultPowerReduction + + for _, val := range valSet.Validators { + pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) + require.NoError(t, err) + pkAny, err := codectypes.NewAnyWithValue(pk) + require.NoError(t, err) + validator := stakingtypes.Validator{ + OperatorAddress: sdk.ValAddress(val.Address).String(), + ConsensusPubkey: pkAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: bondAmt, + DelegatorShares: math.LegacyOneDec(), + Description: stakingtypes.Description{}, + UnbondingHeight: int64(0), + UnbondingTime: time.Unix(0, 0).UTC(), + Commission: stakingtypes.NewCommission(math.LegacyZeroDec(), math.LegacyZeroDec(), math.LegacyZeroDec()), + MinSelfDelegation: math.ZeroInt(), + } + validators = append(validators, validator) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), math.LegacyOneDec())) + + } + + defaultStParams := stakingtypes.DefaultParams() + stParams := stakingtypes.NewParams( + defaultStParams.UnbondingTime, + defaultStParams.MaxValidators, + defaultStParams.MaxEntries, + defaultStParams.HistoricalEntries, + "ucmdx", + defaultStParams.MinCommissionRate, // 5% + ) + + // set validators and delegations + stakingGenesis := stakingtypes.NewGenesisState(stParams, validators, delegations) + genesisState[stakingtypes.ModuleName] = codec.MustMarshalJSON(stakingGenesis) + + // add bonded amount to bonded pool module account + balances = append(balances, banktypes.Balance{ + Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), + Coins: sdk.Coins{sdk.NewCoin("ucmdx", bondAmt.MulRaw(int64(len(valSet.Validators))))}, + }) + + totalSupply := sdk.NewCoins() + for _, b := range balances { + // add genesis acc tokens to total supply + totalSupply = totalSupply.Add(b.Coins...) + } + + // update total supply + bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}, []banktypes.SendEnabled{}) + genesisState[banktypes.ModuleName] = codec.MustMarshalJSON(bankGenesis) + // println("genesisStateWithValSet bankState:", string(genesisState[banktypes.ModuleName])) + + return genesisState +} + // EmptyAppOptions is a stub implementing AppOptions type EmptyAppOptions struct{} diff --git a/app/test_suite.go b/app/test_suite.go new file mode 100644 index 000000000..bf171433e --- /dev/null +++ b/app/test_suite.go @@ -0,0 +1,314 @@ +package app + +import ( + "encoding/json" + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto/ed25519" + "github.com/cometbft/cometbft/libs/log" + tmtypes "github.com/cometbft/cometbft/proto/tendermint/types" + + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/cosmos/cosmos-sdk/store/rootmulti" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/authz" + authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" + banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + // "github.com/comdex-official/comdex/app" +) + +type KeeperTestHelper struct { + suite.Suite + + App *App + Ctx sdk.Context + QueryHelper *baseapp.QueryServiceTestHelper + TestAccs []sdk.AccAddress +} + +// Setup sets up basic environment for suite (App, Ctx, and test accounts) +func (s *KeeperTestHelper) Setup() { + t := s.T() + s.App = Setup(t, true) + s.Ctx = s.App.BaseApp.NewContext(false, tmtypes.Header{Height: 1, ChainID: "testing", Time: time.Now().UTC()}) + s.QueryHelper = &baseapp.QueryServiceTestHelper{ + GRPCQueryRouter: s.App.GRPCQueryRouter(), + Ctx: s.Ctx, + } + s.TestAccs = CreateRandomAccounts(3) +} + +func (s *KeeperTestHelper) SetupTestForInitGenesis() { + t := s.T() + // Setting to True, leads to init genesis not running + s.App = Setup(t, true) + s.Ctx = s.App.BaseApp.NewContext(true, tmtypes.Header{ + ChainID: "testing", + }) +} + +// CreateTestContext creates a test context. +func (s *KeeperTestHelper) CreateTestContext() sdk.Context { + ctx, _ := s.CreateTestContextWithMultiStore() + return ctx +} + +// CreateTestContextWithMultiStore creates a test context and returns it together with multi store. +func (s *KeeperTestHelper) CreateTestContextWithMultiStore() (sdk.Context, sdk.CommitMultiStore) { + db := dbm.NewMemDB() + logger := log.NewNopLogger() + + ms := rootmulti.NewStore(db, logger) + + return sdk.NewContext(ms, tmtypes.Header{}, false, logger), ms +} + +// CreateTestContext creates a test context. +func (s *KeeperTestHelper) Commit() { + oldHeight := s.Ctx.BlockHeight() + oldHeader := s.Ctx.BlockHeader() + s.App.Commit() + newHeader := tmtypes.Header{Height: oldHeight + 1, ChainID: "testing", Time: oldHeader.Time.Add(time.Second)} + s.App.BeginBlock(abci.RequestBeginBlock{Header: newHeader}) + s.Ctx = s.App.NewContext(false, newHeader) +} + +// FundAcc funds target address with specified amount. +func (s *KeeperTestHelper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins) { + err := banktestutil.FundAccount(s.App.BankKeeper, s.Ctx, acc, amounts) + s.Require().NoError(err) +} + +// FundModuleAcc funds target modules with specified amount. +func (s *KeeperTestHelper) FundModuleAcc(moduleName string, amounts sdk.Coins) { + err := banktestutil.FundModuleAccount(s.App.BankKeeper, s.Ctx, moduleName, amounts) + s.Require().NoError(err) +} + +func (s *KeeperTestHelper) MintCoins(coins sdk.Coins) { + err := s.App.BankKeeper.MintCoins(s.Ctx, minttypes.ModuleName, coins) + s.Require().NoError(err) +} + +// SetupValidator sets up a validator and returns the ValAddress. +func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sdk.ValAddress { + valPub := secp256k1.GenPrivKey().PubKey() + valAddr := sdk.ValAddress(valPub.Address()) + bondDenom := s.App.StakingKeeper.GetParams(s.Ctx).BondDenom + selfBond := sdk.NewCoins(sdk.Coin{Amount: sdk.NewInt(100), Denom: bondDenom}) + + s.FundAcc(sdk.AccAddress(valAddr), selfBond) + + // stakingHandler := staking.NewHandler(s.App.StakingKeeper) + stakingCoin := sdk.NewCoin("ucmdx", selfBond[0].Amount) + ZeroCommission := stakingtypes.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) + _, err := stakingtypes.NewMsgCreateValidator(valAddr, valPub, stakingCoin, stakingtypes.Description{}, ZeroCommission, sdk.OneInt()) + s.Require().NoError(err) + // res, err := stakingHandler(s.Ctx, msg) + // s.Require().NoError(err) + // s.Require().NotNil(res) + + val, found := s.App.StakingKeeper.GetValidator(s.Ctx, valAddr) + s.Require().True(found) + + val = val.UpdateStatus(bondStatus) + s.App.StakingKeeper.SetValidator(s.Ctx, val) + + consAddr, err := val.GetConsAddr() + s.Suite.Require().NoError(err) + + signingInfo := slashingtypes.NewValidatorSigningInfo( + consAddr, + s.Ctx.BlockHeight(), + 0, + time.Unix(0, 0), + false, + 0, + ) + s.App.SlashingKeeper.SetValidatorSigningInfo(s.Ctx, consAddr, signingInfo) + + return valAddr +} + +// BeginNewBlock starts a new block. +func (s *KeeperTestHelper) BeginNewBlock() { + var valAddr []byte + + validators := s.App.StakingKeeper.GetAllValidators(s.Ctx) + if len(validators) >= 1 { + valAddrFancy, err := validators[0].GetConsAddr() + s.Require().NoError(err) + valAddr = valAddrFancy.Bytes() + } else { + valAddrFancy := s.SetupValidator(stakingtypes.Bonded) + validator, _ := s.App.StakingKeeper.GetValidator(s.Ctx, valAddrFancy) + valAddr2, _ := validator.GetConsAddr() + valAddr = valAddr2.Bytes() + } + + s.BeginNewBlockWithProposer(valAddr) +} + +// BeginNewBlockWithProposer begins a new block with a proposer. +func (s *KeeperTestHelper) BeginNewBlockWithProposer(proposer sdk.ValAddress) { + validator, found := s.App.StakingKeeper.GetValidator(s.Ctx, proposer) + s.Assert().True(found) + + valConsAddr, err := validator.GetConsAddr() + s.Require().NoError(err) + + valAddr := valConsAddr.Bytes() + + newBlockTime := s.Ctx.BlockTime().Add(5 * time.Second) + + header := tmtypes.Header{Height: s.Ctx.BlockHeight() + 1, Time: newBlockTime} + newCtx := s.Ctx.WithBlockTime(newBlockTime).WithBlockHeight(s.Ctx.BlockHeight() + 1) + s.Ctx = newCtx + lastCommitInfo := abci.CommitInfo{ + Votes: []abci.VoteInfo{{ + Validator: abci.Validator{Address: valAddr, Power: 1000}, + SignedLastBlock: true, + }}, + Round: 0, + } + reqBeginBlock := abci.RequestBeginBlock{Header: header, LastCommitInfo: lastCommitInfo} + + fmt.Println("beginning block ", s.Ctx.BlockHeight()) + s.App.BeginBlocker(s.Ctx, reqBeginBlock) +} + +// EndBlock ends the block. +func (s *KeeperTestHelper) EndBlock() { + reqEndBlock := abci.RequestEndBlock{Height: s.Ctx.BlockHeight()} + s.App.EndBlocker(s.Ctx, reqEndBlock) +} + +// AllocateRewardsToValidator allocates reward tokens to a distribution module then allocates rewards to the validator address. +func (s *KeeperTestHelper) AllocateRewardsToValidator(valAddr sdk.ValAddress, rewardAmt math.Int) { + validator, found := s.App.StakingKeeper.GetValidator(s.Ctx, valAddr) + s.Require().True(found) + + // allocate reward tokens to distribution module + coins := sdk.Coins{sdk.NewCoin("ucmdx", rewardAmt)} + err := banktestutil.FundModuleAccount(s.App.BankKeeper, s.Ctx, distrtypes.ModuleName, coins) + s.Require().NoError(err) + + // allocate rewards to validator + s.Ctx = s.Ctx.WithBlockHeight(s.Ctx.BlockHeight() + 1) + decTokens := sdk.DecCoins{{Denom: "ucmdx", Amount: sdk.NewDec(20000)}} + s.App.DistrKeeper.AllocateTokensToValidator(s.Ctx, validator, decTokens) +} + +// BuildTx builds a transaction. +func (s *KeeperTestHelper) BuildTx( + txBuilder client.TxBuilder, + msgs []sdk.Msg, + sigV2 signing.SignatureV2, + memo string, txFee sdk.Coins, + gasLimit uint64, +) authsigning.Tx { + err := txBuilder.SetMsgs(msgs[0]) + s.Require().NoError(err) + + err = txBuilder.SetSignatures(sigV2) + s.Require().NoError(err) + + txBuilder.SetMemo(memo) + txBuilder.SetFeeAmount(txFee) + txBuilder.SetGasLimit(gasLimit) + + return txBuilder.GetTx() +} + +func (s *KeeperTestHelper) ConfirmUpgradeSucceeded(upgradeName string, upgradeHeight int64) { + s.Ctx = s.Ctx.WithBlockHeight(upgradeHeight - 1) + plan := upgradetypes.Plan{Name: upgradeName, Height: upgradeHeight} + err := s.App.UpgradeKeeper.ScheduleUpgrade(s.Ctx, plan) + s.Require().NoError(err) + _, exists := s.App.UpgradeKeeper.GetUpgradePlan(s.Ctx) + s.Require().True(exists) + + s.Ctx = s.Ctx.WithBlockHeight(upgradeHeight) + s.Require().NotPanics(func() { + beginBlockRequest := abci.RequestBeginBlock{} + s.App.BeginBlocker(s.Ctx, beginBlockRequest) + }) +} + +// CreateRandomAccounts is a function return a list of randomly generated AccAddresses +func CreateRandomAccounts(numAccts int) []sdk.AccAddress { + testAddrs := make([]sdk.AccAddress, numAccts) + for i := 0; i < numAccts; i++ { + pk := ed25519.GenPrivKey().PubKey() + testAddrs[i] = sdk.AccAddress(pk.Address()) + } + + return testAddrs +} + +func TestMessageAuthzSerialization(t *testing.T, msg sdk.Msg) { + someDate := time.Date(1, 1, 1, 1, 1, 1, 1, time.UTC) + const ( + mockGranter string = "cosmos1abc" + mockGrantee string = "cosmos1xyz" + ) + + var ( + mockMsgGrant authz.MsgGrant + mockMsgRevoke authz.MsgRevoke + mockMsgExec authz.MsgExec + ) + + // Authz: Grant Msg + typeURL := sdk.MsgTypeURL(msg) + later := someDate.Add(time.Hour) + grant, err := authz.NewGrant(someDate, authz.NewGenericAuthorization(typeURL), &later) + require.NoError(t, err) + + msgGrant := authz.MsgGrant{Granter: mockGranter, Grantee: mockGrantee, Grant: grant} + msgGrantBytes := json.RawMessage(sdk.MustSortJSON(authzcodec.ModuleCdc.MustMarshalJSON(&msgGrant))) + err = authzcodec.ModuleCdc.UnmarshalJSON(msgGrantBytes, &mockMsgGrant) + require.NoError(t, err) + + // Authz: Revoke Msg + msgRevoke := authz.MsgRevoke{Granter: mockGranter, Grantee: mockGrantee, MsgTypeUrl: typeURL} + msgRevokeByte := json.RawMessage(sdk.MustSortJSON(authzcodec.ModuleCdc.MustMarshalJSON(&msgRevoke))) + err = authzcodec.ModuleCdc.UnmarshalJSON(msgRevokeByte, &mockMsgRevoke) + require.NoError(t, err) + + // Authz: Exec Msg + msgAny, err := cdctypes.NewAnyWithValue(msg) + require.NoError(t, err) + msgExec := authz.MsgExec{Grantee: mockGrantee, Msgs: []*cdctypes.Any{msgAny}} + execMsgByte := json.RawMessage(sdk.MustSortJSON(authzcodec.ModuleCdc.MustMarshalJSON(&msgExec))) + err = authzcodec.ModuleCdc.UnmarshalJSON(execMsgByte, &mockMsgExec) + require.NoError(t, err) + require.Equal(t, msgExec.Msgs[0].Value, mockMsgExec.Msgs[0].Value) +} + +func GenerateTestAddrs() (string, string) { + pk1 := ed25519.GenPrivKey().PubKey() + validAddr := sdk.AccAddress(pk1.Address()).String() + invalidAddr := sdk.AccAddress("invalid").String() + return validAddr, invalidAddr +} diff --git a/app/upgrades/mainnet/v11/upgrades.go b/app/upgrades/mainnet/v11/upgrades.go index d1e5ec0ef..9f20da82d 100644 --- a/app/upgrades/mainnet/v11/upgrades.go +++ b/app/upgrades/mainnet/v11/upgrades.go @@ -18,13 +18,13 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" + icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + // icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ) // An error occurred during the creation of the CMST/STJUNO pair, as it was mistakenly created in the Harbor app (ID-2) instead of the cSwap app (ID-1). @@ -92,7 +92,7 @@ func CreateUpgradeHandlerV11( return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { ctx.Logger().Info("Applying main net upgrade - v.11.5.0") - fromVM[icatypes.ModuleName] = mm.Modules[icatypes.ModuleName].ConsensusVersion() + // fromVM[icatypes.ModuleName] = mm.Modules[icatypes.ModuleName].ConsensusVersion() hostParams := icahosttypes.Params{ HostEnabled: true, diff --git a/app/upgrades/mainnet/v12/refund.go b/app/upgrades/mainnet/v12/refund.go index 16e7368fc..bad195837 100644 --- a/app/upgrades/mainnet/v12/refund.go +++ b/app/upgrades/mainnet/v12/refund.go @@ -1,134 +1 @@ package v12 - -import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - collectortypes "github.com/comdex-official/comdex/x/collector/types" - collectorkeeper "github.com/comdex-official/comdex/x/collector/keeper" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - -) - -func Refund ( - ctx sdk.Context, - bankKeeper bankkeeper.Keeper, - collectorKeeper collectorkeeper.Keeper, -) { - ////// refund CMST to vault owner//////// - - type refundStruct struct { - vaultOwner string - amount int64 - } - - refundData := []refundStruct{ - { - vaultOwner: "comdex1x22fak2s8a6m9gysx7y4d5794dgds0jy6jch3t", - amount: 27380000, - }, - { - vaultOwner: "comdex12jhse8d8uxgkqgrvfcv5j46wqu08yru7z3ze8z", - amount: 1142650000, - }, - { - vaultOwner: "comdex1w5lep3d53p5dtkg37gerq6qxdlagykyryta989", - amount: 4363010000, - }, - { - vaultOwner: "comdex122esu76xehp8sq9t88kcn666ejjum5g5ynxu0k", - amount: 32460000, - }, - { - vaultOwner: "comdex1reeycz4d4pu4fddzqafzsyh6vvjp3nflp84xpp", - amount: 44960000, - }, - { - vaultOwner: "comdex12q0708jnrd6d5ud7ap5lz4tgu3yshppfwd9x28", - amount: 808240000, - }, - { - vaultOwner: "comdex120t6ntph3za6a7trw3zegseefkyf5u8gu3q4yu", - amount: 29310000, - }, - { - vaultOwner: "comdex1qmklnue6z90vlljx04ll2v0elqjnzr3fswxm2u", - amount: 10249670000, - }, - { - vaultOwner: "comdex13mm0ua6c20f8jup3q2g0uuw2k5n54cgkrw3lqs", - amount: 664440000, - }, - { - vaultOwner: "comdex1wk25umx7ldgnca290dlg09yssusujhfek3l38l", - amount: 2520920000, - }, - { - vaultOwner: "comdex1z2cmdk7atwfefl4a3had7a2tsamxrwgucmhutx", - amount: 24300000, - }, - { - vaultOwner: "comdex1snezfskvsvdav5z9rsg5pgdrwnrg77kfjrc25f", - amount: 23090000, - }, - { - vaultOwner: "comdex15xvnvwffhmy5wx8y7a9rchxe4zys9pa4gv8k8r", - amount: 23650000, - }, - { - vaultOwner: "comdex1dwhhjyl6luv949ekpkplwc0zhqxa2jmhv6yl2w", - amount: 19930000, - }, - { - vaultOwner: "comdex1nwtwhhs3d8rjl6c3clmcxlf3qdpv8n6rc9u9uy", - amount: 18550000, - }, - { - vaultOwner: "comdex15gp4hjqf79zeggxteewzu2n0qde2zzfkkgec3z", - amount: 79060000, - }, - { - vaultOwner: "comdex1v3truxzuz0j7896tumz77unla4sltqlgxwzhxy", - amount: 45560000, - }, - { - vaultOwner: "comdex1850jsqvx54zl0urkav9tvee20j8r5fqj98zq9p", - amount: 21940000, - }, - { - vaultOwner: "comdex1qx46s5gen6c88yaauh9jfttmfgdxnxxshzhahu", - amount: 24400000, - }, - - } - - // check if collector module account has enough balance to refund - macc := collectorKeeper.ModuleBalance(ctx, collectortypes.ModuleName, "ucmst") - // Check if sufficient balance exists - - if macc.Int64() < 20163520000 { - fmt.Println("collector module account does not have enough balance to refund") - return - } else { - for i:=0; i false - - // get all the current auctions - dutchAuctions := auctionKeeper.GetDutchLendAuctions(ctx, 3) - for _, dutchAuction := range dutchAuctions { - cPoolModuleName := lendtypes.ModuleAcc1 - reserveModuleName := lendtypes.ModuleName - //send debt from reserve to the pool - err := bankKeeper.SendCoinsFromModuleToModule(ctx, reserveModuleName, cPoolModuleName, sdk.NewCoins(dutchAuction.InflowTokenTargetAmount)) - if err != nil { - fmt.Println(err) - } - //send collateral to the reserve from auction module outflow_token_current_amount - err = bankKeeper.SendCoinsFromModuleToModule(ctx, auctiontypes.ModuleName, reserveModuleName, sdk.NewCoins(dutchAuction.OutflowTokenCurrentAmount)) - if err != nil { - fmt.Println(err) - } - - borrowPos := lendKeeper.GetBorrowByUserAndAssetID(ctx, dutchAuction.VaultOwner.String(), dutchAuction.InflowTokenTargetAmount.Denom, dutchAuction.AssetOutId) - borrowPos.AmountOut.Amount = borrowPos.AmountOut.Amount.Sub(dutchAuction.InflowTokenTargetAmount.Amount) - borrowPos.IsLiquidated = false - lendKeeper.SetBorrow(ctx, borrowPos) - - poolAssetLBMappingData, _ := lendKeeper.GetAssetStatsByPoolIDAndAssetID(ctx, 1, dutchAuction.AssetInId) - - poolAssetLBMappingData.TotalBorrowed = poolAssetLBMappingData.TotalBorrowed.Add(borrowPos.AmountOut.Amount) - lendKeeper.SetAssetStatsByPoolIDAndAssetID(ctx, poolAssetLBMappingData) - lockedVault, found := liquidationKeeper.GetLockedVault(ctx, 3, dutchAuction.LockedVaultId) - if found { - liquidationKeeper.DeleteLockedVault(ctx, lockedVault.AppId, lockedVault.LockedVaultId) - } - err = auctionKeeper.SetHistoryDutchLendAuction(ctx, dutchAuction) - if err != nil { - fmt.Println(err) - } - err = auctionKeeper.DeleteDutchLendAuction(ctx, dutchAuction) - if err != nil { - fmt.Println(err) - } - } -} - func newDec(i string) sdk.Dec { dec, _ := sdk.NewDecFromStr(i) return dec diff --git a/app/upgrades/mainnet/v5/upgrades.go b/app/upgrades/mainnet/v5/upgrades.go index f490ed81c..e0028d2ee 100644 --- a/app/upgrades/mainnet/v5/upgrades.go +++ b/app/upgrades/mainnet/v5/upgrades.go @@ -19,14 +19,14 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" - ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" + ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ) func InitializeStates( @@ -240,7 +240,7 @@ func CreateUpgradeHandler( // Deleting these modules from the upgrades current state // Add Interchain Accounts host module // set the ICS27 consensus version so InitGenesis is not run - fromVM[icatypes.ModuleName] = mm.Modules[icatypes.ModuleName].ConsensusVersion() + // fromVM[icatypes.ModuleName] = mm.Modules[icatypes.ModuleName].ConsensusVersion() // create ICS27 Controller submodule params, controller module not enabled. controllerParams := icacontrollertypes.Params{} diff --git a/app/upgrades/testnet/v12_1/upgrades.go b/app/upgrades/testnet/v12_1/upgrades.go deleted file mode 100644 index e2b8e97b6..000000000 --- a/app/upgrades/testnet/v12_1/upgrades.go +++ /dev/null @@ -1,36 +0,0 @@ -package v12_1 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" -) - -// An error occurred during the creation of the CMST/STJUNO pair, as it was mistakenly created in the Harbor app (ID-2) instead of the cSwap app (ID-1). -// As a result, the transaction fee was charged to the creator of the pair, who is entitled to a refund. -// The provided code is designed to initiate the refund process. -// The transaction hash for the pair creation is EF408AD53B8BB0469C2A593E4792CB45552BD6495753CC2C810A1E4D82F3982F. -// MintScan - https://www.mintscan.io/comdex/txs/EF408AD53B8BB0469C2A593E4792CB45552BD6495753CC2C810A1E4D82F3982F - -func CreateUpgradeHandlerV121( - mm *module.Manager, - configurator module.Configurator, - wasmKeeper wasmkeeper.Keeper, -) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - ctx.Logger().Info("Applying test net upgrade - v.12.1.0") - - vm, err := mm.RunMigrations(ctx, configurator, fromVM) - if err != nil { - return nil, err - } - - // update wasm to permissionless - wasmParams := wasmKeeper.GetParams(ctx) - wasmParams.CodeUploadAccess = wasmtypes.AllowEverybody - wasmKeeper.SetParams(ctx, wasmParams) - return vm, err - } -} diff --git a/app/upgrades/testnet/v12_1/constants.go b/app/upgrades/testnet/v13/constants.go similarity index 82% rename from app/upgrades/testnet/v12_1/constants.go rename to app/upgrades/testnet/v13/constants.go index 681585830..58c139077 100644 --- a/app/upgrades/testnet/v12_1/constants.go +++ b/app/upgrades/testnet/v13/constants.go @@ -1,7 +1,7 @@ -package v12_1 +package v13 const ( - UpgradeName = "v12.1.0" + UpgradeName = "v13.0.0" UpgradeHeight = "" UpgradeInfo = `'{ "binaries": { diff --git a/app/upgrades/testnet/v13/upgrade_test.go b/app/upgrades/testnet/v13/upgrade_test.go new file mode 100644 index 000000000..be9f1a70f --- /dev/null +++ b/app/upgrades/testnet/v13/upgrade_test.go @@ -0,0 +1,64 @@ +package v13_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/comdex-official/comdex/app" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + v13 "github.com/comdex-official/comdex/app/upgrades/testnet/v13" +) + +type UpgradeTestSuite struct { + app.KeeperTestHelper +} + +func (s *UpgradeTestSuite) SetupTest() { + s.Setup() +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(UpgradeTestSuite)) +} + +// Ensures the test does not error out. +func (s *UpgradeTestSuite) TestUpgrade() { + s.Setup() + + preUpgradeChecks(s) + + upgradeHeight := int64(5) + s.ConfirmUpgradeSucceeded(v13.UpgradeName, upgradeHeight) + + postUpgradeChecks(s) +} + +func preUpgradeChecks(s *UpgradeTestSuite) { + + mp := s.App.MintKeeper.GetParams(s.Ctx) + s.Require().Equal(mp.BlocksPerYear, uint64(6311520)) + + sp := s.App.SlashingKeeper.GetParams(s.Ctx) + s.Require().Equal(sp.SignedBlocksWindow, int64(100)) + +} + +func postUpgradeChecks(s *UpgradeTestSuite) { + + // Ensure the gov params have MinInitialDepositRatio added + gp := s.App.GovKeeper.GetParams(s.Ctx) + s.Require().Equal(gp.MinInitialDepositRatio, "0.200000000000000000") + + // Ensure the mint params have doubled + mp := s.App.MintKeeper.GetParams(s.Ctx) + s.Require().Equal(mp.BlocksPerYear, uint64(6311520*2)) + + // Ensure the slashing params have doubled + sp := s.App.SlashingKeeper.GetParams(s.Ctx) + s.Require().Equal(sp.SignedBlocksWindow, int64(100*2)) + + // Ensure the wasm Permissionless + wp := s.App.WasmKeeper.GetParams(s.Ctx) + s.Require().Equal(wp.CodeUploadAccess, wasmtypes.AllowEverybody) +} diff --git a/app/upgrades/testnet/v13/upgrades.go b/app/upgrades/testnet/v13/upgrades.go new file mode 100644 index 000000000..b46db93d2 --- /dev/null +++ b/app/upgrades/testnet/v13/upgrades.go @@ -0,0 +1,126 @@ +package v13 + +import ( + "fmt" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" + paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + exported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + ibctmmigrations "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint/migrations" + bandoraclemodulekeeper "github.com/comdex-official/comdex/x/bandoracle/keeper" +) + +func CreateUpgradeHandlerV13( + mm *module.Manager, + configurator module.Configurator, + cdc codec.Codec, + capabilityStoreKey *storetypes.KVStoreKey, + capabilityKeeper *capabilitykeeper.Keeper, + wasmKeeper wasmkeeper.Keeper, + paramsKeeper paramskeeper.Keeper, + consensusParamsKeeper consensusparamkeeper.Keeper, + IBCKeeper ibckeeper.Keeper, + GovKeeper govkeeper.Keeper, + StakingKeeper stakingkeeper.Keeper, + MintKeeper mintkeeper.Keeper, + SlashingKeeper slashingkeeper.Keeper, + bandoracleKeeper bandoraclemodulekeeper.Keeper, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("Applying test net upgrade - v.13.0.0") + logger := ctx.Logger().With("upgrade", UpgradeName) + + // Migrate Tendermint consensus parameters from x/params module to a deprecated x/consensus module. + // The old params module is required to still be imported in your app.go in order to handle this migration. + ctx.Logger().Info("Migrating tendermint consensus params from x/params to x/consensus...") + legacyParamSubspace := paramsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()) + baseapp.MigrateParams(ctx, legacyParamSubspace, &consensusParamsKeeper) + + // ibc v4-to-v5 + // https://github.com/cosmos/ibc-go/blob/v7.1.0/docs/migrations/v4-to-v5.md + // -- nothing -- + + // TODO: check if v5-v6 is required ?? + // https://github.com/cosmos/ibc-go/blob/v7.1.0/docs/migrations/v5-to-v6.md + + // ibc v6-to-v7 + // https://github.com/cosmos/ibc-go/blob/v7.1.0/docs/migrations/v6-to-v7.md#chains + // (optional) prune expired tendermint consensus states to save storage space + ctx.Logger().Info("Pruning expired tendermint consensus states...") + if _, err := ibctmmigrations.PruneExpiredConsensusStates(ctx, cdc, IBCKeeper.ClientKeeper); err != nil { + return nil, err + } + + // ibc v7-to-v7.1 + // https://github.com/cosmos/ibc-go/blob/v7.1.0/docs/migrations/v7-to-v7_1.md#09-localhost-migration + // explicitly update the IBC 02-client params, adding the localhost client type + params := IBCKeeper.ClientKeeper.GetParams(ctx) + params.AllowedClients = append(params.AllowedClients, exported.Localhost) + IBCKeeper.ClientKeeper.SetParams(ctx, params) + logger.Info(fmt.Sprintf("updated ibc client params %v", params)) + + // Run migrations + logger.Info(fmt.Sprintf("pre migrate version map: %v", fromVM)) + vm, err := mm.RunMigrations(ctx, configurator, fromVM) + if err != nil { + return nil, err + } + logger.Info(fmt.Sprintf("post migrate version map: %v", vm)) + + //TODO: confirm the initial deposit + // update gov params to use a 20% initial deposit ratio, allowing us to remote the ante handler + govParams := GovKeeper.GetParams(ctx) + govParams.MinInitialDepositRatio = sdk.NewDec(20).Quo(sdk.NewDec(100)).String() + if err := GovKeeper.SetParams(ctx, govParams); err != nil { + return nil, err + } + logger.Info(fmt.Sprintf("updated gov params to %v", govParams)) + + // x/Mint + // Double blocks per year (from 6 seconds to 3 = 2x blocks per year) + mintParams := MintKeeper.GetParams(ctx) + mintParams.BlocksPerYear *= 2 + if err = MintKeeper.SetParams(ctx, mintParams); err != nil { + return nil, err + } + logger.Info(fmt.Sprintf("updated minted blocks per year logic to %v", mintParams)) + + // x/Slashing + // Double slashing window due to double blocks per year + slashingParams := SlashingKeeper.GetParams(ctx) + slashingParams.SignedBlocksWindow *= 2 + if err := SlashingKeeper.SetParams(ctx, slashingParams); err != nil { + return nil, err + } + logger.Info(fmt.Sprintf("updated slashing params to %v", slashingParams)) + + // update wasm to permissionless + wasmParams := wasmKeeper.GetParams(ctx) + wasmParams.CodeUploadAccess = wasmtypes.AllowEverybody + wasmKeeper.SetParams(ctx, wasmParams) + logger.Info(fmt.Sprintf("updated wasm params to %v", wasmParams)) + + // update discard BH of oracle + bandData := bandoracleKeeper.GetFetchPriceMsg(ctx) + if bandData.Size() > 0 { + bandData.AcceptedHeightDiff = 6000 + bandoracleKeeper.SetFetchPriceMsg(ctx, bandData) + logger.Info(fmt.Sprintf("updated bandData to %v", bandData)) + } + return vm, err + } +} diff --git a/app/upgrades/testnet/v2_0_0/upgrades.go b/app/upgrades/testnet/v2_0_0/upgrades.go index 9be3fb825..1b63a71cd 100644 --- a/app/upgrades/testnet/v2_0_0/upgrades.go +++ b/app/upgrades/testnet/v2_0_0/upgrades.go @@ -6,13 +6,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types" + ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" ) // CreateUpgradeHandler creates an SDK upgrade handler for v2_0_0 @@ -40,7 +40,7 @@ func CreateUpgradeHandlerV2( // Add Interchain Accounts host module // set the ICS27 consensus version so InitGenesis is not run - fromVM[icatypes.ModuleName] = mm.Modules[icatypes.ModuleName].ConsensusVersion() + // fromVM[icatypes.ModuleName] = mm.Modules[icatypes.ModuleName].ConsensusVersion() // create ICS27 Controller submodule params, controller module not enabled. controllerParams := icacontrollertypes.Params{} diff --git a/app/wasm/test/helpers_test.go b/app/wasm/test/helpers_test.go index a15d04c98..5beec95ad 100644 --- a/app/wasm/test/helpers_test.go +++ b/app/wasm/test/helpers_test.go @@ -8,32 +8,34 @@ import ( "github.com/comdex-official/comdex/app/wasm/bindings" assetTypes "github.com/comdex-official/comdex/x/asset/types" tokenmintTypes "github.com/comdex-official/comdex/x/tokenmint/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/stretchr/testify/require" - "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cometbft/cometbft/crypto" + "github.com/cometbft/cometbft/crypto/ed25519" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + // simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/crypto/ed25519" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/comdex-official/comdex/app" "github.com/comdex-official/comdex/x/tokenmint/keeper" ) -func SetupCustomApp() (*app.App, *sdk.Context) { - comdex, ctx := CreateTestInput() +func SetupCustomApp(t *testing.T) (*app.App, *sdk.Context) { + comdex, ctx := CreateTestInput(t) return comdex, ctx } -func CreateTestInput() (*app.App, *sdk.Context) { - comdex := app.Setup(false) +func CreateTestInput(t *testing.T) (*app.App, *sdk.Context) { + comdex := app.Setup(t, false) ctx := comdex.BaseApp.NewContext(false, tmproto.Header{Height: 1, ChainID: "comdex-1", Time: time.Now().UTC()}) return comdex, &ctx } func FundAccount(t *testing.T, ctx sdk.Context, comdex *app.App, acct sdk.AccAddress) { - err := simapp.FundAccount(comdex.BankKeeper, ctx, acct, sdk.NewCoins( + err := FundAccountFunc(comdex.BankKeeper, ctx, acct, sdk.NewCoins( sdk.NewCoin("ucmdx", sdk.NewInt(10000000000)), )) require.NoError(t, err) @@ -235,3 +237,11 @@ func MsgMintNewTokens(app *app.App, ctx1 sdk.Context) { fmt.Println(err) } } + +func FundAccountFunc(bankKeeper bankkeeper.Keeper, ctx sdk.Context, addr sdk.AccAddress, amounts sdk.Coins) error { + if err := bankKeeper.MintCoins(ctx, minttypes.ModuleName, amounts); err != nil { + return err + } + + return bankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, amounts) +} diff --git a/app/wasm/test/messages_test.go b/app/wasm/test/messages_test.go index bc6e1c5a7..dcc1e2f8b 100644 --- a/app/wasm/test/messages_test.go +++ b/app/wasm/test/messages_test.go @@ -11,7 +11,7 @@ import ( func TestWhitelistAssetLocker(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddAppAsset(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, &comdex.LockerKeeper, @@ -23,7 +23,7 @@ func TestWhitelistAssetLocker(t *testing.T) { &comdex.VaultKeeper, &comdex.LendKeeper, &comdex.LiquidityKeeper, - &comdex.MarketKeeper) + &comdex.MarketKeeper) for _, tc := range []struct { name string msg *bindings.MsgWhiteListAssetLocker @@ -55,7 +55,7 @@ func TestWhitelistAssetLocker(t *testing.T) { func TestAddMsgAddExtendedPairsVault(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddPair(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, &comdex.LockerKeeper, @@ -113,7 +113,7 @@ func TestAddMsgAddExtendedPairsVault(t *testing.T) { func TestMsgSetCollectorLookupTable(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddPair(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, &comdex.LockerKeeper, @@ -165,7 +165,7 @@ func TestMsgSetCollectorLookupTable(t *testing.T) { func TestMsgSetAuctionMappingForApp(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddPair(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, &comdex.LockerKeeper, @@ -215,7 +215,7 @@ func TestMsgSetAuctionMappingForApp(t *testing.T) { func TestMsgUpdateCollectorLookupTable(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddPair(comdex, *ctx) AddCollectorLookuptable(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, @@ -267,7 +267,7 @@ func TestMsgUpdateCollectorLookupTable(t *testing.T) { func TestMsgUpdatePairsVault(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddPair(comdex, *ctx) AddExtendedPairVault(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, @@ -324,7 +324,7 @@ func TestMsgUpdatePairsVault(t *testing.T) { func TestMsgWhitelistAppIDLiquidation(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddPair(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, &comdex.LockerKeeper, @@ -371,7 +371,7 @@ func TestMsgWhitelistAppIDLiquidation(t *testing.T) { func TestMsgRemoveWhitelistAppIDLiquidation(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddPair(comdex, *ctx) WhitelistAppIDLiquidation(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, @@ -416,7 +416,7 @@ func TestMsgRemoveWhitelistAppIDLiquidation(t *testing.T) { func TestMsgAddAuctionParams(t *testing.T) { actor := RandomAccountAddress() - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) AddPair(comdex, *ctx) querier := wasm.NewQueryPlugin(&comdex.AssetKeeper, &comdex.LockerKeeper, @@ -474,7 +474,7 @@ func TestMsgBurnGovTokensForApp(t *testing.T) { actor := RandomAccountAddress() userAddress := "cosmos1q7q90qsl9g0gl2zz0njxwv2a649yqrtyxtnv3v" addr, _ := sdk.AccAddressFromBech32(userAddress) - comdex, ctx := SetupCustomApp() + comdex, ctx := SetupCustomApp(t) MsgMintNewTokens(comdex, *ctx) for _, tc := range []struct { diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 000000000..aaa7db84b --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - name: gocosmos + out: . + opt: plugins=interfacetype+grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types + - name: grpc-gateway + out: . + opt: logtostderr=true,allow_colon_final_segments=true \ No newline at end of file diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 000000000..7a18eb025 --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,3 @@ +version: v1 +directories: + - proto \ No newline at end of file diff --git a/cmd/comdex/genaccounts.go b/cmd/comdex/genaccounts.go index 1fea27ae6..fe4afcbce 100644 --- a/cmd/comdex/genaccounts.go +++ b/cmd/comdex/genaccounts.go @@ -54,7 +54,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa return err } - kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, clientCtx.HomeDir, inBuf) + kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, clientCtx.HomeDir, inBuf, clientCtx.Codec) if err != nil { return err } @@ -64,7 +64,10 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa return fmt.Errorf("failed to get address from Keybase: %w", err) } - addr = info.GetAddress() + addr, err = info.GetAddress() + if err != nil { + return err + } } coins, err := sdk.ParseCoinsNormalized(args[1]) diff --git a/cmd/comdex/main.go b/cmd/comdex/main.go index 1b746d1fe..4173b50d5 100644 --- a/cmd/comdex/main.go +++ b/cmd/comdex/main.go @@ -13,7 +13,7 @@ func main() { comdex.SetAccountAddressPrefixes() root, _ := NewRootCmd() - if err := servercmd.Execute(root, comdex.DefaultNodeHome); err != nil { + if err := servercmd.Execute(root, "", comdex.DefaultNodeHome); err != nil { switch e := err.(type) { case server.ErrorCode: os.Exit(e.Code) diff --git a/cmd/comdex/migrate.go b/cmd/comdex/migrate.go index 5b76229ce..7f6b135a7 100644 --- a/cmd/comdex/migrate.go +++ b/cmd/comdex/migrate.go @@ -3,7 +3,8 @@ package main import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/x/genutil/types" - packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" + // bump47: uncomment below 1 + packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types" ) func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { diff --git a/cmd/comdex/migration.go b/cmd/comdex/migration.go index 9f7767116..62fbf9dc9 100644 --- a/cmd/comdex/migration.go +++ b/cmd/comdex/migration.go @@ -5,6 +5,8 @@ import ( "fmt" "time" + tmjson "github.com/cometbft/cometbft/libs/json" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,8 +14,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/pkg/errors" "github.com/spf13/cobra" - tmjson "github.com/tendermint/tendermint/libs/json" - tmtypes "github.com/tendermint/tendermint/types" ) const flagGenesisTime = "genesis-time" diff --git a/cmd/comdex/root.go b/cmd/comdex/root.go index 83d2c4126..20c205d0b 100644 --- a/cmd/comdex/root.go +++ b/cmd/comdex/root.go @@ -10,6 +10,11 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/prometheus/client_golang/prometheus" + tmdb "github.com/cometbft/cometbft-db" + tmcfg "github.com/cometbft/cometbft/config" + tmcli "github.com/cometbft/cometbft/libs/cli" + "github.com/cometbft/cometbft/libs/log" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -21,18 +26,18 @@ import ( "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/snapshots" + snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" authcli "github.com/cosmos/cosmos-sdk/x/auth/client/cli" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" + "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/cast" "github.com/spf13/cobra" - tmcli "github.com/tendermint/tendermint/libs/cli" - "github.com/tendermint/tendermint/libs/log" - tmdb "github.com/tendermint/tm-db" comdex "github.com/comdex-official/comdex/app" ) @@ -46,7 +51,7 @@ func NewRootCmd() (*cobra.Command, comdex.EncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(authtypes.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). + WithBroadcastMode(flags.FlagBroadcastMode). WithHomeDir(comdex.DefaultNodeHome). WithViper("") @@ -68,7 +73,10 @@ func NewRootCmd() (*cobra.Command, comdex.EncodingConfig) { return err } - return server.InterceptConfigsPreRunHandler(cmd, "", nil) + // bump47: recheck if customTMConfig is required, else replace with nil + customTMConfig := initTendermintConfig() + + return server.InterceptConfigsPreRunHandler(cmd, "", nil, customTMConfig) }, } @@ -76,10 +84,24 @@ func NewRootCmd() (*cobra.Command, comdex.EncodingConfig) { return root, encodingConfig } +func initTendermintConfig() *tmcfg.Config { + cfg := tmcfg.DefaultConfig() + + // these values put a higher strain on node memory + // cfg.P2P.MaxNumInboundPeers = 100 + // cfg.P2P.MaxNumOutboundPeers = 40 + + return cfg +} + func initRootCmd(rootCmd *cobra.Command, encoding comdex.EncodingConfig) { + cfg := sdk.GetConfig() + cfg.Seal() + + gentxModule := comdex.ModuleBasics[genutiltypes.ModuleName].(genutil.AppModuleBasic) rootCmd.AddCommand( genutilcli.InitCmd(comdex.ModuleBasics, comdex.DefaultNodeHome), - genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, comdex.DefaultNodeHome), + genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, comdex.DefaultNodeHome, gentxModule.GenTxValidator), genutilcli.GenTxCmd(comdex.ModuleBasics, encoding.TxConfig, banktypes.GenesisBalancesIterator{}, comdex.DefaultNodeHome), genutilcli.ValidateGenesisCmd(comdex.ModuleBasics), AddGenesisAccountCmd(comdex.DefaultNodeHome), @@ -171,7 +193,7 @@ func appCreatorFunc(logger log.Logger, db tmdb.DB, tracer io.Writer, options ser } snapshotDir := filepath.Join(cast.ToString(options.Get(flags.FlagHome)), "data", "snapshots") - snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir) + snapshotDB, err := tmdb.NewDB("metadata", tmdb.GoLevelDBBackend, snapshotDir) if err != nil { panic(err) } @@ -183,6 +205,23 @@ func appCreatorFunc(logger log.Logger, db tmdb.DB, tracer io.Writer, options ser if cast.ToBool(options.Get("telemetry.enabled")) { wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer)) } + snapshotOptions := snapshottypes.NewSnapshotOptions( + cast.ToUint64(options.Get(server.FlagStateSyncSnapshotInterval)), + cast.ToUint32(options.Get(server.FlagStateSyncSnapshotKeepRecent)), + ) + + homeDir := cast.ToString(options.Get(flags.FlagHome)) + chainID := cast.ToString(options.Get(flags.FlagChainID)) + if chainID == "" { + // fallback to genesis chain-id + appGenesis, err := tmtypes.GenesisDocFromFile(filepath.Join(homeDir, "config", "genesis.json")) + if err != nil { + panic(err) + } + + chainID = appGenesis.ChainID + } + return comdex.New( logger, db, tracer, true, skipUpgradeHeights, cast.ToString(options.Get(flags.FlagHome)), @@ -199,14 +238,13 @@ func appCreatorFunc(logger log.Logger, db tmdb.DB, tracer io.Writer, options ser baseapp.SetInterBlockCache(cache), baseapp.SetTrace(cast.ToBool(options.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(options.Get(server.FlagIndexEvents))), - baseapp.SetSnapshotStore(snapshotStore), - baseapp.SetSnapshotInterval(cast.ToUint64(options.Get(server.FlagStateSyncSnapshotInterval))), - baseapp.SetSnapshotKeepRecent(cast.ToUint32(options.Get(server.FlagStateSyncSnapshotKeepRecent))), + baseapp.SetSnapshot(snapshotStore, snapshotOptions), + baseapp.SetChainID(chainID), ) } func appExportFunc(logger log.Logger, db tmdb.DB, tracer io.Writer, height int64, - forZeroHeight bool, jailAllowedAddrs []string, options servertypes.AppOptions, + forZeroHeight bool, jailAllowedAddrs []string, options servertypes.AppOptions, modulesToExport []string, ) (servertypes.ExportedApp, error) { config := comdex.MakeEncodingConfig() config.Marshaler = codec.NewProtoCodec(config.InterfaceRegistry) @@ -226,5 +264,5 @@ func appExportFunc(logger log.Logger, db tmdb.DB, tracer io.Writer, height int64 app = comdex.New(logger, db, tracer, true, map[int64]bool{}, homePath, cast.ToUint(options.Get(server.FlagInvCheckPeriod)), config, options, comdex.GetWasmEnabledProposals(), emptyWasmOpts) } - return app.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) + return app.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } diff --git a/cmd/comdex/testnet.go b/cmd/comdex/testnet.go index 09e0f17e2..52a4740fe 100644 --- a/cmd/comdex/testnet.go +++ b/cmd/comdex/testnet.go @@ -8,6 +8,11 @@ import ( "os" "path/filepath" + tmconfig "github.com/cometbft/cometbft/config" + tmos "github.com/cometbft/cometbft/libs/os" + tmrand "github.com/cometbft/cometbft/libs/rand" + tmtypes "github.com/cometbft/cometbft/types" + tmtimetypes "github.com/cometbft/cometbft/types/time" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -25,11 +30,6 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/spf13/cobra" - tmconfig "github.com/tendermint/tendermint/config" - tmos "github.com/tendermint/tendermint/libs/os" - tmrand "github.com/tendermint/tendermint/libs/rand" - tmtypes "github.com/tendermint/tendermint/types" - tmtimetypes "github.com/tendermint/tendermint/types/time" ) var ( @@ -69,7 +69,7 @@ Example: nodeDaemonHome, _ := cmd.Flags().GetString(flagNodeDaemonHome) startingIPAddress, _ := cmd.Flags().GetString(flagStartingIPAddress) numValidators, _ := cmd.Flags().GetInt(flagNumValidators) - algo, _ := cmd.Flags().GetString(flags.FlagKeyAlgorithm) + algo, _ := cmd.Flags().GetString(flags.FlagKeyType) return InitTestnet( clientCtx, cmd, config, mbm, genBalIterator, outputDir, chainID, minGasPrices, @@ -86,7 +86,7 @@ Example: cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created") cmd.Flags().String(server.FlagMinGasPrices, fmt.Sprintf("0.000006%s", sdk.DefaultBondDenom), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photino,0.001stake)") cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)") - cmd.Flags().String(flags.FlagKeyAlgorithm, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for") + cmd.Flags().String(flags.FlagKeyType, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for") return cmd } @@ -161,7 +161,7 @@ func InitTestnet( memo := fmt.Sprintf("%s@%s:26656", nodeIDs[i], ip) genFiles = append(genFiles, nodeConfig.GenesisFile()) - kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, nodeDir, inBuf) + kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, nodeDir, inBuf, clientCtx.Codec) if err != nil { return err } @@ -325,7 +325,7 @@ func collectGenFiles( return err } - nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.Codec, clientCtx.TxConfig, nodeConfig, initCfg, *genDoc, genBalIterator) + nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.Codec, clientCtx.TxConfig, nodeConfig, initCfg, *genDoc, genBalIterator, genutiltypes.DefaultMessageValidator) if err != nil { return err } diff --git a/docker/run_comdex.sh b/docker/run_comdex.sh index f405b8eff..7e49a0bca 100755 --- a/docker/run_comdex.sh +++ b/docker/run_comdex.sh @@ -6,4 +6,4 @@ if test -n "$1"; then fi mkdir -p /root/log -comdex start --rpc.laddr tcp://0.0.0.0:26657 --trace \ No newline at end of file +comdex start --rpc.laddr tcp://0.0.0.0:26657 --minimum-gas-prices 0.0001ucmdx --trace \ No newline at end of file diff --git a/docker/setup_comdex.sh b/docker/setup_comdex.sh index d99817834..afbb75ff5 100755 --- a/docker/setup_comdex.sh +++ b/docker/setup_comdex.sh @@ -14,7 +14,6 @@ echo "Configured Block Gas Limit: $BLOCK_GAS_LIMIT" # check the genesis file GENESIS_FILE="$HOME"/.comdex/config/genesis.json -GENESIS_FILE="$HOME"/.comdex/config/genesis.json if [ -f "$GENESIS_FILE" ]; then echo "$GENESIS_FILE exists..." else diff --git a/go.mod b/go.mod index 5b42f3815..68dee2bc5 100644 --- a/go.mod +++ b/go.mod @@ -3,35 +3,37 @@ module github.com/comdex-official/comdex go 1.20 require ( - github.com/CosmWasm/wasmd v0.31.0 + cosmossdk.io/api v0.3.1 + cosmossdk.io/math v1.1.2 + github.com/CosmWasm/wasmd v0.41.0 github.com/CosmWasm/wasmvm v1.3.0 github.com/bandprotocol/bandchain-packet v0.0.3 - github.com/cosmos/cosmos-sdk v0.46.13 - github.com/cosmos/ibc-apps/modules/async-icq/v4 v4.0.0-20230524151648-c02fa46c2860 - github.com/gogo/protobuf v1.3.3 + github.com/cometbft/cometbft v0.37.2 + github.com/cometbft/cometbft-db v0.8.0 + github.com/cosmos/cosmos-sdk v0.47.5 + github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.0.0-20230726182236-3a9d46a7c2a4 + github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230726182236-3a9d46a7c2a4 github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/client_golang v1.16.0 github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - github.com/tendermint/tendermint v0.34.27 - github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b - google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa - google.golang.org/grpc v1.53.0 + google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 + google.golang.org/grpc v1.57.0 google.golang.org/protobuf v1.31.0 ) require ( - github.com/cosmos/ibc-go/v4 v4.4.2 - github.com/golangci/golangci-lint v1.53.3 - github.com/osmosis-labs/osmosis/v15 v15.2.0 - github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.6 + github.com/cosmos/ibc-go/v7 v7.2.0 + github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/golangci/golangci-lint v1.51.2 github.com/rakyll/statik v0.1.7 github.com/spf13/pflag v1.0.5 - github.com/strangelove-ventures/packet-forward-middleware/v4 v4.0.4 + github.com/strangelove-ventures/packet-forward-middleware/v7 v7.0.0-20230523193151-73dea436e53f gopkg.in/yaml.v2 v2.4.0 mvdan.cc/gofumpt v0.5.0 ) @@ -39,62 +41,76 @@ require ( require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect - cosmossdk.io/errors v1.0.0-beta.7 // indirect - filippo.io/edwards25519 v1.0.0-rc.1 // indirect - github.com/4meepo/tagalign v1.2.2 // indirect + cloud.google.com/go v0.110.4 // indirect + cloud.google.com/go/compute v1.20.1 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/storage v1.30.1 // indirect + cosmossdk.io/core v0.6.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/errors v1.0.0 // indirect + cosmossdk.io/log v1.2.1 // indirect + cosmossdk.io/tools/rosetta v0.2.1 // indirect + filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect - github.com/Abirdcfly/dupword v0.0.11 // indirect - github.com/Antonboom/errname v0.1.10 // indirect - github.com/Antonboom/nilnil v0.1.5 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/Abirdcfly/dupword v0.0.9 // indirect + github.com/Antonboom/errname v0.1.7 // indirect + github.com/Antonboom/nilnil v0.1.1 // indirect + github.com/BurntSushi/toml v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/Djarvur/go-err113 v0.1.0 // indirect github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect - github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect - github.com/Workiva/go-datastructures v1.0.53 // indirect - github.com/alexkohler/nakedret/v2 v2.0.2 // indirect + github.com/OpenPeeDeeP/depguard v1.1.1 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/ashanbrown/forbidigo v1.5.3 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect + github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect github.com/bombsimon/wsl/v3 v3.4.0 // indirect - github.com/breml/bidichk v0.2.4 // indirect - github.com/breml/errchkjson v0.3.1 // indirect - github.com/btcsuite/btcd v0.22.3 // indirect - github.com/butuzov/ireturn v0.2.0 // indirect - github.com/butuzov/mirror v1.1.0 // indirect + github.com/breml/bidichk v0.2.3 // indirect + github.com/breml/errchkjson v0.3.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/butuzov/ireturn v0.1.1 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/charithe/durationcheck v0.0.10 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect + github.com/chzyer/readline v1.5.1 // indirect + github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gogoproto v1.4.6 // indirect - github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.5 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v0.20.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect - github.com/creachadair/taskgroup v0.3.2 // indirect + github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect + github.com/creachadair/taskgroup v0.4.2 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/daixiang0/gci v0.10.1 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect - github.com/dgraph-io/badger/v3 v3.2103.2 // indirect - github.com/dgraph-io/ristretto v0.1.0 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/esimonov/ifshort v1.0.4 // indirect github.com/ettle/strcase v0.1.1 // indirect @@ -104,11 +120,12 @@ require ( github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/gin-gonic/gin v1.9.0 // indirect github.com/go-critic/go-critic v0.8.1 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect github.com/go-toolsmith/astequal v1.1.0 // indirect @@ -120,10 +137,12 @@ require ( github.com/gobwas/glob v0.2.3 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.8.1 // indirect - github.com/gogo/gateway v1.1.0 // indirect - github.com/golang/glog v1.0.0 // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect @@ -134,11 +153,14 @@ require ( github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/flatbuffers v1.12.1 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect + github.com/google/s2a-go v0.1.4 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.11.0 // indirect + github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect @@ -150,25 +172,33 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect + github.com/huandu/skiplist v1.2.0 // indirect github.com/iancoleman/orderedmap v0.2.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jgautheron/goconst v1.5.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/julz/importas v0.1.0 // indirect + github.com/junk1tm/musttag v0.4.5 // indirect github.com/kisielk/errcheck v1.6.3 // indirect github.com/kisielk/gotool v1.0.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.4 // indirect - github.com/klauspost/compress v1.15.11 // indirect + github.com/kkHAIKE/contextcheck v1.1.3 // indirect + github.com/klauspost/compress v1.16.3 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.7 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect @@ -177,20 +207,23 @@ require ( github.com/leonklingele/grouper v1.1.1 // indirect github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/linxGnu/grocksdb v1.7.16 // indirect github.com/lufeee/execinquery v1.2.1 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/manifoldco/promptui v0.9.0 // indirect github.com/maratori/testableexamples v1.0.0 // indirect github.com/maratori/testpackage v1.1.1 // indirect github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.10 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect github.com/mgechev/revive v1.3.2 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moricho/tparallel v0.3.1 // indirect github.com/mtibben/percent v0.2.1 // indirect @@ -201,23 +234,22 @@ require ( github.com/nunnatsa/ginkgolinter v0.12.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/osmosis-labs/osmosis/osmoutils v0.0.4 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect - github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polyfloyd/go-errorlint v1.4.2 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/quasilyte/go-ruleguard v0.3.19 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/rs/cors v1.8.2 // indirect - github.com/rs/zerolog v1.27.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.30.0 // indirect github.com/ryancurrah/gomodguard v1.3.0 // indirect github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect @@ -232,50 +264,53 @@ require ( github.com/sivchari/tenv v1.7.1 // indirect github.com/sonatard/noctx v0.0.2 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/spf13/afero v1.9.3 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.15.0 // indirect + github.com/spf13/viper v1.16.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect - github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tendermint/btcd v0.1.1 // indirect - github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect + github.com/tdakkota/asciicheck v0.1.1 // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tetafro/godot v1.4.11 // indirect - github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect - github.com/timonwong/loggercheck v0.9.4 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect + github.com/tidwall/btree v1.6.0 // indirect + github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e // indirect + github.com/timonwong/loggercheck v0.9.3 // indirect + github.com/tomarrell/wrapcheck/v2 v2.8.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect + github.com/ulikunitz/xz v0.5.11 // indirect github.com/ultraware/funlen v0.0.3 // indirect github.com/ultraware/whitespace v0.0.5 // indirect github.com/uudashr/gocognit v1.0.6 // indirect - github.com/xen0n/gosmopolitan v1.2.1 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect - github.com/ykadowak/zerologlint v0.1.2 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect gitlab.com/bosi/decorder v0.2.3 // indirect - go.etcd.io/bbolt v1.3.6 // indirect + go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - go.tmz.dev/musttag v0.7.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect - golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.10.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect + golang.org/x/exp/typeparams v0.0.0-20230213192124-5e25df0256eb // indirect + golang.org/x/mod v0.11.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.12.0 // indirect golang.org/x/tools v0.9.3 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.126.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.4.3 // indirect @@ -283,15 +318,16 @@ require ( mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect nhooyr.io/websocket v1.8.7 // indirect + pgregory.net/rapid v0.5.5 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) replace ( - github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/comdex-official/cosmos-sdk v0.45.9-comdex.5 - //breaking changes - github.com/cosmos/iavl v0.19.5 => github.com/cosmos/iavl v0.19.4 - github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - // Informal Tendermint fork to be replaced with skip-mev tendermint - github.com/tendermint/tendermint => github.com/skip-mev/mev-tendermint v0.34.24-mev.18 - google.golang.org/grpc => google.golang.org/grpc v1.33.2 + // use cosmos fork of keyring + github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 + //TODO: to be replaced from comdex fork of bandchain-packet + github.com/bandprotocol/bandchain-packet => github.com/InjectiveLabs/bandchain-packet v0.0.4-0.20230327115226-35199d4659d5 + // https://github.com/cosmos/cosmos-sdk/blob/v0.47.5/UPGRADING.md#protobuf + // github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/go.sum b/go.sum index 79a0866ac..e11b81db1 100644 --- a/go.sum +++ b/go.sum @@ -8,6 +8,7 @@ bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxo bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.25.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= @@ -44,24 +45,59 @@ cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= +cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= +cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -69,77 +105,203 @@ cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUM cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= +cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/firestore v1.8.0/go.mod h1:r3KB8cAdRIe8znzoPWLw8S6gpDVd9treohhn8b09424= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= +cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= +cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= +cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= +cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -147,30 +309,69 @@ cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+ cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= +cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= +cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= +cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= +cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -179,17 +380,51 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= +cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= code.gitea.io/sdk/gitea v0.12.0/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= @@ -198,36 +433,51 @@ contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= -cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= +cosmossdk.io/api v0.2.1/go.mod h1:kNpfY0UY7Cz4ZuLJ4hm9auUGfmj23UFpOQ/Bo8IKCFw= +cosmossdk.io/api v0.2.5/go.mod h1:vxhlMTeKWgQUaanTHPq7/vR3dkhhJ6pOgXK0EIBrBYw= +cosmossdk.io/api v0.3.0/go.mod h1:2HDRQHwVIyklENrrXko0E/waZrRFZWHhPyhcBO4qHq4= +cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= +cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= +cosmossdk.io/core v0.3.2/go.mod h1:CO7vbe+evrBvHc0setFHL/u7nlY7HJGzdRSBkT/sirc= +cosmossdk.io/core v0.6.1 h1:OBy7TI2W+/gyn2z40vVvruK3di+cAluinA6cybFbE7s= +cosmossdk.io/core v0.6.1/go.mod h1:g3MMBCBXtxbDWBURDVnJE7XML4BG5qENhs0gzkcpuFA= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= +cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= +cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= +cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= +cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.0.0-beta.3/go.mod h1:3LYasri3Zna4XpbrTNdKsWmD5fHHkaNAod/mNT9XdE4= +cosmossdk.io/math v1.0.0-beta.4/go.mod h1:An0MllWJY6PxibUpnwGk8jOm+a/qIxlKmL5Zyp9NnaM= +cosmossdk.io/math v1.0.0-beta.6/go.mod h1:gUVtWwIzfSXqcOT+lBVz2jyjfua8DoBdzRsIyaUAT/8= +cosmossdk.io/math v1.0.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= +cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/tools/rosetta v0.2.0/go.mod h1:3mn8QuE2wLUdTi77/gbDXdFqXZdBdiBJhgAWUTSXPv8= +cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= +cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= -filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= -github.com/4meepo/tagalign v1.2.2 h1:kQeUTkFTaBRtd/7jm8OKJl9iHk0gAO+TDFPHGSna0aw= -github.com/4meepo/tagalign v1.2.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= -github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= -github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/Abirdcfly/dupword v0.0.7/go.mod h1:K/4M1kj+Zh39d2aotRwypvasonOyAMH1c/IZJzE0dmk= -github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU= -github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= +github.com/Abirdcfly/dupword v0.0.9 h1:MxprGjKq3yDBICXDgEEsyGirIXfMYXkLNT/agPsE1tk= +github.com/Abirdcfly/dupword v0.0.9/go.mod h1:PzmHVLLZ27MvHSzV7eFmMXSFArWXZPZmfuuziuUrf2g= github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0/go.mod h1:0mMDvQFeLbbn1Wy8P2j3hwFhqBq+FKn8OZPno8WLmp8= +github.com/Antonboom/errname v0.1.6/go.mod h1:7lz79JAnuoMNDAWE9MeeIr1/c/VpSUWatBv2FH9NYpI= +github.com/Antonboom/errname v0.1.7 h1:mBBDKvEYwPl4WFFNwec1CZO096G6vzK9vvDQzAwkako= github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= -github.com/Antonboom/errname v0.1.10 h1:RZ7cYo/GuZqjr1nuJLNe8ZH+a+Jd9DaZzttWzak9Bls= -github.com/Antonboom/errname v0.1.10/go.mod h1:xLeiCIrvVNpUtsN0wxAh05bNIZpqE22/qDMnTBTttiA= +github.com/Antonboom/nilnil v0.1.1 h1:PHhrh5ANKFWRBh7TdYmyyq2gyT2lotnvFvvFbylF81Q= github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= -github.com/Antonboom/nilnil v0.1.5 h1:X2JAdEVcbPaOom2TUa1FxZ3uyuUlex0XMLGYMemu6l0= -github.com/Antonboom/nilnil v0.1.5/go.mod h1:I24toVuBKhfP5teihGWctrRiPbRKHwZIFOvc6v3HZXk= github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= @@ -245,7 +495,6 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2 github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbIe3AcV9WZbAdpkoXOa0= -github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= @@ -291,33 +540,35 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.31.0 h1:xACf6A/SkCeGWQWrKGsR4X9PQb5G4XYuNfnrl+HQ1mE= -github.com/CosmWasm/wasmd v0.31.0/go.mod h1:VcyDGk/ISVlMUeW+1GGL0zdHWBS2FPwLEV2qZ86l7l8= +github.com/CosmWasm/wasmd v0.41.0 h1:fmwxSbwb50zZDcBaayYFRLIaSFca+EFld1WOaQi49jg= +github.com/CosmWasm/wasmd v0.41.0/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= github.com/CosmWasm/wasmvm v1.3.0 h1:x12X4bKlUPS7TT9QQP45+fJo2sp30GEbiSSgb9jsec8= github.com/CosmWasm/wasmvm v1.3.0/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Djarvur/go-err113 v0.1.0 h1:uCRZZOdMQ0TZPHYTdYpoC0bLYJKPEHPUJ8MeAa51lNU= github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0/go.mod h1:LGOGuvEgCfCQsy3JF2tRmpGDpzA53iZfyGEWSPwQ6/4= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20191009163259-e802c2cb94ae/go.mod h1:mjwGPas4yKduTyubHvD1Atl9r1rUq8DfVy+gkVvZ+oo= github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/InjectiveLabs/bandchain-packet v0.0.4-0.20230327115226-35199d4659d5 h1:RN7PycNsQ1z59I3Fjms4blM++qS8eMMX03zZbC2DwmU= +github.com/InjectiveLabs/bandchain-packet v0.0.4-0.20230327115226-35199d4659d5/go.mod h1:VoNDHSybdPQ35/3zxNwjewaGpzWHhYyTgV7cJzFglEE= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= @@ -325,6 +576,7 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= @@ -337,6 +589,7 @@ github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugX github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= @@ -353,6 +606,7 @@ github.com/Microsoft/hcsshim v0.8.20/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwT github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/Microsoft/hcsshim v0.9.3/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim/test v0.0.0-20200826032352-301c83a30e7c/go.mod h1:30A5igQ91GEmhYJF8TaRP79pMBOYynRsyOByfVV0dU4= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= @@ -364,9 +618,10 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8 github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= +github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= +github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= +github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= @@ -375,23 +630,23 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:H github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= +github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= -github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= +github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= +github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -399,8 +654,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= -github.com/alexkohler/nakedret/v2 v2.0.2 h1:qnXuZNvv3/AxkAb22q/sEsEpcA99YxLFACDtEw9TPxE= -github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= @@ -410,6 +663,7 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= @@ -421,17 +675,18 @@ github.com/apex/log v1.3.0/go.mod h1:jd8Vpsr46WAe3EZSQ/IUMs2qQD/GOycT5rPWCO1yGcs github.com/apex/logs v0.0.4/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= -github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= @@ -442,6 +697,7 @@ github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvx github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.15.90/go.mod h1:es1KtYUFs7le0xQ3rOihkuoVD90z7D0fR2Qm4S00/gU= github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -450,12 +706,14 @@ github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.31.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= +github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= @@ -470,8 +728,6 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxq github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= -github.com/bandprotocol/bandchain-packet v0.0.3 h1:Mo2xVmjOSfc//0z1lskNkxrkpcxeU2nIwfHb2rHFLLg= -github.com/bandprotocol/bandchain-packet v0.0.3/go.mod h1:6mU33VjEShPvWYoTIQywRPxyS+HXcgnm0e7mlJwiTnQ= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= @@ -481,6 +737,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= @@ -507,37 +765,38 @@ github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2 github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= -github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/breml/bidichk v0.2.3 h1:qe6ggxpTfA8E75hdjWPZ581sY3a2lnl0IRxLQFelECI= github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= -github.com/breml/bidichk v0.2.4 h1:i3yedFWWQ7YzjdZJHnPo9d/xURinSq3OM+gyM43K4/8= -github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= +github.com/breml/errchkjson v0.3.0 h1:YdDqhfqMT+I1vIxPSas44P+9Z9HzJwCeAzjB8PxP1xw= github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= -github.com/breml/errchkjson v0.3.1 h1:hlIeXuspTyt8Y/UmP5qy1JocGNR00KQHgfaNtRAjoxQ= -github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= +github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd v0.22.3 h1:kYNaWFvOw6xvqP0vR20RP1Zq1DVMBxEO8QN5d1/EfNg= -github.com/btcsuite/btcd v0.22.3/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd v0.23.0 h1:V2/ZgjfDFIygAX3ZapeigkVBoVUtOJKSwrhZdlpSvaA= +github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= +github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= +github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= @@ -546,20 +805,22 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bufbuild/buf v1.4.0/go.mod h1:mwHG7klTHnX+rM/ym8LXGl7vYpVmnwT96xWoRB4H5QI= +github.com/bufbuild/buf v1.7.0/go.mod h1:Go40fMAF46PnPLC7jJgTQhAI95pmC0+VtxFKVC0qLq0= github.com/bufbuild/buf v1.9.0/go.mod h1:1Q+rMHiMVcfgScEF/GOldxmu4o9TrQ2sQQh58K6MscE= +github.com/bufbuild/connect-go v0.2.0/go.mod h1:4efZ2eXFENwd4p7tuLaL9m0qtTsCOzuBvrohvRGevDM= github.com/bufbuild/connect-go v1.0.0/go.mod h1:9iNvh/NOsfhNBUH5CtvXeVUskQO1xsrEviH7ZArwZ3I= github.com/bufbuild/protocompile v0.1.0/go.mod h1:ix/MMMdsT3fzxfw91dvbfzKW3fRRnuPCP47kpAm5m/4= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= -github.com/butuzov/ireturn v0.2.0 h1:kCHi+YzC150GE98WFuZQu9yrTn6GEydO2AuPLbTgnO4= -github.com/butuzov/ireturn v0.2.0/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= -github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= -github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bwesterb/go-ristretto v1.2.2/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= @@ -576,27 +837,36 @@ github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.9 h1:mPP4ucLrf/rKZiIG/a9IPXHGlh8p4CzgpyTy6EEutYk= github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= -github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= +github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8Nv4fUjc/v1/8tHFqhuOJXnRub0dTfuAQktU= github.com/chavacava/garif v0.0.0-20220630083739-93517212f375/go.mod h1:4m1Rv7xfuwWPNKXlThldNuJvutYM6J95wNuuVmn55To= github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= +github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= @@ -608,25 +878,51 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cloudflare/circl v1.3.1/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.1.0/go.mod h1:6qgPBMXjATAdD/VefbRP9NoSLKjbB4LCoA7gN4LpHs4= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= -github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/comdex-official/cosmos-sdk v0.45.9-comdex.5 h1:RnRxY6M1baLuV39F5mxHoH8mMh5Y6ZQH92Jp60kROSU= -github.com/comdex-official/cosmos-sdk v0.45.9-comdex.5/go.mod h1:Z5M4TX7PsHNHlF/1XanI2DIpORQ+Q/st7oaeufEjnvU= +github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= +github.com/cometbft/cometbft v0.34.27-alpha.1/go.mod h1:hct3hasQ2hIF3HoD7foVw4RaqTNSSeJ/lgcrVK6uDvs= +github.com/cometbft/cometbft v0.37.0/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= +github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= +github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= +github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= +github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= @@ -673,9 +969,11 @@ github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0 github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= github.com/containerd/containerd v1.6.1/go.mod h1:1nJz5xCZPusx6jJU8Frfct988y0NpumIq9ODB0kLtoE= github.com/containerd/containerd v1.6.3-0.20220401172941-5ff8fce1fcc6/go.mod h1:WSt2SnDLAGWlu+Vl+EWay37seZLKqgRt6XLjIMy8SYM= +github.com/containerd/containerd v1.6.6/go.mod h1:ZoP1geJldzCVY3Tonoz7b1IXk8rIX0Nltt5QE4OMNk0= github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= @@ -764,47 +1062,73 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= +github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= +github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= +github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k= -github.com/cosmos/cosmos-sdk/ics23/go v0.8.0/go.mod h1:2a4dBq88TUoqoWAU5eu0lGvpFP3wWDPgdHPargtyw30= +github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= +github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-sdk v0.46.0-beta2.0.20221207001918-ed5124f932fd/go.mod h1:dmCp0cYz6/S5KWKJ9QzePRwWNEbcSu+jbBTRgnzPnPo= +github.com/cosmos/cosmos-sdk v0.47.0-rc2.0.20230220103612-f094a0c33410/go.mod h1:SNeHakoKi9YlfhI53+ijEZZIHp90NrB1By4NgWN0KZ0= +github.com/cosmos/cosmos-sdk v0.47.1/go.mod h1:14tO5KQaTrl2q3OxBnDRfue7TRN9zkXS0cLutrSqkOo= +github.com/cosmos/cosmos-sdk v0.47.5 h1:n1+WjP/VM/gAEOx3TqU2/Ny734rj/MX1kpUnn7zVJP8= +github.com/cosmos/cosmos-sdk v0.47.5/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= +github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a/go.mod h1:c8IO23vgNxueCCJlSI9awQtcxsvc+buzaeThB85qfBU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/gogoproto v1.4.6 h1:Ee7z15dWJaGlgM2rWrK8N2IX7PQcuccu8oG68jp5RL4= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.1/go.mod h1:Ac9lzL4vFpBMcptJROQ6dQ4M3pOEK5Z/l0Q9p+LoCr4= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.3/go.mod h1:0hLIG5TR7IvV1fme1HCFKjfzW9X2x0Mo+RooWXCnOWU= +github.com/cosmos/gogoproto v1.4.4/go.mod h1:/yl6/nLwsZcZ2JY3OrqjRqvqCG9InUMcXRfRjQiF9DU= github.com/cosmos/gogoproto v1.4.6/go.mod h1:VS/ASYmPgv6zkPKLjR9EB91lwbLHOzaGCirmKKhncfI= -github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= +github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= +github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.3/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-apps/modules/async-icq/v4 v4.0.0-20230524151648-c02fa46c2860 h1:25/KpA4WJqdFjKFsa3VEL0ctWRovkEsqIn2phCAi9v0= -github.com/cosmos/ibc-apps/modules/async-icq/v4 v4.0.0-20230524151648-c02fa46c2860/go.mod h1:X/dLZ6QxTImzno7qvD6huLhh6ZZBcRt2URn4YCLcXFY= -github.com/cosmos/ibc-go v1.0.0/go.mod h1:2wHKQUa+BLJMEyN635KrHfmTTwSNHBtXcqdY8JWGuXA= -github.com/cosmos/ibc-go/v4 v4.4.2 h1:PG4Yy0/bw6Hvmha3RZbc53KYzaCwuB07Ot4GLyzcBvo= -github.com/cosmos/ibc-go/v4 v4.4.2/go.mod h1:j/kD2JCIaV5ozvJvaEkWhLxM2zva7/KTM++EtKFYcB8= -github.com/cosmos/interchain-accounts v0.2.6 h1:TV2M2g1/Rb9MCNw1YePdBKE0rcEczNj1RGHT+2iRYas= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/iavl v0.20.0-alpha4/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= +github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.0.0-20230726182236-3a9d46a7c2a4 h1:AKzCfYLsVG9DtNzjya12u+OO0sUQpcXlecqnD/2rqGg= +github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.0.0-20230726182236-3a9d46a7c2a4/go.mod h1:/P6l2bWo2AR3rrsfs0DHuFZO3Imzb93sxFD3ihrIgw4= +github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230726182236-3a9d46a7c2a4 h1:NuFmpHnENcTtZDEQf2vZzZluk5rQl3f7J4tqo9FlH/c= +github.com/cosmos/ibc-apps/modules/ibc-hooks/v7 v7.0.0-20230726182236-3a9d46a7c2a4/go.mod h1:JwHFbo1oX/ht4fPpnPvmhZr+dCkYK1Vihw+vZE9umR4= +github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= +github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= +github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= -github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cosmos/rosetta-sdk-go v0.9.0/go.mod h1:2v41yXL25xxAXrczVSnbDHcQH9CgildruDlGQGKW/JU= +github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= +github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= +github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= +github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cristalhq/acmd v0.7.0/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= github.com/cristalhq/acmd v0.8.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= +github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= +github.com/cucumber/common/messages/go/v17 v17.1.1/go.mod h1:bpGxb57tDE385Rb2EohgUadLkAbhoC4IyCFi89u/JQI= +github.com/curioswitch/go-reassign v0.1.2/go.mod h1:bFJIHgtTM3hRm2sKXSPkbwNjSFyGURQXyn4IXD2qwfQ= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= @@ -814,10 +1138,11 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= +github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= +github.com/daixiang0/gci v0.6.3/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= github.com/daixiang0/gci v0.8.1/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -828,11 +1153,12 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= @@ -844,13 +1170,14 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/badger/v3 v3.2103.2 h1:dpyM5eCJAtQCBcMCZcT4UBZchuTJgCywerHHgmxfxM8= github.com/dgraph-io/badger/v3 v3.2103.2/go.mod h1:RHo4/GmYcKKh5Lxu63wLEMHJ70Pac2JqZRYGhlyAo2M= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= @@ -860,7 +1187,6 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUn github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= @@ -875,8 +1201,10 @@ github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TT github.com/docker/distribution v2.6.0-rc.1.0.20180327202408-83389a148052+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20200511152416-a93e9eb0e95c/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20180531152204-71cd53e4a197/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -904,35 +1232,43 @@ github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f/go.mod h github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac h1:opbrjaN/L8gg6Xh5D04Tem+8xVcz6ajZlGCs49mQgyg= -github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= @@ -941,12 +1277,10 @@ github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= @@ -959,13 +1293,12 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/firefart/nonamedreturns v1.0.1/go.mod h1:D3dpIBojGGNh5UfElmwPu73SwDCm+VKhHYqwlNOk2uQ= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= -github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -975,6 +1308,7 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -985,6 +1319,7 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fzipp/gocyclo v0.5.1/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= @@ -993,6 +1328,8 @@ github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -1001,20 +1338,25 @@ github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwv github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= +github.com/go-critic/go-critic v0.6.3/go.mod h1:c6b3ZP1MQ7o6lPR7Rv3lEf7pYQUmAcx8ABHgdZCQt/k= +github.com/go-critic/go-critic v0.6.4/go.mod h1:qL5SOlk7NtY6sJPoVCTKDIgzNOxHkkkOCVDyi9wJe1U= github.com/go-critic/go-critic v0.6.5/go.mod h1:ezfP/Lh7MA6dBNn4c6ab5ALv3sKnZVLx37tr00uuaOY= github.com/go-critic/go-critic v0.8.1 h1:16omCF1gN3gTzt4j4J6fKI/HnRojhEp+Eks6EuKw3vw= github.com/go-critic/go-critic v0.8.1/go.mod h1:kpzXl09SIJX1cr9TB/g/sAG+eFEl7ZS9f9cqvZtyNl0= -github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= -github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= -github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.4.0/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= +github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= +github.com/go-git/go-git/v5 v5.5.1/go.mod h1:uz5PQ3d0gz7mSgzZhSJToM6ALPaKCdSnl58/Xb5hzr8= +github.com/go-git/go-git/v5 v5.5.2/go.mod h1:BE5hUJ5yaV2YMxhmaP4l6RBQ08kMxKSPD4BlxtH7OjI= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -1028,14 +1370,13 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= -github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -1062,8 +1403,6 @@ github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dp github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -1072,7 +1411,6 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -1085,11 +1423,13 @@ github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+W github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astcopy v1.0.1/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= github.com/go-toolsmith/astcopy v1.0.2/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= @@ -1140,13 +1480,24 @@ github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14j github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= -github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= @@ -1155,8 +1506,9 @@ github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+ github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1164,6 +1516,8 @@ github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= @@ -1197,10 +1551,10 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= @@ -1217,9 +1571,11 @@ github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzr github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= github.com/golangci/golangci-lint v1.23.7/go.mod h1:g/38bxfhp4rI7zeWSxcdIeHTQGS58TCak8FYcyCmavQ= github.com/golangci/golangci-lint v1.27.0/go.mod h1:+eZALfxIuthdrHPtfM7w/R3POJLjHDfJJw8XZl9xOng= +github.com/golangci/golangci-lint v1.46.2/go.mod h1:3DkdHnxn9eoTTrpT2gB0TEv8KSziuoqe9FitgQLHvAY= +github.com/golangci/golangci-lint v1.49.0/go.mod h1:+V/7lLv449R6w9mQ3WdV0EKh7Je/jTylMeSwBZcLeWE= github.com/golangci/golangci-lint v1.50.1/go.mod h1:AQjHBopYS//oB8xs0y0M/dtxdKHkdhl0RvmjUct0/4w= -github.com/golangci/golangci-lint v1.53.3 h1:CUcRafczT4t1F+mvdkUm6KuOpxUZTl0yWN/rSU6sSMo= -github.com/golangci/golangci-lint v1.53.3/go.mod h1:W4Gg3ONq6p3Jl+0s/h9Gr0j7yEgHJWWZO2bHl2tBUXM= +github.com/golangci/golangci-lint v1.51.2 h1:yIcsT1X9ZYHdSpeWXRT1ORC/FPGSqDHbHsu9uk4FK7M= +github.com/golangci/golangci-lint v1.51.2/go.mod h1:KH9Q7/3glwpYSknxUgUyLlAv46A8fsSKo1hH2wDvkr8= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= @@ -1233,6 +1589,7 @@ github.com/golangci/misspell v0.4.0/go.mod h1:W6O/bwV6lGDxUCChm2ykw9NQdd5bYd1Xkj github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= +github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= @@ -1247,8 +1604,8 @@ github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/crfs v0.0.0-20191108021818-71d77da419c9/go.mod h1:etGhoOqfwPkooV6aqoX3eBGQOJblqdoc9XvWOeuxpPw= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -1281,10 +1638,13 @@ github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6 github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible h1:xmapqc1AyLoB+ddYT6r04bD9lIjlOqGaREovi0SzFaE= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -1307,6 +1667,8 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJY github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= @@ -1315,11 +1677,16 @@ github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.3.0/go.mod h1:i1DMg/Lu8Sz5yYl25iOdmc5CT5qusaa+zmRWs16741s= github.com/google/wire v0.4.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -1330,6 +1697,10 @@ github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/Oth github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= @@ -1338,13 +1709,14 @@ github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97Dwqy github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= +github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gookit/color v1.5.1/go.mod h1:wZFzea4X8qN6vHOSP2apMb4/+w/orMznEzYsIHPaqKM= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28 h1:9alfqbrhuD+9fLZ4iaAVwhlp5PEhmnBt7yvK2Oy5C1U= +github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/goreleaser/goreleaser v0.136.0/go.mod h1:wiKrPUeSNh6Wu8nUHxZydSOVQ/OZvOaO7DTtFqie904= github.com/goreleaser/nfpm v1.2.1/go.mod h1:TtWrABZozuLOttX2uDlYyECfQX7x5XYkVxhjYcR6G9w= github.com/goreleaser/nfpm v1.3.0/go.mod h1:w0p7Kc9TAUgWMyrub63ex3M2Mgw88M4GZXoTq5UCb40= @@ -1360,7 +1732,6 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -1382,8 +1753,8 @@ github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= +github.com/gotestyourself/gotestyourself v1.4.0/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -1403,6 +1774,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -1419,9 +1792,11 @@ github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoP github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= @@ -1429,16 +1804,24 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-getter v1.6.2/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= +github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= +github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= @@ -1450,13 +1833,19 @@ github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= +github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= @@ -1475,25 +1864,29 @@ github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.8/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c/go.mod h1:fHzc09UnyJyqyW+bFuq864eh+wC7dj65aXmXLRe5to0= -github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= -github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= +github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= -github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= @@ -1509,7 +1902,6 @@ github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -1517,7 +1909,6 @@ github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -1531,29 +1922,34 @@ github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bS github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/informalsystems/tm-load-test v1.0.0/go.mod h1:WVaSKaQdfZK3v0C74EMzn7//+3aeCZF8wkIKBz2/M74= +github.com/informalsystems/tm-load-test v1.3.0/go.mod h1:OQ5AQ9TbT5hKWBNIwsMjn6Bf4O0U4b1kRc+0qZlQJKw= github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= +github.com/ishidawataru/sctp v0.0.0-20210226210310-f2269e66cdee/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/j-keck/arping v1.0.2/go.mod h1:aJbELhR92bSk7tp79AWM/ftfc90EfEi2bQJrbBFOsPw= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea/go.mod h1:QMdK4dGB3YhEW2BmA1wgGpPYI3HZy/5gD705PXKUVSg= github.com/jarcoal/httpmock v1.0.5/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= +github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= +github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= -github.com/jhump/protoreflect v1.13.1-0.20220928232736-101791cb1b4c h1:XImQJfpJLmGEEd8ll5yPVyL/aEvmgGHW4WYTyNseLOM= github.com/jhump/protoreflect v1.13.1-0.20220928232736-101791cb1b4c/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= @@ -1564,7 +1960,9 @@ github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -1595,31 +1993,33 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= -github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/junk1tm/musttag v0.4.5 h1:d+mpJ1vn6WFEVKHwkgJiIedis1u/EawKOuUTygAUtCo= +github.com/junk1tm/musttag v0.4.5/go.mod h1:XkcL/9O6RmD88JBXb+I15nYRl9W4ExhgQeCBEhfMC8U= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.6.2/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkHAIKE/contextcheck v1.1.3 h1:l4pNvrb8JSwRd51ojtcOxOeHJzHek+MtOyXbaR0uvmw= github.com/kkHAIKE/contextcheck v1.1.3/go.mod h1:PG/cwd6c0705/LM0KTr1acO2gORUxkSVWyLJOFW5qoo= -github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= -github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= @@ -1629,8 +2029,11 @@ github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= +github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= +github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0 h1:NMpwD2G9JSFOE1/TJjGSo5zG7Yb2bTe7eq1jH+irmeE= @@ -1649,6 +2052,7 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= @@ -1656,8 +2060,10 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.6.2/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= github.com/kunwardeep/paralleltest v1.0.7 h1:2uCk94js0+nVNQoHZNLBkAR1DQJrVzw6T0RMzJn55dQ= github.com/kunwardeep/paralleltest v1.0.7/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= @@ -1688,19 +2094,27 @@ github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= +github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= +github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magefile/mage v1.13.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -1713,6 +2127,8 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= @@ -1724,11 +2140,11 @@ github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859 github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1744,7 +2160,6 @@ github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HN github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= @@ -1753,8 +2168,8 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1773,12 +2188,15 @@ github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4f github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.2.1/go.mod h1:+Ro3wqY4vakcYNtkBWdZC7dBg1xSB6sp054wWwmeFm0= +github.com/mgechev/revive v1.2.3/go.mod h1:iAWlQishqCuj4yhV24FTnKSXGpbAA+0SckXB8GQMX/Q= github.com/mgechev/revive v1.2.4/go.mod h1:iAWlQishqCuj4yhV24FTnKSXGpbAA+0SckXB8GQMX/Q= github.com/mgechev/revive v1.3.2 h1:Wb8NQKBaALBJ3xrrj4zpwJwqwNA6nDpyJSEQWcCka6U= github.com/mgechev/revive v1.3.2/go.mod h1:UCLtc7o5vg5aXCwdUTU1kEBQ1v+YXPAkYDIDXbrs5I0= @@ -1807,6 +2225,9 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= @@ -1814,7 +2235,6 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -1825,6 +2245,7 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/buildkit v0.8.1/go.mod h1:/kyU1hKy/aYCuP39GZA9MaKioovHku57N6cqlKZIaiQ= +github.com/moby/buildkit v0.10.3/go.mod h1:jxeOuly98l9gWHai0Ojrbnczrk/rf+o9/JqNhY+UCSo= github.com/moby/buildkit v0.10.4/go.mod h1:Yajz9vt1Zw5q9Pp4pdb3TCSUXJBIroIQGQ3TTs/sLug= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= @@ -1900,10 +2321,11 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96d github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/networkplumbing/go-nft v0.2.0/go.mod h1:HnnM+tYvlGAsMU7yoYwXEVLLiDW9gdMmb5HoGcwpuQs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= +github.com/nishanths/exhaustive v0.8.1/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/exhaustive v0.8.3/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= @@ -1918,10 +2340,10 @@ github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= @@ -1940,6 +2362,7 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= @@ -1957,6 +2380,7 @@ github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDs github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= @@ -1985,8 +2409,8 @@ github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04s github.com/opencontainers/runc v1.1.0/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.1/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -2017,28 +2441,18 @@ github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= -github.com/osmosis-labs/osmosis/osmomath v0.0.4 h1:5cJfDi8mOuAzLfsQFoTGJvm/qca7Gj7wvDiVSTE1ibk= -github.com/osmosis-labs/osmosis/osmoutils v0.0.4 h1:W/lvzFsyt30GGi0+nD3Ktxlwe5Tl6ipKWilyyLjJ9Ro= -github.com/osmosis-labs/osmosis/osmoutils v0.0.4/go.mod h1:2MStAdC2TajbhgkAwT3SZPtMW/Bbvp0JYGPRle+5Qsc= -github.com/osmosis-labs/osmosis/v15 v15.2.0 h1:fFTeI2E344TtrrywP8neSq8iPB/gc5nEvaQvKNCn0bU= -github.com/osmosis-labs/osmosis/v15 v15.2.0/go.mod h1:wD/Qpm7eMtZVwXhGiJOr/fWMopVrOXtTgJIZrqe20g8= -github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.6 h1:PjfLL5rwwm44CeLnNQssrFgmj4BdeIS5DriKYhGz7IM= -github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.6/go.mod h1:2Aqs0L6JnMfo+P+It8q7hJsP1YB+Is5DJc4nRSiBF/U= +github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= -github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= @@ -2046,26 +2460,28 @@ github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrap github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= -github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pjbgf/sha1cd v0.2.3/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -2083,6 +2499,11 @@ github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUI github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3/go.mod h1:q5NXNGzqj5uPnVuhGkZfmgHqNUhf15VLi6L9kW0VEc0= +github.com/pointlander/jetset v1.0.1-0.20190518214125-eee7eff80bd4/go.mod h1:RdR1j20Aj5pB6+fw6Y9Ur7lMHpegTEjY1vc19hEZL40= +github.com/pointlander/peg v1.0.1/go.mod h1:5hsGDQR2oZI4QoWz0/Kdg3VSVEC31iJw/b7WjqCBGRI= +github.com/polyfloyd/go-errorlint v1.0.0/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= +github.com/polyfloyd/go-errorlint v1.0.2/go.mod h1:APVvOesVSAnne5SClsPxPdfvZTVDojXh1/G3qb5wjGI= github.com/polyfloyd/go-errorlint v1.0.5/go.mod h1:APVvOesVSAnne5SClsPxPdfvZTVDojXh1/G3qb5wjGI= github.com/polyfloyd/go-errorlint v1.4.2 h1:CU+O4181IxFDdPH6t/HT7IiDj1I7zxNi1RIUxYwn8d0= github.com/polyfloyd/go-errorlint v1.4.2/go.mod h1:k6fU/+fQe38ednoZS51T7gSIGQW1y94d6TkSr35OzH8= @@ -2100,12 +2521,15 @@ github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQ github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -2125,13 +2549,15 @@ github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -2147,22 +2573,27 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.1.2-0.20200318202121-b00d7a75d3d8/go.mod h1:CGFX09Ci3pq9QZdj86B+VGIdNj4VyCo2iPOGS9esB/k= github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a/go.mod h1:VMX+OnnSw4LicdiEGtRSD/1X8kW7GuEscjYNr4cOIT4= +github.com/quasilyte/go-ruleguard v0.3.17/go.mod h1:sST5PvaR7yb/Az5ksX8oc88usJ4EGjmJv7cK7y3jyig= github.com/quasilyte/go-ruleguard v0.3.18/go.mod h1:lOIzcYlgxrQ2sGJ735EHXmf/e9MJ516j16K/Ifcttvs= github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc= github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.16/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.19/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/dsl v0.3.21/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= github.com/quasilyte/gogrep v0.0.0-20220828223005-86e4605de09f/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= @@ -2177,10 +2608,7 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= -github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= @@ -2198,25 +2626,28 @@ github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= -github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryancurrah/gomodguard v1.0.4/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= +github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= github.com/ryancurrah/gomodguard v1.2.4/go.mod h1:+Kem4VjWwvFpUJRJSwa16s1tBJe+vbv02+naTow2f6M= github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= @@ -2224,10 +2655,13 @@ github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0K github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= +github.com/sagikazarmark/crypt v0.8.0/go.mod h1:TmKwZAo97S4Fy4sfMH/HX/cQP5D+ijra2NyLpNNmttY= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= @@ -2237,6 +2671,7 @@ github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71e github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.13.0/go.mod h1:D2Wb7niIYmTB+gB8z7kh8tyP5ccof1dQ+SFk+WW5NtY= github.com/sashamelentyev/usestdlibvars v1.20.0/go.mod h1:0GaP+ecfZMXShS0A94CJn6aEuPRILv8h/VuWI9n1ygg= github.com/sashamelentyev/usestdlibvars v1.23.0 h1:01h+/2Kd+NblNItNeux0veSL5cBF1jbEOPrEhDzGYq0= github.com/sashamelentyev/usestdlibvars v1.23.0/go.mod h1:YPwr/Y1LATzHI93CqoPUN/2BzGQ/6N/cl/KwgR0B/aU= @@ -2251,6 +2686,7 @@ github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= github.com/securego/gosec v0.0.0-20200401082031-e946c8c39989/go.mod h1:i9l/TNj+yDFh9SZXUTvspXTjbFXgZGP/UvhU1S65A4A= github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= +github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= github.com/securego/gosec/v2 v2.13.1/go.mod h1:EO1sImBMBWFjOTFzMWfTRrZW6M15gm60ljzrmy/wtHo= github.com/securego/gosec/v2 v2.16.0 h1:Pi0JKoasQQ3NnoRao/ww/N/XdynIB9NRYYZT5CyOs5U= github.com/securego/gosec/v2 v2.16.0/go.mod h1:xvLcVZqUfo4aAQu56TNv7/Ltz6emAOQAEsrZrt7uGlI= @@ -2259,12 +2695,14 @@ github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfP github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= -github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= +github.com/shirou/gopsutil/v3 v3.22.7/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI= github.com/shirou/gopsutil/v3 v3.22.9/go.mod h1:bBYl1kjgEJpWpxeHmLI+dVHWtyAwfcmSBLDsp2TNT8A= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= @@ -2286,11 +2724,11 @@ github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+W github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= +github.com/sivchari/tenv v1.5.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/sivchari/tenv v1.7.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= -github.com/skip-mev/mev-tendermint v0.34.24-mev.18 h1:Xqq3vtJxE2cSBUAIXproDiUwW9qXkHNgNSFLS07/QQA= -github.com/skip-mev/mev-tendermint v0.34.24-mev.18/go.mod h1:m3iKcdA/hSGrBwhwgg1fre71te6Ln6SZEstGroM5CJs= +github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= @@ -2317,8 +2755,9 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -2329,12 +2768,14 @@ github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKv github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -2350,25 +2791,24 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.0/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= -github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= -github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/strangelove-ventures/async-icq/v4 v4.0.0-rc0 h1:foE/5O2/XiqGsdTKx3R0BTfKgW9KnUYyQLZt0WFSesE= -github.com/strangelove-ventures/packet-forward-middleware/v4 v4.0.4 h1:8Tn4Gy/DAq7wzV1CxEGv80ujZ+nUvzgwwdCobO/Gj8Y= -github.com/strangelove-ventures/packet-forward-middleware/v4 v4.0.4/go.mod h1:AG8F5pdk3x1h7PlRvPoMem3623W+w8HJHrWYkVJ51kk= +github.com/strangelove-ventures/packet-forward-middleware/v7 v7.0.0-20230523193151-73dea436e53f h1:NJdZ+YJ9Vf2t286L20IjFK0SxGpobF1xIp5ZQlxWetk= +github.com/strangelove-ventures/packet-forward-middleware/v7 v7.0.0-20230523193151-73dea436e53f/go.mod h1:DJNSVK8NCYHM+aZHCFkcAqPwjzwHYAjhjSMlhAGtJ3c= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -2378,6 +2818,7 @@ github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -2398,6 +2839,7 @@ github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -2406,10 +2848,11 @@ github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7 github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= +github.com/sylvia7788/contextcheck v1.0.6/go.mod h1:9XDxwvxyuKD+8N+a7Gs7bfWLityh5t70g/GjdEt2N2M= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= @@ -2418,20 +2861,19 @@ github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cb github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= +github.com/tdakkota/asciicheck v0.1.1 h1:PKzG7JUTUmVspQTDqtkX9eSiLGossXTybutHwTXuO0A= github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= -github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= +github.com/tendermint/tendermint v0.34.20/go.mod h1:KtOwCLYJcsS1ymtAfnjjAtXfXClbqcqjdqzFt2Em1Ac= +github.com/tendermint/tendermint v0.37.0-rc2/go.mod h1:uYQO9DRNPeZROa9X3hJOZpYcVREDC2/HST+EiU5g2+A= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= -github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b h1:Y3ZPG6gdDCAV2sdGkD759ji/09GzaNu1X3qKTmZIbTo= -github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b/go.mod h1:ADqbS9NOSnBRK9R2RtYC61CdsHmVMD/yXAzcMuPexbU= +github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= @@ -2441,23 +2883,20 @@ github.com/tetafro/godot v0.4.2/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQx github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= +github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= -github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= +github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e h1:MV6KaVu/hzByHP0UvJ4HcMGE/8a6A4Rggc/0wx2AvJo= +github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= +github.com/timonwong/loggercheck v0.9.3 h1:ecACo9fNiHxX4/Bc02rW2+kaJIAMAes7qJ7JKxt0EZI= github.com/timonwong/loggercheck v0.9.3/go.mod h1:wUqnk9yAOIKtGA39l1KLE9Iz0QiTocu/YZoOf+OzFdw= -github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= -github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= +github.com/timonwong/logrlint v0.1.0/go.mod h1:Zleg4Gw+kRxNej+Ra7o+tEaW5k1qthTaYKU7rSD39LU= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= @@ -2472,12 +2911,15 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.6.1/go.mod h1:Eo+Opt6pyMW1b6cNllOcDSSoHO0aTJ+iF6BfCUbHltA= +github.com/tomarrell/wrapcheck/v2 v2.6.2/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= github.com/tomarrell/wrapcheck/v2 v2.7.0/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= -github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= -github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= +github.com/tomarrell/wrapcheck/v2 v2.8.0 h1:qDzbir0xmoE+aNxGCPrn+rUSxAX+nG6vREgbbXAR81I= +github.com/tomarrell/wrapcheck/v2 v2.8.0/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= +github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85/go.mod h1:a7cilN64dG941IOXfhJhlH0qB92hxJ9A1ewrdUmJ6xo= @@ -2502,6 +2944,10 @@ github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLY github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= +github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= @@ -2515,6 +2961,7 @@ github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= +github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -2538,24 +2985,20 @@ github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmF github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= -github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= github.com/xanzy/go-gitlab v0.32.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xen0n/gosmopolitan v1.2.1 h1:3pttnTuFumELBRSh+KQs1zcz4fN6Zy7aB0xlnQSn1Iw= -github.com/xen0n/gosmopolitan v1.2.1/go.mod h1:JsHq/Brs1o050OOdmzHeOr0N7OtlnKRAGAsElF8xBQA= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= @@ -2566,8 +3009,6 @@ github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsT github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/ykadowak/zerologlint v0.1.2 h1:Um4P5RMmelfjQqQJKtE8ZW+dLZrXrENeIzWWKw800U4= -github.com/ykadowak/zerologlint v0.1.2/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= @@ -2583,37 +3024,46 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.0/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +gitlab.com/bosi/decorder v0.2.1/go.mod h1:6C/nhLSbF6qZbYD8bRmISBwc6vcWdNsiIBkRvjJFrH0= gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= -go-simpler.org/assert v0.5.0 h1:+5L/lajuQtzmbtEfh69sr5cRf2/xZzyJhFjoOz/PPqs= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= @@ -2635,6 +3085,7 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0/go.mod h1:y/SlJpJQPd2UzfBCj0E9Flk9FDCtTyqUmaCB41qFrWI= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.3/go.mod h1:Dts42MGkzZne2yCru741+bFiTMWkIj/LLRizad7b9tw= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0/go.mod h1:vHItvsnJtp7ES++nFLLFBzUWny7fJQSvTlxFcqQGUr4= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= @@ -2643,6 +3094,7 @@ go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzox go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= +go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= go.opentelemetry.io/otel v1.11.0/go.mod h1:H2KtuEphyMvlhZ+F7tg9GRhAOe60moNx61Ex+WmiKkk= go.opentelemetry.io/otel/exporters/jaeger v1.4.1/go.mod h1:ZW7vkOu9nC1CxsD8bHNHCia5JUbwP39vxgd1q4Z5rCI= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= @@ -2668,12 +3120,12 @@ go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16g go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= +go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ= go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= -go.tmz.dev/musttag v0.7.0 h1:QfytzjTWGXZmChoX0L++7uQN+yRCPfyFm+whsM+lfGc= -go.tmz.dev/musttag v0.7.0/go.mod h1:oTFPvgOkJmp5kYL02S8+jrH0eLrBIl57rzWeA26zDEM= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -2700,6 +3152,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= @@ -2751,12 +3205,22 @@ golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2764,9 +3228,7 @@ golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= @@ -2775,28 +3237,25 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= -golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= -golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230131160201-f062dba9d201/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= -golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230213192124-5e25df0256eb h1:WGs/bGIWYyAY5PVgGGMXqGGCxSJz4fpoUExb/vgqNCU= +golang.org/x/exp/typeparams v0.0.0-20230213192124-5e25df0256eb/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -2811,12 +3270,10 @@ golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -2829,11 +3286,12 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2881,7 +3339,6 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -2906,6 +3363,7 @@ golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2923,14 +3381,21 @@ golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193/go.mod h1:RpDiru2p0u2F0lLpEoqnP2+7xs0ifAuOcJ442g6GU2s= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2961,6 +3426,13 @@ golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7Lm golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -3012,7 +3484,6 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190620070143-6f217b454f45/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -3061,7 +3532,6 @@ golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -3072,6 +3542,7 @@ golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201013081832-0aaa2718063a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -3085,7 +3556,6 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210313202042-bd2e13477e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -3122,23 +3592,30 @@ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211031064116-611d5d643895/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211113001501-0c823b97ae02/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -3158,24 +3635,29 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220919170432-7a66f970e087/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -3188,10 +3670,12 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -3201,13 +3685,19 @@ golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -3238,7 +3728,6 @@ golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -3257,7 +3746,6 @@ golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -3326,12 +3814,14 @@ golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.11-0.20220513221640-090b14e8501f/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12-0.20220628192153-7743d1d949f1/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= @@ -3343,19 +3833,17 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= -gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= -gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -3418,6 +3906,16 @@ google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOI google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= +google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -3427,6 +3925,7 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -3462,7 +3961,6 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -3525,7 +4023,9 @@ google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= @@ -3557,11 +4057,87 @@ google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+S google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa h1:qQPhfbPO23fwm/9lQr91L1u62Zo6cm+zI+slZT+uf+o= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= +google.golang.org/genproto v0.0.0-20230202175211-008b39050e57/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -3575,10 +4151,13 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.2-0.20230208135220-49eaa78c6c9c/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= @@ -3592,6 +4171,7 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -3637,11 +4217,17 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ= gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= +gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -3652,6 +4238,7 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +honnef.co/go/tools v0.3.1/go.mod h1:vlRD9XErLMGT+mDuofSr0mMMquscM/1nQqtRSsh6m70= honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= honnef.co/go/tools v0.4.3 h1:o/n5/K5gXqk8Gozvs2cnL0F2S1/g1vcGCAx2vETjITw= honnef.co/go/tools v0.4.3/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= @@ -3736,6 +4323,7 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= +mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= mvdan.cc/gofumpt v0.4.0/go.mod h1:PljLOHDeZqgS8opHRKLzp2It2VBuSdteAgqUfzMTxlQ= mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E= mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= @@ -3745,6 +4333,7 @@ mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphD mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= +mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= mvdan.cc/unparam v0.0.0-20220706161116-678bad134442/go.mod h1:F/Cxw/6mVrNKqrR2YjFf5CaW0Bw4RL8RfbEf4GRggJk= mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQOxksVMGK7sml4nG57w= mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= @@ -3752,6 +4341,11 @@ nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0 nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= +pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= +pgregory.net/rapid v0.5.2/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v0.5.3/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -3770,6 +4364,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZa sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= sourcegraph.com/sqs/pbtypes v1.0.0/go.mod h1:3AciMUv4qUuRHRHhOG4TZOB+72GdPVz5k+c648qsFS4= diff --git a/proto/buf.gen.gogo.yaml b/proto/buf.gen.gogo.yaml new file mode 100644 index 000000000..9c8ba0a4b --- /dev/null +++ b/proto/buf.gen.gogo.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - name: gocosmos + out: .. + opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types + - name: grpc-gateway + out: .. + opt: logtostderr=true,allow_colon_final_segments=true diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 000000000..78c5a2713 --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,15 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 1935555c206d4afb9e94615dfd0fad31 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 34d970b699f84aa382f3c29773a60836 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 75b4300737fb4efca0831636be94e517 diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 000000000..e8b388892 --- /dev/null +++ b/proto/buf.yaml @@ -0,0 +1,23 @@ +# This module represents buf.build/comdex-official/comdex +version: v1 +name: buf.build/comdex-official/comdex +deps: + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis +breaking: + use: + - FILE +lint: + use: + - DEFAULT + - COMMENTS + - FILE_LOWER_SNAKE_CASE + except: + - UNARY_RPC + - COMMENT_FIELD + - SERVICE_SUFFIX + - PACKAGE_VERSION_SUFFIX + - RPC_REQUEST_STANDARD_NAME + ignore: + - tendermint diff --git a/proto/comdex/collector/v1beta1/tx.proto b/proto/comdex/collector/v1beta1/tx.proto index 4ca31cabb..9e9c04dec 100644 --- a/proto/comdex/collector/v1beta1/tx.proto +++ b/proto/comdex/collector/v1beta1/tx.proto @@ -1,12 +1,20 @@ syntax = "proto3"; package comdex.collector.v1beta1; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; option go_package = "github.com/comdex-official/comdex/x/collector/types"; // Msg defines the Msg service. service Msg { - + rpc Deposit(MsgDeposit) returns (MsgDepositResponse); } +message MsgDeposit { + string addr = 1; + cosmos.base.v1beta1.Coin amount = 2 [(gogoproto.nullable) = false]; + uint64 app_id = 3; +} +message MsgDepositResponse {} diff --git a/proto/comdex/liquidity/v1beta1/liquidity.proto b/proto/comdex/liquidity/v1beta1/liquidity.proto index 633d93bb2..55378e8d3 100644 --- a/proto/comdex/liquidity/v1beta1/liquidity.proto +++ b/proto/comdex/liquidity/v1beta1/liquidity.proto @@ -20,7 +20,7 @@ message Pair { uint64 last_order_id = 5; - string last_price = 6 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string last_price = 6 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec"]; uint64 current_batch_id = 7; @@ -51,9 +51,9 @@ message Pool { string creator = 10; - string min_price = 11 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string min_price = 11 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec"]; - string max_price = 12 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string max_price = 12 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec"]; @@ -141,12 +141,12 @@ message Order { cosmos.base.v1beta1.Coin received_coin = 8 [(gogoproto.nullable) = false]; // price specifies the price that an orderer is willing to swap - string price = 9 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string price = 9 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; - string amount = 10 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string amount = 10 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; string open_amount = 11 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; // batch_id specifies the pair's batch id when the request is stored uint64 batch_id = 12; diff --git a/proto/comdex/liquidity/v1beta1/params.proto b/proto/comdex/liquidity/v1beta1/params.proto index 31ff0dfbc..162fb4477 100644 --- a/proto/comdex/liquidity/v1beta1/params.proto +++ b/proto/comdex/liquidity/v1beta1/params.proto @@ -22,7 +22,7 @@ message GenericParams { string dust_collector_address = 4; string min_initial_pool_coin_supply = 5 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; repeated cosmos.base.v1beta1.Coin pair_creation_fee = 6 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; @@ -31,18 +31,18 @@ message GenericParams { [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; string min_initial_deposit_amount = 8 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; string max_price_limit_ratio = 9 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; google.protobuf.Duration max_order_lifespan = 10 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; string swap_fee_rate = 11 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; string withdraw_fee_rate = 12 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; uint64 deposit_extra_gas = 13 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Gas", (gogoproto.nullable) = false]; @@ -56,7 +56,7 @@ message GenericParams { string swap_fee_distr_denom = 16; string swap_fee_burn_rate = 17 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; uint64 app_id = 18; diff --git a/proto/comdex/liquidity/v1beta1/query.proto b/proto/comdex/liquidity/v1beta1/query.proto index c6e180a1c..98621c39c 100644 --- a/proto/comdex/liquidity/v1beta1/query.proto +++ b/proto/comdex/liquidity/v1beta1/query.proto @@ -214,13 +214,13 @@ message PoolResponse { string creator = 10; string pool_coin_supply = 11 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; - string min_price = 12 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string min_price = 12 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec"]; - string max_price = 13 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string max_price = 13 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec"]; - string price = 14 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string price = 14 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec"]; bool disabled = 15; @@ -345,23 +345,23 @@ message QueryOrderBooksResponse { message OrderBookPairResponse { uint64 pair_id = 1; string base_price = 2 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; repeated OrderBookResponse order_books = 3 [(gogoproto.nullable) = false]; } message OrderBookResponse { string price_unit = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; repeated OrderBookTickResponse sells = 2 [(gogoproto.nullable) = false]; repeated OrderBookTickResponse buys = 3 [(gogoproto.nullable) = false]; } message OrderBookTickResponse { - string price = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string price = 1 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; string user_order_amount = 2 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; string pool_order_amount = 3 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; } message TotalActiveAndQueuedPoolCoins { diff --git a/proto/comdex/liquidity/v1beta1/tx.proto b/proto/comdex/liquidity/v1beta1/tx.proto index 261c7bc2a..47edf14a8 100644 --- a/proto/comdex/liquidity/v1beta1/tx.proto +++ b/proto/comdex/liquidity/v1beta1/tx.proto @@ -107,13 +107,13 @@ message MsgCreateRangedPool { [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; string min_price = 5 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; string max_price = 6 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; string initial_price = 7 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; } // MsgCreateRangedPoolResponse defines the Msg/CreateRangedPool response type. @@ -172,10 +172,10 @@ message MsgLimitOrder { string demand_coin_denom = 5; // price specifies the order price - string price = 6 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string price = 6 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; // amount specifies the amount of base coin the orderer wants to buy or sell - string amount = 7 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string amount = 7 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; // order_lifespan specifies the order lifespan google.protobuf.Duration order_lifespan = 8 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; @@ -204,7 +204,7 @@ message MsgMarketOrder { string demand_coin_denom = 5; // amount specifies the amount of base coin the orderer wants to buy or sell - string amount = 6 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string amount = 6 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; // order_lifespan specifies the order lifespan google.protobuf.Duration order_lifespan = 7 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; @@ -227,27 +227,27 @@ message MsgMMOrder { // max_sell_price specifies the maximum sell price string max_sell_price = 4 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; // min_sell_price specifies the minimum sell price string min_sell_price = 5 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; // sell_amount specifies the total amount of base coin of sell orders string sell_amount = 6 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; // max_buy_price specifies the maximum buy price string max_buy_price = 7 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; // min_buy_price specifies the minimum buy price string min_buy_price = 8 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; // buy_amount specifies the total amount of base coin of buy orders string buy_amount = 9 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; // order_lifespan specifies the order lifespan google.protobuf.Duration order_lifespan = 10 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh index b6650e428..e689bba3c 100755 --- a/scripts/proto-gen.sh +++ b/scripts/proto-gen.sh @@ -1,30 +1,28 @@ #!/usr/bin/env bash -set -eo pipefail +# How to run manually: +# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" +# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh -protoc_gen_gocosmos() { - if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then - echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder." - return 1 - fi +set -e - go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest 2>/dev/null -} - -# protoc_gen_gocosmos - -proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +echo "Generating gogo proto code" +cd proto +proto_dirs=$(find ./comdex -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do - protoc \ - -I "proto" \ - -I "third_party/proto" \ - --gocosmos_out=plugins=interfacetype+grpc,\ -Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ - --grpc-gateway_out=logtostderr=true,allow_colon_final_segments=true:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - + for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do + # this regex checks if a proto file has its go_package set to cosmossdk.io/api/... + # gogo proto files SHOULD ONLY be generated if this is false + # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf + if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then + buf generate --template buf.gen.gogo.yaml $file + fi + done done +cd .. + # move proto files to the right places cp -r github.com/comdex-official/comdex/* ./ -rm -rf github.com \ No newline at end of file +rm -rf github.com +go mod tidy \ No newline at end of file diff --git a/testutil/keeper/auction.go b/testutil/keeper/auction.go index c72aa4f62..6a9cff2d5 100644 --- a/testutil/keeper/auction.go +++ b/testutil/keeper/auction.go @@ -13,9 +13,9 @@ package keeper // sdk "github.com/cosmos/cosmos-sdk/types" // typesparams "github.com/cosmos/cosmos-sdk/x/params/types" // "github.com/stretchr/testify/require" -// "github.com/tendermint/tendermint/libs/log" -// tmproto "github.com/tendermint/tendermint/proto/tendermint/types" -// tmdb "github.com/tendermint/tm-db" +// "github.com/cometbft/cometbft/libs/log" +// tmproto "github.com/cometbft/cometbft/proto/tendermint/types" +// tmdb "github.com/cometbft/cometbft-db" //) // //func AuctionKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { diff --git a/testutil/keeper/auctionsV2.go b/testutil/keeper/auctionsV2.go index f72ebb663..0c79fe841 100644 --- a/testutil/keeper/auctionsV2.go +++ b/testutil/keeper/auctionsV2.go @@ -12,7 +12,7 @@ package keeper // sdk "github.com/cosmos/cosmos-sdk/types" // typesparams "github.com/cosmos/cosmos-sdk/x/params/types" // "github.com/stretchr/testify/require" -// "github.com/tendermint/tendermint/libs/log" +// "github.com/cometbft/cometbft/libs/log" // tmproto "github.com/tendermint/tendermint/proto/tendermint/types" // tmdb "github.com/tendermint/tm-db" //) diff --git a/testutil/keeper/collector.go b/testutil/keeper/collector.go index 9589937c2..a747fc400 100644 --- a/testutil/keeper/collector.go +++ b/testutil/keeper/collector.go @@ -13,9 +13,9 @@ package keeper // sdk "github.com/cosmos/cosmos-sdk/types" // typesparams "github.com/cosmos/cosmos-sdk/x/params/types" // "github.com/stretchr/testify/require" -// "github.com/tendermint/tendermint/libs/log" -// tmproto "github.com/tendermint/tendermint/proto/tendermint/types" -// tmdb "github.com/tendermint/tm-db" +// "github.com/cometbft/cometbft/libs/log" +// tmproto "github.com/cometbft/cometbft/proto/tendermint/types" +// tmdb "github.com/cometbft/cometbft-db" //) // //func CollectorKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { diff --git a/testutil/keeper/esm.go b/testutil/keeper/esm.go index 6ee79b6a6..2811be96c 100644 --- a/testutil/keeper/esm.go +++ b/testutil/keeper/esm.go @@ -12,9 +12,9 @@ package keeper // sdk "github.com/cosmos/cosmos-sdk/types" // typesparams "github.com/cosmos/cosmos-sdk/x/params/types" // "github.com/stretchr/testify/require" -// "github.com/tendermint/tendermint/libs/log" -// tmproto "github.com/tendermint/tendermint/proto/tendermint/types" -// tmdb "github.com/tendermint/tm-db" +// "github.com/cometbft/cometbft/libs/log" +// tmproto "github.com/cometbft/cometbft/proto/tendermint/types" +// tmdb "github.com/cometbft/cometbft-db" // ) // func EsmKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { diff --git a/testutil/keeper/liquidationsV2.go b/testutil/keeper/liquidationsV2.go index d53ee8295..10a0a0be9 100644 --- a/testutil/keeper/liquidationsV2.go +++ b/testutil/keeper/liquidationsV2.go @@ -12,7 +12,7 @@ package keeper // sdk "github.com/cosmos/cosmos-sdk/types" // typesparams "github.com/cosmos/cosmos-sdk/x/params/types" // "github.com/stretchr/testify/require" -// "github.com/tendermint/tendermint/libs/log" +// "github.com/cometbft/cometbft/libs/log" // tmproto "github.com/tendermint/tendermint/proto/tendermint/types" // tmdb "github.com/tendermint/tm-db" //) diff --git a/testutil/keeper/rewards.go b/testutil/keeper/rewards.go index a5d1078e0..fc3981541 100644 --- a/testutil/keeper/rewards.go +++ b/testutil/keeper/rewards.go @@ -13,9 +13,9 @@ package keeper // sdk "github.com/cosmos/cosmos-sdk/types" // typesparams "github.com/cosmos/cosmos-sdk/x/params/types" // "github.com/stretchr/testify/require" -// "github.com/tendermint/tendermint/libs/log" -// tmproto "github.com/tendermint/tendermint/proto/tendermint/types" -// tmdb "github.com/tendermint/tm-db" +// "github.com/cometbft/cometbft/libs/log" +// tmproto "github.com/cometbft/cometbft/proto/tendermint/types" +// tmdb "github.com/cometbft/cometbft-db" //) // //func RewardsKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { diff --git a/testutil/keeper/tokenmint.go b/testutil/keeper/tokenmint.go index 0d81be91a..77fe7eb9e 100644 --- a/testutil/keeper/tokenmint.go +++ b/testutil/keeper/tokenmint.go @@ -13,9 +13,9 @@ package keeper // sdk "github.com/cosmos/cosmos-sdk/types" // typesparams "github.com/cosmos/cosmos-sdk/x/params/types" // "github.com/stretchr/testify/require" -// "github.com/tendermint/tendermint/libs/log" -// tmproto "github.com/tendermint/tendermint/proto/tendermint/types" -// tmdb "github.com/tendermint/tm-db" +// "github.com/cometbft/cometbft/libs/log" +// tmproto "github.com/cometbft/cometbft/proto/tendermint/types" +// tmdb "github.com/cometbft/cometbft-db" //) // //func TokenmintKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { diff --git a/testutil/network/network.go b/testutil/network/network.go index 939fde5d2..cc2897844 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -5,17 +5,17 @@ import ( "testing" "time" + tmdb "github.com/cometbft/cometbft-db" + tmrand "github.com/cometbft/cometbft/libs/rand" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" - storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil/network" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - tmrand "github.com/tendermint/tendermint/libs/rand" - tmdb "github.com/tendermint/tm-db" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" comdex "github.com/comdex-official/comdex/app" ) @@ -23,6 +23,7 @@ import ( type ( Network = network.Network Config = network.Config + Validator = network.Validator ) // New creates instance with fully configured cosmos network. @@ -37,7 +38,7 @@ func New(t *testing.T, configs ...network.Config) *network.Network { } else { cfg = configs[0] } - net := network.New(t, cfg) + net, _ := network.New(t,t.TempDir(), cfg) t.Cleanup(net.Cleanup) return net } @@ -52,15 +53,15 @@ func DefaultConfig() network.Config { LegacyAmino: encoding.Amino, InterfaceRegistry: encoding.InterfaceRegistry, AccountRetriever: authtypes.AccountRetriever{}, - AppConstructor: func(val network.Validator) servertypes.Application { + AppConstructor: func(val network.ValidatorI) servertypes.Application { return comdex.New( - val.Ctx.Logger, tmdb.NewMemDB(), nil, true, map[int64]bool{}, val.Ctx.Config.RootDir, 0, + val.GetCtx().Logger, tmdb.NewMemDB(), nil, true, map[int64]bool{}, val.GetCtx().Config.RootDir, 0, encoding, - simapp.EmptyAppOptions{}, + simtestutil.EmptyAppOptions{}, comdex.GetWasmEnabledProposals(), comdex.EmptyWasmOpts, - baseapp.SetPruning(storetypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), - baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), + baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), + baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices), ) }, GenesisState: comdex.ModuleBasics.DefaultGenesis(encoding.Marshaler), @@ -72,7 +73,7 @@ func DefaultConfig() network.Config { AccountTokens: sdk.TokensFromConsensusPower(1000, sdk.OneInt()), StakingTokens: sdk.TokensFromConsensusPower(500, sdk.OneInt()), BondedTokens: sdk.TokensFromConsensusPower(100, sdk.OneInt()), - PruningStrategy: storetypes.PruningOptionNothing, + PruningStrategy: pruningtypes.PruningOptionNothing, CleanupDir: true, SigningAlgo: string(hd.Secp256k1Type), KeyringOptions: []keyring.Option{}, diff --git a/testutil/simapp/simapp.go b/testutil/simapp/simapp.go index 72607d1db..c96425a12 100644 --- a/testutil/simapp/simapp.go +++ b/testutil/simapp/simapp.go @@ -3,12 +3,12 @@ package simapp import ( "time" - "github.com/cosmos/cosmos-sdk/simapp" - abcitypes "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmprototypes "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" - tmdb "github.com/tendermint/tm-db" + tmdb "github.com/cometbft/cometbft-db" + abcitypes "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmprototypes "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" comdex "github.com/comdex-official/comdex/app" ) @@ -22,7 +22,7 @@ func New(dir string) *comdex.App { ) a := comdex.New(logger, db, nil, true, map[int64]bool{}, dir, 0, encoding, - simapp.EmptyAppOptions{}, comdex.GetWasmEnabledProposals(), comdex.EmptyWasmOpts) + simtestutil.EmptyAppOptions{}, comdex.GetWasmEnabledProposals(), comdex.EmptyWasmOpts) // InitChain updates deliverState which is required when app.NewContext is called a.InitChain(abcitypes.RequestInitChain{ ConsensusParams: defaultConsensusParams, @@ -31,8 +31,8 @@ func New(dir string) *comdex.App { return a } -var defaultConsensusParams = &abcitypes.ConsensusParams{ - Block: &abcitypes.BlockParams{ +var defaultConsensusParams = &tmprototypes.ConsensusParams{ + Block: &tmprototypes.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, diff --git a/third_party/proto/confio/proofs.proto b/third_party/proto/confio/proofs.proto deleted file mode 100644 index da43503ec..000000000 --- a/third_party/proto/confio/proofs.proto +++ /dev/null @@ -1,234 +0,0 @@ -syntax = "proto3"; - -package ics23; -option go_package = "github.com/confio/ics23/go"; - -enum HashOp { - // NO_HASH is the default if no data passed. Note this is an illegal argument some places. - NO_HASH = 0; - SHA256 = 1; - SHA512 = 2; - KECCAK = 3; - RIPEMD160 = 4; - BITCOIN = 5; // ripemd160(sha256(x)) -} - -/** -LengthOp defines how to process the key and value of the LeafOp -to include length information. After encoding the length with the given -algorithm, the length will be prepended to the key and value bytes. -(Each one with it's own encoded length) -*/ -enum LengthOp { - // NO_PREFIX don't include any length info - NO_PREFIX = 0; - // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VAR_PROTO = 1; - // VAR_RLP uses rlp int encoding of the length - VAR_RLP = 2; - // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - FIXED32_BIG = 3; - // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - FIXED32_LITTLE = 4; - // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - FIXED64_BIG = 5; - // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - FIXED64_LITTLE = 6; - // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - REQUIRE_32_BYTES = 7; - // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) - REQUIRE_64_BYTES = 8; -} - -/** -ExistenceProof takes a key and a value and a set of steps to perform on it. -The result of peforming all these steps will provide a "root hash", which can -be compared to the value in a header. - -Since it is computationally infeasible to produce a hash collission for any of the used -cryptographic hash functions, if someone can provide a series of operations to transform -a given key and value into a root hash that matches some trusted root, these key and values -must be in the referenced merkle tree. - -The only possible issue is maliablity in LeafOp, such as providing extra prefix data, -which should be controlled by a spec. Eg. with lengthOp as NONE, - prefix = FOO, key = BAR, value = CHOICE -and - prefix = F, key = OOBAR, value = CHOICE -would produce the same value. - -With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field -in the ProofSpec is valuable to prevent this mutability. And why all trees should -length-prefix the data before hashing it. -*/ -message ExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - repeated InnerOp path = 4; -} - -/* -NonExistenceProof takes a proof of two neighbors, one left of the desired key, -one right of the desired key. If both proofs are valid AND they are neighbors, -then there is no valid proof for the given key. -*/ -message NonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - ExistenceProof left = 2; - ExistenceProof right = 3; -} - -/* -CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages -*/ -message CommitmentProof { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - BatchProof batch = 3; - CompressedBatchProof compressed = 4; - } -} - -/** -LeafOp represents the raw key-value data we wish to prove, and -must be flexible to represent the internal transformation from -the original key-value pairs into the basis hash, for many existing -merkle trees. - -key and value are passed in. So that the signature of this operation is: - leafOp(key, value) -> output - -To process this, first prehash the keys and values if needed (ANY means no hash in this case): - hkey = prehashKey(key) - hvalue = prehashValue(value) - -Then combine the bytes, and hash it - output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) -*/ -message LeafOp { - HashOp hash = 1; - HashOp prehash_key = 2; - HashOp prehash_value = 3; - LengthOp length = 4; - // prefix is a fixed bytes that may optionally be included at the beginning to differentiate - // a leaf node from an inner node. - bytes prefix = 5; -} - -/** -InnerOp represents a merkle-proof step that is not a leaf. -It represents concatenating two children and hashing them to provide the next result. - -The result of the previous step is passed in, so the signature of this op is: - innerOp(child) -> output - -The result of applying InnerOp should be: - output = op.hash(op.prefix || child || op.suffix) - - where the || operator is concatenation of binary data, -and child is the result of hashing all the tree below this step. - -Any special data, like prepending child with the length, or prepending the entire operation with -some value to differentiate from leaf nodes, should be included in prefix and suffix. -If either of prefix or suffix is empty, we just treat it as an empty string -*/ -message InnerOp { - HashOp hash = 1; - bytes prefix = 2; - bytes suffix = 3; -} - - -/** -ProofSpec defines what the expected parameters are for a given proof type. -This can be stored in the client and used to validate any incoming proofs. - - verify(ProofSpec, Proof) -> Proof | Error - -As demonstrated in tests, if we don't fix the algorithm used to calculate the -LeafHash for a given tree, there are many possible key-value pairs that can -generate a given hash (by interpretting the preimage differently). -We need this for proper security, requires client knows a priori what -tree format server uses. But not in code, rather a configuration object. -*/ -message ProofSpec { - // any field in the ExistenceProof must be the same as in this spec. - // except Prefix, which is just the first bytes of prefix (spec can be longer) - LeafOp leaf_spec = 1; - InnerSpec inner_spec = 2; - // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) - int32 max_depth = 3; - // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) - int32 min_depth = 4; -} - -/* -InnerSpec contains all store-specific structure info to determine if two proofs from a -given store are neighbors. - -This enables: - - isLeftMost(spec: InnerSpec, op: InnerOp) - isRightMost(spec: InnerSpec, op: InnerOp) - isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) -*/ -message InnerSpec { - // Child order is the ordering of the children node, must count from 0 - // iavl tree is [0, 1] (left then right) - // merk is [0, 2, 1] (left, right, here) - repeated int32 child_order = 1; - int32 child_size = 2; - int32 min_prefix_length = 3; - int32 max_prefix_length = 4; - // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) - bytes empty_child = 5; - // hash is the algorithm that must be used for each InnerOp - HashOp hash = 6; -} - -/* -BatchProof is a group of multiple proof types than can be compressed -*/ -message BatchProof { - repeated BatchEntry entries = 1; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message BatchEntry { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - } -} - - -/****** all items here are compressed forms *******/ - -message CompressedBatchProof { - repeated CompressedBatchEntry entries = 1; - repeated InnerOp lookup_inners = 2; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message CompressedBatchEntry { - oneof proof { - CompressedExistenceProof exist = 1; - CompressedNonExistenceProof nonexist = 2; - } -} - -message CompressedExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - // these are indexes into the lookup_inners table in CompressedBatchProof - repeated int32 path = 4; -} - -message CompressedNonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - CompressedExistenceProof left = 2; - CompressedExistenceProof right = 3; -} diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto deleted file mode 100644 index 167b17075..000000000 --- a/third_party/proto/cosmos_proto/cosmos.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos_proto; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/regen-network/cosmos-proto"; - -extend google.protobuf.MessageOptions { - string interface_type = 93001; - - string implements_interface = 93002; -} - -extend google.protobuf.FieldOptions { - string accepts_interface = 93001; -} diff --git a/third_party/proto/gogoproto/gogo.proto b/third_party/proto/gogoproto/gogo.proto deleted file mode 100644 index 49e78f99f..000000000 --- a/third_party/proto/gogoproto/gogo.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "GoGoProtos"; -option go_package = "github.com/gogo/protobuf/gogoproto"; - -extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; -} - -extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; - - optional bool goproto_sizecache_all = 63034; - optional bool goproto_unkeyed_all = 63035; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; - - optional bool goproto_sizecache = 64034; - optional bool goproto_unkeyed = 64035; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; - optional bool wktpointer = 65012; - - optional string castrepeated = 65013; -} diff --git a/third_party/proto/google/api/annotations.proto b/third_party/proto/google/api/annotations.proto deleted file mode 100644 index 85c361b47..000000000 --- a/third_party/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/third_party/proto/google/api/http.proto b/third_party/proto/google/api/http.proto deleted file mode 100644 index 2bd3a19bf..000000000 --- a/third_party/proto/google/api/http.proto +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parmeters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST API methods. The mapping specifies how different portions of the RPC -// request message are mapped to URL path, URL query parameters, and -// HTTP request body. The mapping is typically specified as an -// `google.api.http` annotation on the RPC method, -// see "google/api/annotations.proto" for details. -// -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// SubMessage sub = 2; // `sub.subfield` is url-mapped -// } -// message Message { -// string text = 1; // content of the resource -// } -// -// The same http annotation can alternatively be expressed inside the -// `GRPC API Configuration` YAML file. -// -// http: -// rules: -// - selector: .Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// int64 revision = 2; // becomes a parameter -// SubMessage sub = 3; // `sub.subfield` becomes a parameter -// } -// -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` -// -// Note that fields which are mapped to HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. -// -// For HTTP method kinds which allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice of -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// -// This enables the following two alternative HTTP JSON to RPC -// mappings: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` -// -// # Rules for HTTP mapping -// -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: -// -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it indicates there is no HTTP request body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single path segment. The syntax `**` matches zero -// or more path segments, which must be the last part of the path except the -// `Verb`. The syntax `LITERAL` matches literal text in the path. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path, all characters -// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the -// Discovery Document as `{var}`. -// -// If a variable contains one or more path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path, all -// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables -// show up in the Discovery Document as `{+var}`. -// -// NOTE: While the single segment variable matches the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 -// Simple String Expansion, the multi segment variable **does not** match -// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. -// -// NOTE: the field paths in variables and in the `body` must not refer to -// repeated fields or map fields. -message HttpRule { - // Selects methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Used for listing and getting information about resources. - string get = 2; - - // Used for updating a resource. - string put = 3; - - // Used for creating a resource. - string post = 4; - - // Used for deleting a resource. - string delete = 5; - - // Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field and must be - // present at the top-level of request message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // body of response. Other response fields are ignored. When - // not set, the response message will be used as HTTP body of response. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/third_party/proto/google/api/httpbody.proto b/third_party/proto/google/api/httpbody.proto deleted file mode 100644 index 4428515c1..000000000 --- a/third_party/proto/google/api/httpbody.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; -option java_multiple_files = true; -option java_outer_classname = "HttpBodyProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Message that represents an arbitrary HTTP body. It should only be used for -// payload formats that can't be represented as JSON, such as raw binary or -// an HTML page. -// -// -// This message can be used both in streaming and non-streaming API methods in -// the request as well as the response. -// -// It can be used as a top-level request field, which is convenient if one -// wants to extract parameters from either the URL or HTTP template into the -// request fields and also want access to the raw HTTP body. -// -// Example: -// -// message GetResourceRequest { -// // A unique request id. -// string request_id = 1; -// -// // The raw HTTP body is bound to this field. -// google.api.HttpBody http_body = 2; -// } -// -// service ResourceService { -// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); -// rpc UpdateResource(google.api.HttpBody) returns -// (google.protobuf.Empty); -// } -// -// Example with streaming methods: -// -// service CaldavService { -// rpc GetCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// rpc UpdateCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// } -// -// Use of this type only changes how the request and response bodies are -// handled, all other features will continue to work unchanged. -message HttpBody { - // The HTTP Content-Type header value specifying the content type of the body. - string content_type = 1; - - // The HTTP request/response body as raw binary. - bytes data = 2; - - // Application specific response metadata. Must be set in the first response - // for streaming APIs. - repeated google.protobuf.Any extensions = 3; -} \ No newline at end of file diff --git a/third_party/proto/google/protobuf/any.proto b/third_party/proto/google/protobuf/any.proto deleted file mode 100644 index 58b511583..000000000 --- a/third_party/proto/google/protobuf/any.proto +++ /dev/null @@ -1,164 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -import "gogoproto/gogo.proto"; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "AnyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -message Any { - // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. This string must contain at least - // one "/" character. The last segment of the URL's path must represent - // the fully qualified name of the type (as in - // `path/google.protobuf.Duration`). The name should be in a canonical form - // (e.g., leading "." is not accepted). - // - // In practice, teams usually precompile into the binary all types that they - // expect it to use in the context of Any. However, for URLs which use the - // scheme `http`, `https`, or no scheme, one can optionally set up a type - // server that maps type URLs to message definitions as follows: - // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Note: this functionality is not currently available in the official - // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - string type_url = 1; - - // Must be a valid serialized protocol buffer of the above specified type. - bytes value = 2; - - option (gogoproto.typedecl) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.gostring) = false; - option (gogoproto.stringer) = false; -} - -option (gogoproto.goproto_registration) = false; diff --git a/third_party/proto/protoc-gen-openapiv2/options/BUILD.bazel b/third_party/proto/protoc-gen-openapiv2/options/BUILD.bazel deleted file mode 100644 index 363699941..000000000 --- a/third_party/proto/protoc-gen-openapiv2/options/BUILD.bazel +++ /dev/null @@ -1,38 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") -load("@io_bazel_rules_go//go:def.bzl", "go_library") -load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") - -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "options_proto_files", - srcs = [ - "annotations.proto", - "openapiv2.proto", - ], -) - -go_library( - name = "go_default_library", - embed = [":options_go_proto"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options", -) - -proto_library( - name = "options_proto", - srcs = [ - "annotations.proto", - "openapiv2.proto", - ], - deps = [ - "@com_google_protobuf//:descriptor_proto", - "@com_google_protobuf//:struct_proto", - ], -) - -go_proto_library( - name = "options_go_proto", - compilers = ["//:go_apiv2"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options", - proto = ":options_proto", -) diff --git a/third_party/proto/protoc-gen-openapiv2/options/annotations.pb.go b/third_party/proto/protoc-gen-openapiv2/options/annotations.pb.go deleted file mode 100644 index dbe535168..000000000 --- a/third_party/proto/protoc-gen-openapiv2/options/annotations.pb.go +++ /dev/null @@ -1,241 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.0 -// source: protoc-gen-openapiv2/options/annotations.proto - -package options - -import ( - proto "github.com/golang/protobuf/proto" - descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*Swagger)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger", - Tag: "bytes,1042,opt,name=openapiv2_swagger", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, - { - ExtendedType: (*descriptor.MethodOptions)(nil), - ExtensionType: (*Operation)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation", - Tag: "bytes,1042,opt,name=openapiv2_operation", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, - { - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*Schema)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema", - Tag: "bytes,1042,opt,name=openapiv2_schema", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, - { - ExtendedType: (*descriptor.ServiceOptions)(nil), - ExtensionType: (*Tag)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag", - Tag: "bytes,1042,opt,name=openapiv2_tag", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, - { - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*JSONSchema)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", - Tag: "bytes,1042,opt,name=openapiv2_field", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, -} - -// Extension fields to descriptor.FileOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042; - E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0] -) - -// Extension fields to descriptor.MethodOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042; - E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1] -) - -// Extension fields to descriptor.MessageOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042; - E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2] -) - -// Extension fields to descriptor.ServiceOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042; - E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3] -) - -// Extension fields to descriptor.FieldOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042; - E_Openapiv2Field = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[4] -) - -var File_protoc_gen_openapiv2_options_annotations_proto protoreflect.FileDescriptor - -var file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x29, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x7e, 0x0a, 0x11, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, - 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x3a, 0x86, 0x01, 0x0a, 0x13, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x7e, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x75, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x54, 0x61, 0x67, 0x3a, 0x7e, 0x0a, 0x0f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x48, 0x5a, 0x46, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, - 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_protoc_gen_openapiv2_options_annotations_proto_goTypes = []interface{}{ - (*descriptor.FileOptions)(nil), // 0: google.protobuf.FileOptions - (*descriptor.MethodOptions)(nil), // 1: google.protobuf.MethodOptions - (*descriptor.MessageOptions)(nil), // 2: google.protobuf.MessageOptions - (*descriptor.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions - (*descriptor.FieldOptions)(nil), // 4: google.protobuf.FieldOptions - (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger - (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation - (*Schema)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Schema - (*Tag)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Tag - (*JSONSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema -} -var file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = []int32{ - 0, // 0: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:extendee -> google.protobuf.FileOptions - 1, // 1: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:extendee -> google.protobuf.MethodOptions - 2, // 2: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:extendee -> google.protobuf.MessageOptions - 3, // 3: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:extendee -> google.protobuf.ServiceOptions - 4, // 4: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:extendee -> google.protobuf.FieldOptions - 5, // 5: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger - 6, // 6: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation - 7, // 7: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema - 8, // 8: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag - 9, // 9: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 5, // [5:10] is the sub-list for extension type_name - 0, // [0:5] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_protoc_gen_openapiv2_options_annotations_proto_init() } -func file_protoc_gen_openapiv2_options_annotations_proto_init() { - if File_protoc_gen_openapiv2_options_annotations_proto != nil { - return - } - file_protoc_gen_openapiv2_options_openapiv2_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protoc_gen_openapiv2_options_annotations_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 5, - NumServices: 0, - }, - GoTypes: file_protoc_gen_openapiv2_options_annotations_proto_goTypes, - DependencyIndexes: file_protoc_gen_openapiv2_options_annotations_proto_depIdxs, - ExtensionInfos: file_protoc_gen_openapiv2_options_annotations_proto_extTypes, - }.Build() - File_protoc_gen_openapiv2_options_annotations_proto = out.File - file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = nil - file_protoc_gen_openapiv2_options_annotations_proto_goTypes = nil - file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = nil -} diff --git a/third_party/proto/protoc-gen-openapiv2/options/annotations.proto b/third_party/proto/protoc-gen-openapiv2/options/annotations.proto deleted file mode 100644 index 1c189e206..000000000 --- a/third_party/proto/protoc-gen-openapiv2/options/annotations.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package grpc.gateway.protoc_gen_openapiv2.options; - -option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; - -import "google/protobuf/descriptor.proto"; -import "protoc-gen-openapiv2/options/openapiv2.proto"; - -extend google.protobuf.FileOptions { - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - Swagger openapiv2_swagger = 1042; -} -extend google.protobuf.MethodOptions { - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - Operation openapiv2_operation = 1042; -} -extend google.protobuf.MessageOptions { - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - Schema openapiv2_schema = 1042; -} -extend google.protobuf.ServiceOptions { - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - Tag openapiv2_tag = 1042; -} -extend google.protobuf.FieldOptions { - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - JSONSchema openapiv2_field = 1042; -} diff --git a/third_party/proto/protoc-gen-openapiv2/options/openapiv2.pb.go b/third_party/proto/protoc-gen-openapiv2/options/openapiv2.pb.go deleted file mode 100644 index 69ca57764..000000000 --- a/third_party/proto/protoc-gen-openapiv2/options/openapiv2.pb.go +++ /dev/null @@ -1,2780 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.0 -// source: protoc-gen-openapiv2/options/openapiv2.proto - -package options - -import ( - proto "github.com/golang/protobuf/proto" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Scheme describes the schemes supported by the OpenAPI Swagger -// and Operation objects. -type Scheme int32 - -const ( - Scheme_UNKNOWN Scheme = 0 - Scheme_HTTP Scheme = 1 - Scheme_HTTPS Scheme = 2 - Scheme_WS Scheme = 3 - Scheme_WSS Scheme = 4 -) - -// Enum value maps for Scheme. -var ( - Scheme_name = map[int32]string{ - 0: "UNKNOWN", - 1: "HTTP", - 2: "HTTPS", - 3: "WS", - 4: "WSS", - } - Scheme_value = map[string]int32{ - "UNKNOWN": 0, - "HTTP": 1, - "HTTPS": 2, - "WS": 3, - "WSS": 4, - } -) - -func (x Scheme) Enum() *Scheme { - p := new(Scheme) - *p = x - return p -} - -func (x Scheme) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Scheme) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0].Descriptor() -} - -func (Scheme) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0] -} - -func (x Scheme) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Scheme.Descriptor instead. -func (Scheme) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} -} - -type JSONSchema_JSONSchemaSimpleTypes int32 - -const ( - JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0 - JSONSchema_ARRAY JSONSchema_JSONSchemaSimpleTypes = 1 - JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2 - JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3 - JSONSchema_NULL JSONSchema_JSONSchemaSimpleTypes = 4 - JSONSchema_NUMBER JSONSchema_JSONSchemaSimpleTypes = 5 - JSONSchema_OBJECT JSONSchema_JSONSchemaSimpleTypes = 6 - JSONSchema_STRING JSONSchema_JSONSchemaSimpleTypes = 7 -) - -// Enum value maps for JSONSchema_JSONSchemaSimpleTypes. -var ( - JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ARRAY", - 2: "BOOLEAN", - 3: "INTEGER", - 4: "NULL", - 5: "NUMBER", - 6: "OBJECT", - 7: "STRING", - } - JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{ - "UNKNOWN": 0, - "ARRAY": 1, - "BOOLEAN": 2, - "INTEGER": 3, - "NULL": 4, - "NUMBER": 5, - "OBJECT": 6, - "STRING": 7, - } -) - -func (x JSONSchema_JSONSchemaSimpleTypes) Enum() *JSONSchema_JSONSchemaSimpleTypes { - p := new(JSONSchema_JSONSchemaSimpleTypes) - *p = x - return p -} - -func (x JSONSchema_JSONSchemaSimpleTypes) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor() -} - -func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1] -} - -func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use JSONSchema_JSONSchemaSimpleTypes.Descriptor instead. -func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9, 0} -} - -// The type of the security scheme. Valid values are "basic", -// "apiKey" or "oauth2". -type SecurityScheme_Type int32 - -const ( - SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0 - SecurityScheme_TYPE_BASIC SecurityScheme_Type = 1 - SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2 - SecurityScheme_TYPE_OAUTH2 SecurityScheme_Type = 3 -) - -// Enum value maps for SecurityScheme_Type. -var ( - SecurityScheme_Type_name = map[int32]string{ - 0: "TYPE_INVALID", - 1: "TYPE_BASIC", - 2: "TYPE_API_KEY", - 3: "TYPE_OAUTH2", - } - SecurityScheme_Type_value = map[string]int32{ - "TYPE_INVALID": 0, - "TYPE_BASIC": 1, - "TYPE_API_KEY": 2, - "TYPE_OAUTH2": 3, - } -) - -func (x SecurityScheme_Type) Enum() *SecurityScheme_Type { - p := new(SecurityScheme_Type) - *p = x - return p -} - -func (x SecurityScheme_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor() -} - -func (SecurityScheme_Type) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2] -} - -func (x SecurityScheme_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecurityScheme_Type.Descriptor instead. -func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 0} -} - -// The location of the API key. Valid values are "query" or "header". -type SecurityScheme_In int32 - -const ( - SecurityScheme_IN_INVALID SecurityScheme_In = 0 - SecurityScheme_IN_QUERY SecurityScheme_In = 1 - SecurityScheme_IN_HEADER SecurityScheme_In = 2 -) - -// Enum value maps for SecurityScheme_In. -var ( - SecurityScheme_In_name = map[int32]string{ - 0: "IN_INVALID", - 1: "IN_QUERY", - 2: "IN_HEADER", - } - SecurityScheme_In_value = map[string]int32{ - "IN_INVALID": 0, - "IN_QUERY": 1, - "IN_HEADER": 2, - } -) - -func (x SecurityScheme_In) Enum() *SecurityScheme_In { - p := new(SecurityScheme_In) - *p = x - return p -} - -func (x SecurityScheme_In) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor() -} - -func (SecurityScheme_In) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3] -} - -func (x SecurityScheme_In) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecurityScheme_In.Descriptor instead. -func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 1} -} - -// The flow used by the OAuth2 security scheme. Valid values are -// "implicit", "password", "application" or "accessCode". -type SecurityScheme_Flow int32 - -const ( - SecurityScheme_FLOW_INVALID SecurityScheme_Flow = 0 - SecurityScheme_FLOW_IMPLICIT SecurityScheme_Flow = 1 - SecurityScheme_FLOW_PASSWORD SecurityScheme_Flow = 2 - SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3 - SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4 -) - -// Enum value maps for SecurityScheme_Flow. -var ( - SecurityScheme_Flow_name = map[int32]string{ - 0: "FLOW_INVALID", - 1: "FLOW_IMPLICIT", - 2: "FLOW_PASSWORD", - 3: "FLOW_APPLICATION", - 4: "FLOW_ACCESS_CODE", - } - SecurityScheme_Flow_value = map[string]int32{ - "FLOW_INVALID": 0, - "FLOW_IMPLICIT": 1, - "FLOW_PASSWORD": 2, - "FLOW_APPLICATION": 3, - "FLOW_ACCESS_CODE": 4, - } -) - -func (x SecurityScheme_Flow) Enum() *SecurityScheme_Flow { - p := new(SecurityScheme_Flow) - *p = x - return p -} - -func (x SecurityScheme_Flow) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor() -} - -func (SecurityScheme_Flow) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4] -} - -func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecurityScheme_Flow.Descriptor instead. -func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 2} -} - -// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// title: "Echo API"; -// version: "1.0"; -// description: "; -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// }; -// schemes: HTTPS; -// consumes: "application/json"; -// produces: "application/json"; -// }; -type Swagger struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the OpenAPI Specification version being used. It can be - // used by the OpenAPI UI and other clients to interpret the API listing. The - // value MUST be "2.0". - Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"` - // Provides metadata about the API. The metadata can be used by the - // clients if needed. - Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` - // The host (name or ip) serving the API. This MUST be the host only and does - // not include the scheme nor sub-paths. It MAY include a port. If the host is - // not included, the host serving the documentation is to be used (including - // the port). The host does not support path templating. - Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` - // The base path on which the API is served, which is relative to the host. If - // it is not included, the API is served directly under the host. The value - // MUST start with a leading slash (/). The basePath does not support path - // templating. - // Note that using `base_path` does not change the endpoint paths that are - // generated in the resulting OpenAPI file. If you wish to use `base_path` - // with relatively generated OpenAPI paths, the `base_path` prefix must be - // manually removed from your `google.api.http` paths and your code changed to - // serve the API from the `base_path`. - BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` - // The transfer protocol of the API. Values MUST be from the list: "http", - // "https", "ws", "wss". If the schemes is not included, the default scheme to - // be used is the one used to access the OpenAPI definition itself. - Schemes []Scheme `protobuf:"varint,5,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` - // A list of MIME types the APIs can consume. This is global to all APIs but - // can be overridden on specific API calls. Value MUST be as described under - // Mime Types. - Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` - // A list of MIME types the APIs can produce. This is global to all APIs but - // can be overridden on specific API calls. Value MUST be as described under - // Mime Types. - Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` - // An object to hold responses that can be used across operations. This - // property does not define global responses for all operations. - Responses map[string]*Response `protobuf:"bytes,10,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Security scheme definitions that can be used across the specification. - SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` - // A declaration of which security schemes are applied for the API as a whole. - // The list of values describes alternative security schemes that can be used - // (that is, there is a logical OR between the security requirements). - // Individual operations can override this definition. - Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` - // Additional external documentation. - ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - Extensions map[string]*_struct.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Swagger) Reset() { - *x = Swagger{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Swagger) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Swagger) ProtoMessage() {} - -func (x *Swagger) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Swagger.ProtoReflect.Descriptor instead. -func (*Swagger) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} -} - -func (x *Swagger) GetSwagger() string { - if x != nil { - return x.Swagger - } - return "" -} - -func (x *Swagger) GetInfo() *Info { - if x != nil { - return x.Info - } - return nil -} - -func (x *Swagger) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *Swagger) GetBasePath() string { - if x != nil { - return x.BasePath - } - return "" -} - -func (x *Swagger) GetSchemes() []Scheme { - if x != nil { - return x.Schemes - } - return nil -} - -func (x *Swagger) GetConsumes() []string { - if x != nil { - return x.Consumes - } - return nil -} - -func (x *Swagger) GetProduces() []string { - if x != nil { - return x.Produces - } - return nil -} - -func (x *Swagger) GetResponses() map[string]*Response { - if x != nil { - return x.Responses - } - return nil -} - -func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions { - if x != nil { - return x.SecurityDefinitions - } - return nil -} - -func (x *Swagger) GetSecurity() []*SecurityRequirement { - if x != nil { - return x.Security - } - return nil -} - -func (x *Swagger) GetExternalDocs() *ExternalDocumentation { - if x != nil { - return x.ExternalDocs - } - return nil -} - -func (x *Swagger) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `Operation` is a representation of OpenAPI v2 specification's Operation object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject -// -// Example: -// -// service EchoService { -// rpc Echo(SimpleMessage) returns (SimpleMessage) { -// option (google.api.http) = { -// get: "/v1/example/echo/{id}" -// }; -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { -// summary: "Get a message."; -// operation_id: "getMessage"; -// tags: "echo"; -// responses: { -// key: "200" -// value: { -// description: "OK"; -// } -// } -// }; -// } -// } -type Operation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of tags for API documentation control. Tags can be used for logical - // grouping of operations by resources or any other qualifier. - Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` - // A short summary of what the operation does. For maximum readability in the - // swagger-ui, this field SHOULD be less than 120 characters. - Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` - // A verbose explanation of the operation behavior. GFM syntax can be used for - // rich text representation. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // Additional external documentation for this operation. - ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - // Unique string used to identify the operation. The id MUST be unique among - // all operations described in the API. Tools and libraries MAY use the - // operationId to uniquely identify an operation, therefore, it is recommended - // to follow common programming naming conventions. - OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` - // A list of MIME types the operation can consume. This overrides the consumes - // definition at the OpenAPI Object. An empty value MAY be used to clear the - // global definition. Value MUST be as described under Mime Types. - Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` - // A list of MIME types the operation can produce. This overrides the produces - // definition at the OpenAPI Object. An empty value MAY be used to clear the - // global definition. Value MUST be as described under Mime Types. - Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` - // The list of possible responses as they are returned from executing this - // operation. - Responses map[string]*Response `protobuf:"bytes,9,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The transfer protocol for the operation. Values MUST be from the list: - // "http", "https", "ws", "wss". The value overrides the OpenAPI Object - // schemes definition. - Schemes []Scheme `protobuf:"varint,10,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` - // Declares this operation to be deprecated. Usage of the declared operation - // should be refrained. Default value is false. - Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` - // A declaration of which security schemes are applied for this operation. The - // list of values describes alternative security schemes that can be used - // (that is, there is a logical OR between the security requirements). This - // definition overrides any declared top-level security. To remove a top-level - // security declaration, an empty array can be used. - Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` - Extensions map[string]*_struct.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Operation) Reset() { - *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Operation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Operation) ProtoMessage() {} - -func (x *Operation) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Operation.ProtoReflect.Descriptor instead. -func (*Operation) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{1} -} - -func (x *Operation) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *Operation) GetSummary() string { - if x != nil { - return x.Summary - } - return "" -} - -func (x *Operation) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Operation) GetExternalDocs() *ExternalDocumentation { - if x != nil { - return x.ExternalDocs - } - return nil -} - -func (x *Operation) GetOperationId() string { - if x != nil { - return x.OperationId - } - return "" -} - -func (x *Operation) GetConsumes() []string { - if x != nil { - return x.Consumes - } - return nil -} - -func (x *Operation) GetProduces() []string { - if x != nil { - return x.Produces - } - return nil -} - -func (x *Operation) GetResponses() map[string]*Response { - if x != nil { - return x.Responses - } - return nil -} - -func (x *Operation) GetSchemes() []Scheme { - if x != nil { - return x.Schemes - } - return nil -} - -func (x *Operation) GetDeprecated() bool { - if x != nil { - return x.Deprecated - } - return false -} - -func (x *Operation) GetSecurity() []*SecurityRequirement { - if x != nil { - return x.Security - } - return nil -} - -func (x *Operation) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `Header` is a representation of OpenAPI v2 specification's Header object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject -type Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `Description` is a short description of the header. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // `Format` The extending format for the previously mentioned type. - Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` - // `Default` Declares the value of the header that the server will use if none is provided. - // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. - // Unlike JSON Schema this value MUST conform to the defined type for the header. - Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"` - // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. - Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"` -} - -func (x *Header) Reset() { - *x = Header{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Header) ProtoMessage() {} - -func (x *Header) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Header.ProtoReflect.Descriptor instead. -func (*Header) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{2} -} - -func (x *Header) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Header) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Header) GetFormat() string { - if x != nil { - return x.Format - } - return "" -} - -func (x *Header) GetDefault() string { - if x != nil { - return x.Default - } - return "" -} - -func (x *Header) GetPattern() string { - if x != nil { - return x.Pattern - } - return "" -} - -// `Response` is a representation of OpenAPI v2 specification's Response object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject -type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `Description` is a short description of the response. - // GFM syntax can be used for rich text representation. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // `Schema` optionally defines the structure of the response. - // If `Schema` is not provided, it means there is no content to the response. - Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` - // `Headers` A list of headers that are sent with the response. - // `Header` name is expected to be a string in the canonical format of the MIME header key - // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey - Headers map[string]*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // `Examples` gives per-mimetype response examples. - // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object - Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Extensions map[string]*_struct.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Response) Reset() { - *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response) ProtoMessage() {} - -func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3} -} - -func (x *Response) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Response) GetSchema() *Schema { - if x != nil { - return x.Schema - } - return nil -} - -func (x *Response) GetHeaders() map[string]*Header { - if x != nil { - return x.Headers - } - return nil -} - -func (x *Response) GetExamples() map[string]string { - if x != nil { - return x.Examples - } - return nil -} - -func (x *Response) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `Info` is a representation of OpenAPI v2 specification's Info object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// title: "Echo API"; -// version: "1.0"; -// description: "; -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// }; -// ... -// }; -type Info struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The title of the application. - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - // A short description of the application. GFM syntax can be used for rich - // text representation. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The Terms of Service for the API. - TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` - // The contact information for the exposed API. - Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"` - // The license information for the exposed API. - License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"` - // Provides the version of the application API (not to be confused - // with the specification version). - Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` - Extensions map[string]*_struct.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Info) Reset() { - *x = Info{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Info) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Info) ProtoMessage() {} - -func (x *Info) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Info.ProtoReflect.Descriptor instead. -func (*Info) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{4} -} - -func (x *Info) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *Info) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Info) GetTermsOfService() string { - if x != nil { - return x.TermsOfService - } - return "" -} - -func (x *Info) GetContact() *Contact { - if x != nil { - return x.Contact - } - return nil -} - -func (x *Info) GetLicense() *License { - if x != nil { - return x.License - } - return nil -} - -func (x *Info) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Info) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `Contact` is a representation of OpenAPI v2 specification's Contact object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// ... -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// ... -// }; -// ... -// }; -type Contact struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The identifying name of the contact person/organization. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The URL pointing to the contact information. MUST be in the format of a - // URL. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // The email address of the contact person/organization. MUST be in the format - // of an email address. - Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` -} - -func (x *Contact) Reset() { - *x = Contact{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Contact) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Contact) ProtoMessage() {} - -func (x *Contact) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Contact.ProtoReflect.Descriptor instead. -func (*Contact) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{5} -} - -func (x *Contact) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Contact) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Contact) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -// `License` is a representation of OpenAPI v2 specification's License object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// ... -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// ... -// }; -// ... -// }; -type License struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The license name used for the API. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A URL to the license used for the API. MUST be in the format of a URL. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *License) Reset() { - *x = License{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *License) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*License) ProtoMessage() {} - -func (x *License) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use License.ProtoReflect.Descriptor instead. -func (*License) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{6} -} - -func (x *License) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *License) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// `ExternalDocumentation` is a representation of OpenAPI v2 specification's -// ExternalDocumentation object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// ... -// external_docs: { -// description: "More about gRPC-Gateway"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// } -// ... -// }; -type ExternalDocumentation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A short description of the target documentation. GFM syntax can be used for - // rich text representation. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // The URL for the target documentation. Value MUST be in the format - // of a URL. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *ExternalDocumentation) Reset() { - *x = ExternalDocumentation{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExternalDocumentation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExternalDocumentation) ProtoMessage() {} - -func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExternalDocumentation.ProtoReflect.Descriptor instead. -func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{7} -} - -func (x *ExternalDocumentation) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *ExternalDocumentation) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// `Schema` is a representation of OpenAPI v2 specification's Schema object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject -type Schema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"` - // Adds support for polymorphism. The discriminator is the schema property - // name that is used to differentiate between other schema that inherit this - // schema. The property name used MUST be defined at this schema and it MUST - // be in the required property list. When used, the value MUST be the name of - // this schema or any schema that inherits it. - Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"` - // Relevant only for Schema "properties" definitions. Declares the property as - // "read only". This means that it MAY be sent as part of a response but MUST - // NOT be sent as part of the request. Properties marked as readOnly being - // true SHOULD NOT be in the required list of the defined schema. Default - // value is false. - ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` - // Additional external documentation for this schema. - ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - // A free-form property to include an example of an instance for this schema in JSON. - // This is copied verbatim to the output. - Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"` -} - -func (x *Schema) Reset() { - *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Schema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Schema) ProtoMessage() {} - -func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Schema.ProtoReflect.Descriptor instead. -func (*Schema) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{8} -} - -func (x *Schema) GetJsonSchema() *JSONSchema { - if x != nil { - return x.JsonSchema - } - return nil -} - -func (x *Schema) GetDiscriminator() string { - if x != nil { - return x.Discriminator - } - return "" -} - -func (x *Schema) GetReadOnly() bool { - if x != nil { - return x.ReadOnly - } - return false -} - -func (x *Schema) GetExternalDocs() *ExternalDocumentation { - if x != nil { - return x.ExternalDocs - } - return nil -} - -func (x *Schema) GetExample() string { - if x != nil { - return x.Example - } - return "" -} - -// `JSONSchema` represents properties from JSON Schema taken, and as used, in -// the OpenAPI v2 spec. -// -// This includes changes made by OpenAPI v2. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject -// -// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, -// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json -// -// Example: -// -// message SimpleMessage { -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { -// json_schema: { -// title: "SimpleMessage" -// description: "A simple message." -// required: ["id"] -// } -// }; -// -// // Id represents the message identifier. -// string id = 1; [ -// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { -// {description: "The unique identifier of the simple message." -// }]; -// } -type JSONSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Ref is used to define an external reference to include in the message. - // This could be a fully qualified proto message reference, and that type must - // be imported into the protofile. If no message is identified, the Ref will - // be used verbatim in the output. - // For example: - // `ref: ".google.protobuf.Timestamp"`. - Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` - // The title of the schema. - Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` - // A short description of the schema. - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` - ReadOnly bool `protobuf:"varint,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` - // A free-form property to include a JSON example of this field. This is copied - // verbatim to the output swagger.json. Quotes must be escaped. - // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject - Example string `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` - MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` - // Maximum represents an inclusive upper limit for a numeric instance. The - // value of MUST be a number, - Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` - ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` - // minimum represents an inclusive lower limit for a numeric instance. The - // value of MUST be a number, - Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` - ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` - MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` - MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` - MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` - UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` - MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"` - MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"` - Required []string `protobuf:"bytes,26,rep,name=required,proto3" json:"required,omitempty"` - // Items in 'array' must be unique. - Array []string `protobuf:"bytes,34,rep,name=array,proto3" json:"array,omitempty"` - Type []JSONSchema_JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.JSONSchema_JSONSchemaSimpleTypes" json:"type,omitempty"` - // `Format` - Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"` - // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 - Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"` -} - -func (x *JSONSchema) Reset() { - *x = JSONSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JSONSchema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JSONSchema) ProtoMessage() {} - -func (x *JSONSchema) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use JSONSchema.ProtoReflect.Descriptor instead. -func (*JSONSchema) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9} -} - -func (x *JSONSchema) GetRef() string { - if x != nil { - return x.Ref - } - return "" -} - -func (x *JSONSchema) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *JSONSchema) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *JSONSchema) GetDefault() string { - if x != nil { - return x.Default - } - return "" -} - -func (x *JSONSchema) GetReadOnly() bool { - if x != nil { - return x.ReadOnly - } - return false -} - -func (x *JSONSchema) GetExample() string { - if x != nil { - return x.Example - } - return "" -} - -func (x *JSONSchema) GetMultipleOf() float64 { - if x != nil { - return x.MultipleOf - } - return 0 -} - -func (x *JSONSchema) GetMaximum() float64 { - if x != nil { - return x.Maximum - } - return 0 -} - -func (x *JSONSchema) GetExclusiveMaximum() bool { - if x != nil { - return x.ExclusiveMaximum - } - return false -} - -func (x *JSONSchema) GetMinimum() float64 { - if x != nil { - return x.Minimum - } - return 0 -} - -func (x *JSONSchema) GetExclusiveMinimum() bool { - if x != nil { - return x.ExclusiveMinimum - } - return false -} - -func (x *JSONSchema) GetMaxLength() uint64 { - if x != nil { - return x.MaxLength - } - return 0 -} - -func (x *JSONSchema) GetMinLength() uint64 { - if x != nil { - return x.MinLength - } - return 0 -} - -func (x *JSONSchema) GetPattern() string { - if x != nil { - return x.Pattern - } - return "" -} - -func (x *JSONSchema) GetMaxItems() uint64 { - if x != nil { - return x.MaxItems - } - return 0 -} - -func (x *JSONSchema) GetMinItems() uint64 { - if x != nil { - return x.MinItems - } - return 0 -} - -func (x *JSONSchema) GetUniqueItems() bool { - if x != nil { - return x.UniqueItems - } - return false -} - -func (x *JSONSchema) GetMaxProperties() uint64 { - if x != nil { - return x.MaxProperties - } - return 0 -} - -func (x *JSONSchema) GetMinProperties() uint64 { - if x != nil { - return x.MinProperties - } - return 0 -} - -func (x *JSONSchema) GetRequired() []string { - if x != nil { - return x.Required - } - return nil -} - -func (x *JSONSchema) GetArray() []string { - if x != nil { - return x.Array - } - return nil -} - -func (x *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes { - if x != nil { - return x.Type - } - return nil -} - -func (x *JSONSchema) GetFormat() string { - if x != nil { - return x.Format - } - return "" -} - -func (x *JSONSchema) GetEnum() []string { - if x != nil { - return x.Enum - } - return nil -} - -// `Tag` is a representation of OpenAPI v2 specification's Tag object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject -type Tag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A short description for the tag. GFM syntax can be used for rich text - // representation. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // Additional external documentation for this tag. - ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` -} - -func (x *Tag) Reset() { - *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tag) ProtoMessage() {} - -func (x *Tag) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tag.ProtoReflect.Descriptor instead. -func (*Tag) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{10} -} - -func (x *Tag) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Tag) GetExternalDocs() *ExternalDocumentation { - if x != nil { - return x.ExternalDocs - } - return nil -} - -// `SecurityDefinitions` is a representation of OpenAPI v2 specification's -// Security Definitions object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject -// -// A declaration of the security schemes available to be used in the -// specification. This does not enforce the security schemes on the operations -// and only serves to provide the relevant details for each scheme. -type SecurityDefinitions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A single security scheme definition, mapping a "name" to the scheme it - // defines. - Security map[string]*SecurityScheme `protobuf:"bytes,1,rep,name=security,proto3" json:"security,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *SecurityDefinitions) Reset() { - *x = SecurityDefinitions{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecurityDefinitions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityDefinitions) ProtoMessage() {} - -func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecurityDefinitions.ProtoReflect.Descriptor instead. -func (*SecurityDefinitions) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11} -} - -func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme { - if x != nil { - return x.Security - } - return nil -} - -// `SecurityScheme` is a representation of OpenAPI v2 specification's -// Security Scheme object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject -// -// Allows the definition of a security scheme that can be used by the -// operations. Supported schemes are basic authentication, an API key (either as -// a header or as a query parameter) and OAuth2's common flows (implicit, -// password, application and access code). -type SecurityScheme struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of the security scheme. Valid values are "basic", - // "apiKey" or "oauth2". - Type SecurityScheme_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Type" json:"type,omitempty"` - // A short description for security scheme. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The name of the header or query parameter to be used. - // Valid for apiKey. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // The location of the API key. Valid values are "query" or - // "header". - // Valid for apiKey. - In SecurityScheme_In `protobuf:"varint,4,opt,name=in,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_In" json:"in,omitempty"` - // The flow used by the OAuth2 security scheme. Valid values are - // "implicit", "password", "application" or "accessCode". - // Valid for oauth2. - Flow SecurityScheme_Flow `protobuf:"varint,5,opt,name=flow,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Flow" json:"flow,omitempty"` - // The authorization URL to be used for this flow. This SHOULD be in - // the form of a URL. - // Valid for oauth2/implicit and oauth2/accessCode. - AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` - // The token URL to be used for this flow. This SHOULD be in the - // form of a URL. - // Valid for oauth2/password, oauth2/application and oauth2/accessCode. - TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` - // The available scopes for the OAuth2 security scheme. - // Valid for oauth2. - Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"` - Extensions map[string]*_struct.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *SecurityScheme) Reset() { - *x = SecurityScheme{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecurityScheme) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityScheme) ProtoMessage() {} - -func (x *SecurityScheme) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecurityScheme.ProtoReflect.Descriptor instead. -func (*SecurityScheme) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12} -} - -func (x *SecurityScheme) GetType() SecurityScheme_Type { - if x != nil { - return x.Type - } - return SecurityScheme_TYPE_INVALID -} - -func (x *SecurityScheme) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *SecurityScheme) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SecurityScheme) GetIn() SecurityScheme_In { - if x != nil { - return x.In - } - return SecurityScheme_IN_INVALID -} - -func (x *SecurityScheme) GetFlow() SecurityScheme_Flow { - if x != nil { - return x.Flow - } - return SecurityScheme_FLOW_INVALID -} - -func (x *SecurityScheme) GetAuthorizationUrl() string { - if x != nil { - return x.AuthorizationUrl - } - return "" -} - -func (x *SecurityScheme) GetTokenUrl() string { - if x != nil { - return x.TokenUrl - } - return "" -} - -func (x *SecurityScheme) GetScopes() *Scopes { - if x != nil { - return x.Scopes - } - return nil -} - -func (x *SecurityScheme) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `SecurityRequirement` is a representation of OpenAPI v2 specification's -// Security Requirement object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject -// -// Lists the required security schemes to execute this operation. The object can -// have multiple security schemes declared in it which are all required (that -// is, there is a logical AND between the schemes). -// -// The name used for each property MUST correspond to a security scheme -// declared in the Security Definitions. -type SecurityRequirement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Each name must correspond to a security scheme which is declared in - // the Security Definitions. If the security scheme is of type "oauth2", - // then the value is a list of scope names required for the execution. - // For other security scheme types, the array MUST be empty. - SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `protobuf:"bytes,1,rep,name=security_requirement,json=securityRequirement,proto3" json:"security_requirement,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *SecurityRequirement) Reset() { - *x = SecurityRequirement{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecurityRequirement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityRequirement) ProtoMessage() {} - -func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecurityRequirement.ProtoReflect.Descriptor instead. -func (*SecurityRequirement) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13} -} - -func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue { - if x != nil { - return x.SecurityRequirement - } - return nil -} - -// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject -// -// Lists the available scopes for an OAuth2 security scheme. -type Scopes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maps between a name of a scope to a short description of it (as the value - // of the property). - Scope map[string]string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Scopes) Reset() { - *x = Scopes{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Scopes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Scopes) ProtoMessage() {} - -func (x *Scopes) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Scopes.ProtoReflect.Descriptor instead. -func (*Scopes) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14} -} - -func (x *Scopes) GetScope() map[string]string { - if x != nil { - return x.Scope - } - return nil -} - -// If the security scheme is of type "oauth2", then the value is a list of -// scope names required for the execution. For other security scheme types, -// the array MUST be empty. -type SecurityRequirement_SecurityRequirementValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Scope []string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty"` -} - -func (x *SecurityRequirement_SecurityRequirementValue) Reset() { - *x = SecurityRequirement_SecurityRequirementValue{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecurityRequirement_SecurityRequirementValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {} - -func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecurityRequirement_SecurityRequirementValue.ProtoReflect.Descriptor instead. -func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13, 0} -} - -func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string { - if x != nil { - return x.Scope - } - return nil -} - -var File_protoc_gen_openapiv2_options_openapiv2_proto protoreflect.FileDescriptor - -var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x07, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67, - 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x43, 0x0a, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, 0x73, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x08, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, - 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, - 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, - 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0d, 0x10, 0x0e, 0x22, - 0xff, 0x06, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, - 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x44, 0x6f, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, - 0x61, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, - 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x5a, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x44, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, - 0x09, 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, - 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, - 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, - 0x08, 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, - 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a, - 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x06, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x73, 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, - 0x72, 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x63, 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63, - 0x65, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, - 0x6a, 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, - 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, - 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x22, 0xdf, 0x07, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, - 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, - 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, - 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, - 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, - 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, - 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, - 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, - 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, - 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, - 0x61, 0x79, 0x12, 0x5f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, - 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, - 0x6e, 0x75, 0x6d, 0x18, 0x2e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x22, - 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d, - 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0b, 0x0a, - 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, - 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x05, - 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, - 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, - 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, 0x08, 0x1b, - 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x4a, 0x04, - 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10, 0x2a, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, - 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0x94, 0x01, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xf7, 0x01, - 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a, - 0x76, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xff, 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, - 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02, - 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, - 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x49, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, - 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x41, 0x50, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e, - 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, - 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a, - 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, - 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, - 0x4f, 0x57, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, - 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45, - 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x04, 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30, - 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x1a, 0x9f, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x6d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a, - 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x3b, 0x0a, 0x06, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12, - 0x07, 0x0a, 0x03, 0x57, 0x53, 0x53, 0x10, 0x04, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, - 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce sync.Once - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc -) - -func file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP() []byte { - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce.Do(func() { - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData) - }) - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData -} - -var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 28) -var file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = []interface{}{ - (Scheme)(0), // 0: grpc.gateway.protoc_gen_openapiv2.options.Scheme - (JSONSchema_JSONSchemaSimpleTypes)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes - (SecurityScheme_Type)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type - (SecurityScheme_In)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In - (SecurityScheme_Flow)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow - (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger - (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation - (*Header)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Header - (*Response)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Response - (*Info)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.Info - (*Contact)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Contact - (*License)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.License - (*ExternalDocumentation)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - (*Schema)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Schema - (*JSONSchema)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema - (*Tag)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.Tag - (*SecurityDefinitions)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions - (*SecurityScheme)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme - (*SecurityRequirement)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement - (*Scopes)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.Scopes - nil, // 20: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry - nil, // 21: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry - nil, // 22: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry - nil, // 23: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry - nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry - nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry - nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry - nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry - nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry - nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry - (*SecurityRequirement_SecurityRequirementValue)(nil), // 30: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue - nil, // 31: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry - nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry - (*_struct.Value)(nil), // 33: google.protobuf.Value -} -var file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = []int32{ - 9, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info - 0, // 1: grpc.gateway.protoc_gen_openapiv2.options.Swagger.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme - 20, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry - 16, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions - 18, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement - 12, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - 21, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry - 12, // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - 22, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry - 0, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme - 18, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement - 23, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry - 13, // 12: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema - 24, // 13: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry - 25, // 14: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry - 26, // 15: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry - 10, // 16: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact - 11, // 17: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License - 27, // 18: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry - 14, // 19: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema - 12, // 20: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - 1, // 21: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes - 12, // 22: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - 28, // 23: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry - 2, // 24: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type - 3, // 25: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In - 4, // 26: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow - 19, // 27: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes - 29, // 28: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry - 31, // 29: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry - 32, // 30: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry - 8, // 31: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response - 33, // 32: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value - 8, // 33: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response - 33, // 34: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value - 7, // 35: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header - 33, // 36: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value - 33, // 37: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value - 17, // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme - 33, // 39: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value - 30, // 40: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue - 41, // [41:41] is the sub-list for method output_type - 41, // [41:41] is the sub-list for method input_type - 41, // [41:41] is the sub-list for extension type_name - 41, // [41:41] is the sub-list for extension extendee - 0, // [0:41] is the sub-list for field type_name -} - -func init() { file_protoc_gen_openapiv2_options_openapiv2_proto_init() } -func file_protoc_gen_openapiv2_options_openapiv2_proto_init() { - if File_protoc_gen_openapiv2_options_openapiv2_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Swagger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Info); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Contact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*License); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExternalDocumentation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JSONSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityDefinitions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityScheme); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityRequirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Scopes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityRequirement_SecurityRequirementValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc, - NumEnums: 5, - NumMessages: 28, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes, - DependencyIndexes: file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs, - EnumInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes, - MessageInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes, - }.Build() - File_protoc_gen_openapiv2_options_openapiv2_proto = out.File - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = nil - file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = nil - file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = nil -} diff --git a/third_party/proto/protoc-gen-openapiv2/options/openapiv2.proto b/third_party/proto/protoc-gen-openapiv2/options/openapiv2.proto deleted file mode 100644 index 7be1fb572..000000000 --- a/third_party/proto/protoc-gen-openapiv2/options/openapiv2.proto +++ /dev/null @@ -1,645 +0,0 @@ -syntax = "proto3"; - -package grpc.gateway.protoc_gen_openapiv2.options; - -option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; - -import "google/protobuf/struct.proto"; - -// Scheme describes the schemes supported by the OpenAPI Swagger -// and Operation objects. -enum Scheme { - UNKNOWN = 0; - HTTP = 1; - HTTPS = 2; - WS = 3; - WSS = 4; -} - -// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// title: "Echo API"; -// version: "1.0"; -// description: "; -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// }; -// schemes: HTTPS; -// consumes: "application/json"; -// produces: "application/json"; -// }; -// -message Swagger { - // Specifies the OpenAPI Specification version being used. It can be - // used by the OpenAPI UI and other clients to interpret the API listing. The - // value MUST be "2.0". - string swagger = 1; - // Provides metadata about the API. The metadata can be used by the - // clients if needed. - Info info = 2; - // The host (name or ip) serving the API. This MUST be the host only and does - // not include the scheme nor sub-paths. It MAY include a port. If the host is - // not included, the host serving the documentation is to be used (including - // the port). The host does not support path templating. - string host = 3; - // The base path on which the API is served, which is relative to the host. If - // it is not included, the API is served directly under the host. The value - // MUST start with a leading slash (/). The basePath does not support path - // templating. - // Note that using `base_path` does not change the endpoint paths that are - // generated in the resulting OpenAPI file. If you wish to use `base_path` - // with relatively generated OpenAPI paths, the `base_path` prefix must be - // manually removed from your `google.api.http` paths and your code changed to - // serve the API from the `base_path`. - string base_path = 4; - // The transfer protocol of the API. Values MUST be from the list: "http", - // "https", "ws", "wss". If the schemes is not included, the default scheme to - // be used is the one used to access the OpenAPI definition itself. - repeated Scheme schemes = 5; - // A list of MIME types the APIs can consume. This is global to all APIs but - // can be overridden on specific API calls. Value MUST be as described under - // Mime Types. - repeated string consumes = 6; - // A list of MIME types the APIs can produce. This is global to all APIs but - // can be overridden on specific API calls. Value MUST be as described under - // Mime Types. - repeated string produces = 7; - // field 8 is reserved for 'paths'. - reserved 8; - // field 9 is reserved for 'definitions', which at this time are already - // exposed as and customizable as proto messages. - reserved 9; - // An object to hold responses that can be used across operations. This - // property does not define global responses for all operations. - map responses = 10; - // Security scheme definitions that can be used across the specification. - SecurityDefinitions security_definitions = 11; - // A declaration of which security schemes are applied for the API as a whole. - // The list of values describes alternative security schemes that can be used - // (that is, there is a logical OR between the security requirements). - // Individual operations can override this definition. - repeated SecurityRequirement security = 12; - // field 13 is reserved for 'tags', which are supposed to be exposed as and - // customizable as proto services. TODO(ivucica): add processing of proto - // service objects into OpenAPI v2 Tag objects. - reserved 13; - // Additional external documentation. - ExternalDocumentation external_docs = 14; - map extensions = 15; -} - -// `Operation` is a representation of OpenAPI v2 specification's Operation object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject -// -// Example: -// -// service EchoService { -// rpc Echo(SimpleMessage) returns (SimpleMessage) { -// option (google.api.http) = { -// get: "/v1/example/echo/{id}" -// }; -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { -// summary: "Get a message."; -// operation_id: "getMessage"; -// tags: "echo"; -// responses: { -// key: "200" -// value: { -// description: "OK"; -// } -// } -// }; -// } -// } -message Operation { - // A list of tags for API documentation control. Tags can be used for logical - // grouping of operations by resources or any other qualifier. - repeated string tags = 1; - // A short summary of what the operation does. For maximum readability in the - // swagger-ui, this field SHOULD be less than 120 characters. - string summary = 2; - // A verbose explanation of the operation behavior. GFM syntax can be used for - // rich text representation. - string description = 3; - // Additional external documentation for this operation. - ExternalDocumentation external_docs = 4; - // Unique string used to identify the operation. The id MUST be unique among - // all operations described in the API. Tools and libraries MAY use the - // operationId to uniquely identify an operation, therefore, it is recommended - // to follow common programming naming conventions. - string operation_id = 5; - // A list of MIME types the operation can consume. This overrides the consumes - // definition at the OpenAPI Object. An empty value MAY be used to clear the - // global definition. Value MUST be as described under Mime Types. - repeated string consumes = 6; - // A list of MIME types the operation can produce. This overrides the produces - // definition at the OpenAPI Object. An empty value MAY be used to clear the - // global definition. Value MUST be as described under Mime Types. - repeated string produces = 7; - // field 8 is reserved for 'parameters'. - reserved 8; - // The list of possible responses as they are returned from executing this - // operation. - map responses = 9; - // The transfer protocol for the operation. Values MUST be from the list: - // "http", "https", "ws", "wss". The value overrides the OpenAPI Object - // schemes definition. - repeated Scheme schemes = 10; - // Declares this operation to be deprecated. Usage of the declared operation - // should be refrained. Default value is false. - bool deprecated = 11; - // A declaration of which security schemes are applied for this operation. The - // list of values describes alternative security schemes that can be used - // (that is, there is a logical OR between the security requirements). This - // definition overrides any declared top-level security. To remove a top-level - // security declaration, an empty array can be used. - repeated SecurityRequirement security = 12; - map extensions = 13; -} - -// `Header` is a representation of OpenAPI v2 specification's Header object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject -// -message Header { - // `Description` is a short description of the header. - string description = 1; - // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. - string type = 2; - // `Format` The extending format for the previously mentioned type. - string format = 3; - // field 4 is reserved for 'items', but in OpenAPI-specific way. - reserved 4; - // field 5 is reserved `Collection Format` Determines the format of the array if type array is used. - reserved 5; - // `Default` Declares the value of the header that the server will use if none is provided. - // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. - // Unlike JSON Schema this value MUST conform to the defined type for the header. - string default = 6; - // field 7 is reserved for 'maximum'. - reserved 7; - // field 8 is reserved for 'exclusiveMaximum'. - reserved 8; - // field 9 is reserved for 'minimum'. - reserved 9; - // field 10 is reserved for 'exclusiveMinimum'. - reserved 10; - // field 11 is reserved for 'maxLength'. - reserved 11; - // field 12 is reserved for 'minLength'. - reserved 12; - // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. - string pattern = 13; - // field 14 is reserved for 'maxItems'. - reserved 14; - // field 15 is reserved for 'minItems'. - reserved 15; - // field 16 is reserved for 'uniqueItems'. - reserved 16; - // field 17 is reserved for 'enum'. - reserved 17; - // field 18 is reserved for 'multipleOf'. - reserved 18; -} - -// `Response` is a representation of OpenAPI v2 specification's Response object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject -// -message Response { - // `Description` is a short description of the response. - // GFM syntax can be used for rich text representation. - string description = 1; - // `Schema` optionally defines the structure of the response. - // If `Schema` is not provided, it means there is no content to the response. - Schema schema = 2; - // `Headers` A list of headers that are sent with the response. - // `Header` name is expected to be a string in the canonical format of the MIME header key - // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey - map headers = 3; - // `Examples` gives per-mimetype response examples. - // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object - map examples = 4; - map extensions = 5; -} - -// `Info` is a representation of OpenAPI v2 specification's Info object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// title: "Echo API"; -// version: "1.0"; -// description: "; -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// }; -// ... -// }; -// -message Info { - // The title of the application. - string title = 1; - // A short description of the application. GFM syntax can be used for rich - // text representation. - string description = 2; - // The Terms of Service for the API. - string terms_of_service = 3; - // The contact information for the exposed API. - Contact contact = 4; - // The license information for the exposed API. - License license = 5; - // Provides the version of the application API (not to be confused - // with the specification version). - string version = 6; - map extensions = 7; -} - -// `Contact` is a representation of OpenAPI v2 specification's Contact object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// ... -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// ... -// }; -// ... -// }; -// -message Contact { - // The identifying name of the contact person/organization. - string name = 1; - // The URL pointing to the contact information. MUST be in the format of a - // URL. - string url = 2; - // The email address of the contact person/organization. MUST be in the format - // of an email address. - string email = 3; -} - -// `License` is a representation of OpenAPI v2 specification's License object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// ... -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// ... -// }; -// ... -// }; -// -message License { - // The license name used for the API. - string name = 1; - // A URL to the license used for the API. MUST be in the format of a URL. - string url = 2; -} - -// `ExternalDocumentation` is a representation of OpenAPI v2 specification's -// ExternalDocumentation object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// ... -// external_docs: { -// description: "More about gRPC-Gateway"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// } -// ... -// }; -// -message ExternalDocumentation { - // A short description of the target documentation. GFM syntax can be used for - // rich text representation. - string description = 1; - // The URL for the target documentation. Value MUST be in the format - // of a URL. - string url = 2; -} - -// `Schema` is a representation of OpenAPI v2 specification's Schema object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject -// -message Schema { - JSONSchema json_schema = 1; - // Adds support for polymorphism. The discriminator is the schema property - // name that is used to differentiate between other schema that inherit this - // schema. The property name used MUST be defined at this schema and it MUST - // be in the required property list. When used, the value MUST be the name of - // this schema or any schema that inherits it. - string discriminator = 2; - // Relevant only for Schema "properties" definitions. Declares the property as - // "read only". This means that it MAY be sent as part of a response but MUST - // NOT be sent as part of the request. Properties marked as readOnly being - // true SHOULD NOT be in the required list of the defined schema. Default - // value is false. - bool read_only = 3; - // field 4 is reserved for 'xml'. - reserved 4; - // Additional external documentation for this schema. - ExternalDocumentation external_docs = 5; - // A free-form property to include an example of an instance for this schema in JSON. - // This is copied verbatim to the output. - string example = 6; -} - -// `JSONSchema` represents properties from JSON Schema taken, and as used, in -// the OpenAPI v2 spec. -// -// This includes changes made by OpenAPI v2. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject -// -// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, -// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json -// -// Example: -// -// message SimpleMessage { -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { -// json_schema: { -// title: "SimpleMessage" -// description: "A simple message." -// required: ["id"] -// } -// }; -// -// // Id represents the message identifier. -// string id = 1; [ -// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { -// {description: "The unique identifier of the simple message." -// }]; -// } -// -message JSONSchema { - // field 1 is reserved for '$id', omitted from OpenAPI v2. - reserved 1; - // field 2 is reserved for '$schema', omitted from OpenAPI v2. - reserved 2; - // Ref is used to define an external reference to include in the message. - // This could be a fully qualified proto message reference, and that type must - // be imported into the protofile. If no message is identified, the Ref will - // be used verbatim in the output. - // For example: - // `ref: ".google.protobuf.Timestamp"`. - string ref = 3; - // field 4 is reserved for '$comment', omitted from OpenAPI v2. - reserved 4; - // The title of the schema. - string title = 5; - // A short description of the schema. - string description = 6; - string default = 7; - bool read_only = 8; - // A free-form property to include a JSON example of this field. This is copied - // verbatim to the output swagger.json. Quotes must be escaped. - // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject - string example = 9; - double multiple_of = 10; - // Maximum represents an inclusive upper limit for a numeric instance. The - // value of MUST be a number, - double maximum = 11; - bool exclusive_maximum = 12; - // minimum represents an inclusive lower limit for a numeric instance. The - // value of MUST be a number, - double minimum = 13; - bool exclusive_minimum = 14; - uint64 max_length = 15; - uint64 min_length = 16; - string pattern = 17; - // field 18 is reserved for 'additionalItems', omitted from OpenAPI v2. - reserved 18; - // field 19 is reserved for 'items', but in OpenAPI-specific way. - // TODO(ivucica): add 'items'? - reserved 19; - uint64 max_items = 20; - uint64 min_items = 21; - bool unique_items = 22; - // field 23 is reserved for 'contains', omitted from OpenAPI v2. - reserved 23; - uint64 max_properties = 24; - uint64 min_properties = 25; - repeated string required = 26; - // field 27 is reserved for 'additionalProperties', but in OpenAPI-specific - // way. TODO(ivucica): add 'additionalProperties'? - reserved 27; - // field 28 is reserved for 'definitions', omitted from OpenAPI v2. - reserved 28; - // field 29 is reserved for 'properties', but in OpenAPI-specific way. - // TODO(ivucica): add 'additionalProperties'? - reserved 29; - // following fields are reserved, as the properties have been omitted from - // OpenAPI v2: - // patternProperties, dependencies, propertyNames, const - reserved 30 to 33; - // Items in 'array' must be unique. - repeated string array = 34; - - enum JSONSchemaSimpleTypes { - UNKNOWN = 0; - ARRAY = 1; - BOOLEAN = 2; - INTEGER = 3; - NULL = 4; - NUMBER = 5; - OBJECT = 6; - STRING = 7; - } - - repeated JSONSchemaSimpleTypes type = 35; - // `Format` - string format = 36; - // following fields are reserved, as the properties have been omitted from - // OpenAPI v2: contentMediaType, contentEncoding, if, then, else - reserved 37 to 41; - // field 42 is reserved for 'allOf', but in OpenAPI-specific way. - // TODO(ivucica): add 'allOf'? - reserved 42; - // following fields are reserved, as the properties have been omitted from - // OpenAPI v2: - // anyOf, oneOf, not - reserved 43 to 45; - // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 - repeated string enum = 46; -} - -// `Tag` is a representation of OpenAPI v2 specification's Tag object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject -// -message Tag { - // field 1 is reserved for 'name'. In our generator, this is (to be) extracted - // from the name of proto service, and thus not exposed to the user, as - // changing tag object's name would break the link to the references to the - // tag in individual operation specifications. - // - // TODO(ivucica): Add 'name' property. Use it to allow override of the name of - // global Tag object, then use that name to reference the tag throughout the - // OpenAPI file. - reserved 1; - // A short description for the tag. GFM syntax can be used for rich text - // representation. - string description = 2; - // Additional external documentation for this tag. - ExternalDocumentation external_docs = 3; -} - -// `SecurityDefinitions` is a representation of OpenAPI v2 specification's -// Security Definitions object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject -// -// A declaration of the security schemes available to be used in the -// specification. This does not enforce the security schemes on the operations -// and only serves to provide the relevant details for each scheme. -message SecurityDefinitions { - // A single security scheme definition, mapping a "name" to the scheme it - // defines. - map security = 1; -} - -// `SecurityScheme` is a representation of OpenAPI v2 specification's -// Security Scheme object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject -// -// Allows the definition of a security scheme that can be used by the -// operations. Supported schemes are basic authentication, an API key (either as -// a header or as a query parameter) and OAuth2's common flows (implicit, -// password, application and access code). -message SecurityScheme { - // The type of the security scheme. Valid values are "basic", - // "apiKey" or "oauth2". - enum Type { - TYPE_INVALID = 0; - TYPE_BASIC = 1; - TYPE_API_KEY = 2; - TYPE_OAUTH2 = 3; - } - - // The location of the API key. Valid values are "query" or "header". - enum In { - IN_INVALID = 0; - IN_QUERY = 1; - IN_HEADER = 2; - } - - // The flow used by the OAuth2 security scheme. Valid values are - // "implicit", "password", "application" or "accessCode". - enum Flow { - FLOW_INVALID = 0; - FLOW_IMPLICIT = 1; - FLOW_PASSWORD = 2; - FLOW_APPLICATION = 3; - FLOW_ACCESS_CODE = 4; - } - - // The type of the security scheme. Valid values are "basic", - // "apiKey" or "oauth2". - Type type = 1; - // A short description for security scheme. - string description = 2; - // The name of the header or query parameter to be used. - // Valid for apiKey. - string name = 3; - // The location of the API key. Valid values are "query" or - // "header". - // Valid for apiKey. - In in = 4; - // The flow used by the OAuth2 security scheme. Valid values are - // "implicit", "password", "application" or "accessCode". - // Valid for oauth2. - Flow flow = 5; - // The authorization URL to be used for this flow. This SHOULD be in - // the form of a URL. - // Valid for oauth2/implicit and oauth2/accessCode. - string authorization_url = 6; - // The token URL to be used for this flow. This SHOULD be in the - // form of a URL. - // Valid for oauth2/password, oauth2/application and oauth2/accessCode. - string token_url = 7; - // The available scopes for the OAuth2 security scheme. - // Valid for oauth2. - Scopes scopes = 8; - map extensions = 9; -} - -// `SecurityRequirement` is a representation of OpenAPI v2 specification's -// Security Requirement object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject -// -// Lists the required security schemes to execute this operation. The object can -// have multiple security schemes declared in it which are all required (that -// is, there is a logical AND between the schemes). -// -// The name used for each property MUST correspond to a security scheme -// declared in the Security Definitions. -message SecurityRequirement { - // If the security scheme is of type "oauth2", then the value is a list of - // scope names required for the execution. For other security scheme types, - // the array MUST be empty. - message SecurityRequirementValue { - repeated string scope = 1; - } - // Each name must correspond to a security scheme which is declared in - // the Security Definitions. If the security scheme is of type "oauth2", - // then the value is a list of scope names required for the execution. - // For other security scheme types, the array MUST be empty. - map security_requirement = 1; -} - -// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject -// -// Lists the available scopes for an OAuth2 security scheme. -message Scopes { - // Maps between a name of a scope to a short description of it (as the value - // of the property). - map scope = 1; -} diff --git a/third_party/proto/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto deleted file mode 100644 index 2cbcabb29..000000000 --- a/third_party/proto/tendermint/abci/types.proto +++ /dev/null @@ -1,407 +0,0 @@ -syntax = "proto3"; -package tendermint.abci; - -option go_package = "github.com/tendermint/tendermint/abci/types"; - -// For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md -import "tendermint/crypto/proof.proto"; -import "tendermint/types/types.proto"; -import "tendermint/crypto/keys.proto"; -import "tendermint/types/params.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -// This file is copied from http://github.com/tendermint/abci -// NOTE: When using custom types, mind the warnings. -// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues - -//---------------------------------------- -// Request types - -message Request { - oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestSetOption set_option = 4; - RequestInitChain init_chain = 5; - RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - RequestCheckTx check_tx = 8; - RequestDeliverTx deliver_tx = 9; - RequestEndBlock end_block = 10; - RequestCommit commit = 11; - RequestListSnapshots list_snapshots = 12; - RequestOfferSnapshot offer_snapshot = 13; - RequestLoadSnapshotChunk load_snapshot_chunk = 14; - RequestApplySnapshotChunk apply_snapshot_chunk = 15; - } -} - -message RequestEcho { - string message = 1; -} - -message RequestFlush {} - -message RequestInfo { - string version = 1; - uint64 block_version = 2; - uint64 p2p_version = 3; -} - -// nondeterministic -message RequestSetOption { - string key = 1; - string value = 2; -} - -message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -message RequestBeginBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; -} - -enum CheckTxType { - NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; - RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; -} - -message RequestCheckTx { - bytes tx = 1; - CheckTxType type = 2; -} - -message RequestDeliverTx { - bytes tx = 1; -} - -message RequestEndBlock { - int64 height = 1; -} - -message RequestCommit {} - -// lists available snapshots -message RequestListSnapshots { -} - -// offers a snapshot to the application -message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height -} - -// loads a snapshot chunk -message RequestLoadSnapshotChunk { - uint64 height = 1; - uint32 format = 2; - uint32 chunk = 3; -} - -// Applies a snapshot chunk -message RequestApplySnapshotChunk { - uint32 index = 1; - bytes chunk = 2; - string sender = 3; -} - -//---------------------------------------- -// Response types - -message Response { - oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseSetOption set_option = 5; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - ResponseDeliverTx deliver_tx = 10; - ResponseEndBlock end_block = 11; - ResponseCommit commit = 12; - ResponseListSnapshots list_snapshots = 13; - ResponseOfferSnapshot offer_snapshot = 14; - ResponseLoadSnapshotChunk load_snapshot_chunk = 15; - ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - } -} - -// nondeterministic -message ResponseException { - string error = 1; -} - -message ResponseEcho { - string message = 1; -} - -message ResponseFlush {} - -message ResponseInfo { - string data = 1; - - string version = 2; - uint64 app_version = 3; - - int64 last_block_height = 4; - bytes last_block_app_hash = 5; -} - -// nondeterministic -message ResponseSetOption { - uint32 code = 1; - // bytes data = 2; - string log = 3; - string info = 4; -} - -message ResponseInitChain { - ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; - bytes app_hash = 3; -} - -message ResponseQuery { - uint32 code = 1; - // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - tendermint.crypto.ProofOps proof_ops = 8; - int64 height = 9; - string codespace = 10; -} - -message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; -} - -message ResponseDeliverTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; -} - -message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 - [(gogoproto.nullable) = false]; - ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCommit { - // reserve 1 - bytes data = 2; - int64 retain_height = 3; -} - -message ResponseListSnapshots { - repeated Snapshot snapshots = 1; -} - -message ResponseOfferSnapshot { - Result result = 1; - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others - } -} - -message ResponseLoadSnapshotChunk { - bytes chunk = 1; -} - -message ResponseApplySnapshotChunk { - Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others - } -} - -//---------------------------------------- -// Misc. - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -message ConsensusParams { - BlockParams block = 1; - tendermint.types.EvidenceParams evidence = 2; - tendermint.types.ValidatorParams validator = 3; - tendermint.types.VersionParams version = 4; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Note: must be greater than 0 - int64 max_bytes = 1; - // Note: must be greater or equal to -1 - int64 max_gas = 2; -} - -message LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -// Event allows application developers to attach additional information to -// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -// Later, transactions may be queried using these events. -message Event { - string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; -} - -// EventAttribute is a single key-value pair, associated with an event. -message EventAttribute { - bytes key = 1; - bytes value = 2; - bool index = 3; // nondeterministic -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; -} - -//---------------------------------------- -// Blockchain Types - -// Validator -message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power -} - -// ValidatorUpdate -message ValidatorUpdate { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; -} - -// VoteInfo -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; -} - -enum EvidenceType { - UNKNOWN = 0; - DUPLICATE_VOTE = 1; - LIGHT_CLIENT_ATTACK = 2; -} - -message Evidence { - EvidenceType type = 1; - // The offending validator - Validator validator = 2 [(gogoproto.nullable) = false]; - // The height when the offense occurred - int64 height = 3; - // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 - int64 total_voting_power = 5; -} - -//---------------------------------------- -// State Sync Types - -message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata -} - -//---------------------------------------- -// Service Definition - -service ABCIApplication { - rpc Echo(RequestEcho) returns (ResponseEcho); - rpc Flush(RequestFlush) returns (ResponseFlush); - rpc Info(RequestInfo) returns (ResponseInfo); - rpc SetOption(RequestSetOption) returns (ResponseSetOption); - rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); - rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); - rpc Query(RequestQuery) returns (ResponseQuery); - rpc Commit(RequestCommit) returns (ResponseCommit); - rpc InitChain(RequestInitChain) returns (ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); - rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); - rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); - rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); -} diff --git a/third_party/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto deleted file mode 100644 index 16fd7adf3..000000000 --- a/third_party/proto/tendermint/crypto/keys.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -// PublicKey defines the keys available for use with Tendermint Validators -message PublicKey { - option (gogoproto.compare) = true; - option (gogoproto.equal) = true; - - oneof sum { - bytes ed25519 = 1; - bytes secp256k1 = 2; - } -} diff --git a/third_party/proto/tendermint/crypto/proof.proto b/third_party/proto/tendermint/crypto/proof.proto deleted file mode 100644 index 975df7685..000000000 --- a/third_party/proto/tendermint/crypto/proof.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -message Proof { - int64 total = 1; - int64 index = 2; - bytes leaf_hash = 3; - repeated bytes aunts = 4; -} - -message ValueOp { - // Encoded in ProofOp.Key. - bytes key = 1; - - // To encode in ProofOp.Data - Proof proof = 2; -} - -message DominoOp { - string key = 1; - string input = 2; - string output = 3; -} - -// ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data -// for example neighbouring node hash -message ProofOp { - string type = 1; - bytes key = 2; - bytes data = 3; -} - -// ProofOps is Merkle proof defined by the list of ProofOps -message ProofOps { - repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; -} diff --git a/third_party/proto/tendermint/libs/bits/types.proto b/third_party/proto/tendermint/libs/bits/types.proto deleted file mode 100644 index 3111d113a..000000000 --- a/third_party/proto/tendermint/libs/bits/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package tendermint.libs.bits; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; - -message BitArray { - int64 bits = 1; - repeated uint64 elems = 2; -} diff --git a/third_party/proto/tendermint/p2p/types.proto b/third_party/proto/tendermint/p2p/types.proto deleted file mode 100644 index 0d42ea400..000000000 --- a/third_party/proto/tendermint/p2p/types.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package tendermint.p2p; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; - -import "gogoproto/gogo.proto"; - -message NetAddress { - string id = 1 [(gogoproto.customname) = "ID"]; - string ip = 2 [(gogoproto.customname) = "IP"]; - uint32 port = 3; -} - -message ProtocolVersion { - uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; - uint64 block = 2; - uint64 app = 3; -} - -message DefaultNodeInfo { - ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; - string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; - string listen_addr = 3; - string network = 4; - string version = 5; - bytes channels = 6; - string moniker = 7; - DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; -} - -message DefaultNodeInfoOther { - string tx_index = 1; - string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; -} diff --git a/third_party/proto/tendermint/types/block.proto b/third_party/proto/tendermint/types/block.proto deleted file mode 100644 index 84e9bb15d..000000000 --- a/third_party/proto/tendermint/types/block.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/evidence.proto"; - -message Block { - Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; -} diff --git a/third_party/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto deleted file mode 100644 index 3b234571b..000000000 --- a/third_party/proto/tendermint/types/evidence.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/validator.proto"; - -message Evidence { - oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; - LightClientAttackEvidence light_client_attack_evidence = 2; - } -} - -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; - repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message EvidenceList { - repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; -} diff --git a/third_party/proto/tendermint/types/params.proto b/third_party/proto/tendermint/types/params.proto deleted file mode 100644 index 0de7d846f..000000000 --- a/third_party/proto/tendermint/types/params.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option (gogoproto.equal_all) = true; - -// ConsensusParams contains consensus critical parameters that determine the -// validity of blocks. -message ConsensusParams { - BlockParams block = 1 [(gogoproto.nullable) = false]; - EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; - ValidatorParams validator = 3 [(gogoproto.nullable) = false]; - VersionParams version = 4 [(gogoproto.nullable) = false]; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Max block size, in bytes. - // Note: must be greater than 0 - int64 max_bytes = 1; - // Max gas per block. - // Note: must be greater or equal to -1 - int64 max_gas = 2; - // Minimum time increment between consecutive blocks (in milliseconds) If the - // block header timestamp is ahead of the system clock, decrease this value. - // - // Not exposed to the application. - int64 time_iota_ms = 3; -} - -// EvidenceParams determine how we handle evidence of malfeasance. -message EvidenceParams { - // Max age of evidence, in blocks. - // - // The basic formula for calculating this is: MaxAgeDuration / {average block - // time}. - int64 max_age_num_blocks = 1; - - // Max age of evidence, in time. - // - // It should correspond with an app's "unbonding period" or other similar - // mechanism for handling [Nothing-At-Stake - // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - - // This sets the maximum size of total evidence in bytes that can be committed in a single block. - // and should fall comfortably under the max block bytes. - // Default is 1048576 or 1MB - int64 max_bytes = 3; -} - -// ValidatorParams restrict the public key types validators can use. -// NOTE: uses ABCI pubkey naming, not Amino names. -message ValidatorParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - repeated string pub_key_types = 1; -} - -// VersionParams contains the ABCI application version. -message VersionParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - uint64 app_version = 1; -} - -// HashedParams is a subset of ConsensusParams. -// -// It is hashed into the Header.ConsensusHash. -message HashedParams { - int64 block_max_bytes = 1; - int64 block_max_gas = 2; -} diff --git a/third_party/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto deleted file mode 100644 index 7f7ea74ca..000000000 --- a/third_party/proto/tendermint/types/types.proto +++ /dev/null @@ -1,157 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/crypto/proof.proto"; -import "tendermint/version/types.proto"; -import "tendermint/types/validator.proto"; - -// BlockIdFlag indicates which BlcokID the signature is for -enum BlockIDFlag { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; -} - -// SignedMsgType is a type of signed message in the consensus. -enum SignedMsgType { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; - // Votes - SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; - SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; - - // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; -} - -// PartsetHeader -message PartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message Part { - uint32 index = 1; - bytes bytes = 2; - tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; -} - -// BlockID -message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; -} - -// -------------------------------- - -// Header defines the structure of a Tendermint block header. -message Header { - // basic block info - tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block -} - -// Data contains the set of transactions included in the block -message Data { - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - repeated bytes txs = 1; -} - -// Vote represents a prevote, precommit, or commit vote from validators for -// consensus. -message Vote { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; -} - -// Commit contains the evidence that a block was committed by a set of validators. -message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; -} - -// CommitSig is a part of the Vote included in a Commit. -message CommitSig { - BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; -} - -message Proposal { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - int32 pol_round = 4; - BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; -} - -message SignedHeader { - Header header = 1; - Commit commit = 2; -} - -message LightBlock { - SignedHeader signed_header = 1; - tendermint.types.ValidatorSet validator_set = 2; -} - -message BlockMeta { - BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - int64 block_size = 2; - Header header = 3 [(gogoproto.nullable) = false]; - int64 num_txs = 4; -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -message TxProof { - bytes root_hash = 1; - bytes data = 2; - tendermint.crypto.Proof proof = 3; -} diff --git a/third_party/proto/tendermint/types/validator.proto b/third_party/proto/tendermint/types/validator.proto deleted file mode 100644 index 49860b96d..000000000 --- a/third_party/proto/tendermint/types/validator.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/crypto/keys.proto"; - -message ValidatorSet { - repeated Validator validators = 1; - Validator proposer = 2; - int64 total_voting_power = 3; -} - -message Validator { - bytes address = 1; - tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -message SimpleValidator { - tendermint.crypto.PublicKey pub_key = 1; - int64 voting_power = 2; -} diff --git a/third_party/proto/tendermint/version/types.proto b/third_party/proto/tendermint/version/types.proto deleted file mode 100644 index 6061868bd..000000000 --- a/third_party/proto/tendermint/version/types.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package tendermint.version; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; - -import "gogoproto/gogo.proto"; - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -message App { - uint64 protocol = 1; - string software = 2; -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -message Consensus { - option (gogoproto.equal) = true; - - uint64 block = 1; - uint64 app = 2; -} diff --git a/types/utils.go b/types/utils.go index 07b03b7ca..278507222 100644 --- a/types/utils.go +++ b/types/utils.go @@ -12,21 +12,22 @@ import ( "strings" "time" - "github.com/cosmos/cosmos-sdk/simapp/helpers" + sdkmath "cosmossdk.io/math" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" ) // GetShareValue multiplies with truncation by receiving int amount and decimal ratio and returns int result. -func GetShareValue(amount sdk.Int, ratio sdk.Dec) sdk.Int { - return amount.ToDec().MulTruncate(ratio).TruncateInt() +func GetShareValue(amount sdkmath.Int, ratio sdkmath.LegacyDec) sdkmath.Int { + return sdkmath.LegacyNewDec(amount.Int64()).MulTruncate(ratio).TruncateInt() } -type StrIntMap map[string]sdk.Int +type StrIntMap map[string]sdkmath.Int // AddOrSet Set when the key not existed on the map or add existed value of the key. -func (m StrIntMap) AddOrSet(key string, value sdk.Int) { +func (m StrIntMap) AddOrSet(key string, value sdkmath.Int) { if _, ok := m[key]; !ok { m[key] = value } else { @@ -57,12 +58,12 @@ func DateRangeIncludes(startTime, endTime, targetTime time.Time) bool { } // ParseDec is a shortcut for sdk.MustNewDecFromStr. -func ParseDec(s string) sdk.Dec { - return sdk.MustNewDecFromStr(strings.ReplaceAll(s, "_", "")) +func ParseDec(s string) sdkmath.LegacyDec { + return sdkmath.LegacyMustNewDecFromStr(strings.ReplaceAll(s, "_", "")) } // ParseDecP is like ParseDec, but it returns a pointer to sdk.Dec. -func ParseDecP(s string) *sdk.Dec { +func ParseDecP(s string) *sdkmath.LegacyDec { d := ParseDec(s) return &d } @@ -114,15 +115,15 @@ func ParseTime(s string) time.Time { // DecApproxEqual returns true if a and b are approximately equal, // which means the diff ratio is equal or less than 0.1%. -func DecApproxEqual(a, b sdk.Dec) bool { +func DecApproxEqual(a, b sdkmath.LegacyDec) bool { if b.GT(a) { a, b = b, a } - return a.Sub(b).Quo(a).LTE(sdk.NewDecWithPrec(1, 3)) + return a.Sub(b).Quo(a).LTE(sdkmath.LegacyNewDecWithPrec(1, 3)) } // DecApproxSqrt returns an approximate estimation of x's square root. -func DecApproxSqrt(x sdk.Dec) (r sdk.Dec) { +func DecApproxSqrt(x sdkmath.LegacyDec) (r sdkmath.LegacyDec) { var err error r, err = x.ApproxSqrt() if err != nil { @@ -132,19 +133,20 @@ func DecApproxSqrt(x sdk.Dec) (r sdk.Dec) { } // RandomInt returns a random integer in the half-open interval [min, max). -func RandomInt(r *rand.Rand, min, max sdk.Int) sdk.Int { - return min.Add(sdk.NewIntFromBigInt(new(big.Int).Rand(r, max.Sub(min).BigInt()))) +func RandomInt(r *rand.Rand, min, max sdkmath.Int) sdkmath.Int { + return min.Add(sdkmath.NewIntFromBigInt(new(big.Int).Rand(r, max.Sub(min).BigInt()))) } // RandomDec returns a random decimal in the half-open interval [min, max). -func RandomDec(r *rand.Rand, min, max sdk.Dec) sdk.Dec { - return min.Add(sdk.NewDecFromBigIntWithPrec(new(big.Int).Rand(r, max.Sub(min).BigInt()), sdk.Precision)) +func RandomDec(r *rand.Rand, min, max sdkmath.LegacyDec) sdkmath.LegacyDec { + return min.Add(sdkmath.LegacyNewDecFromBigIntWithPrec(new(big.Int).Rand(r, max.Sub(min).BigInt()), sdkmath.LegacyPrecision)) } // GenAndDeliverTx generates a transactions and delivers it. func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins, gas uint64) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { account := txCtx.AccountKeeper.GetAccount(txCtx.Context, txCtx.SimAccount.Address) - tx, err := helpers.GenTx( + tx, err := simtestutil.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txCtx.TxGen, []sdk.Msg{txCtx.Msg}, fees, @@ -158,7 +160,7 @@ func GenAndDeliverTx(txCtx simulation.OperationInput, fees sdk.Coins, gas uint64 return simtypes.NoOpMsg(txCtx.ModuleName, txCtx.MsgType, "unable to generate mock tx"), nil, err } - _, _, err = txCtx.App.Deliver(txCtx.TxGen.TxEncoder(), tx) + _, _, err = txCtx.App.SimDeliver(txCtx.TxGen.TxEncoder(), tx) if err != nil { return simtypes.NoOpMsg(txCtx.ModuleName, txCtx.MsgType, "unable to deliver tx"), nil, err } @@ -173,7 +175,7 @@ func GenAndDeliverTxWithFees(txCtx simulation.OperationInput, gas uint64, fees s var err error - _, hasNeg := spendable.SafeSub(txCtx.CoinsSpentInMsg) + _, hasNeg := spendable.SafeSub(txCtx.CoinsSpentInMsg...) if hasNeg { return simtypes.NoOpMsg(txCtx.ModuleName, txCtx.MsgType, "message doesn't leave room for fees"), nil, err } diff --git a/x/asset/abci.go b/x/asset/abci.go index f7b3e278f..a856ae6f0 100644 --- a/x/asset/abci.go +++ b/x/asset/abci.go @@ -1,8 +1,8 @@ package asset import ( + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/asset/keeper" diff --git a/x/asset/client/cli/tx.go b/x/asset/client/cli/tx.go index 6c0530713..44c666bed 100644 --- a/x/asset/client/cli/tx.go +++ b/x/asset/client/cli/tx.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/spf13/cobra" flag "github.com/spf13/pflag" @@ -41,7 +41,11 @@ Sample json content return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateMultipleAssets(clientCtx, txf, cmd.Flags()) if err != nil { @@ -155,7 +159,11 @@ Sample json content return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateAssets(clientCtx, txf, cmd.Flags()) if err != nil { @@ -721,7 +729,11 @@ Sample json content return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateAssetInAppMsg(clientCtx, txf, cmd.Flags()) if err != nil { @@ -839,7 +851,11 @@ Sample json content return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateMultipleAssetsPairs(clientCtx, txf, cmd.Flags()) if err != nil { diff --git a/x/asset/client/proposal_handler.go b/x/asset/client/proposal_handler.go index 3b1162b19..4af4a2381 100644 --- a/x/asset/client/proposal_handler.go +++ b/x/asset/client/proposal_handler.go @@ -4,18 +4,17 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/comdex-official/comdex/x/asset/client/cli" - "github.com/comdex-official/comdex/x/asset/client/rest" ) var AddAssetsHandler = []govclient.ProposalHandler{ - govclient.NewProposalHandler(cli.NewCmdSubmitAddAssetsProposal, rest.AddNewAssetsProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitUpdateAssetProposal, rest.UpdateNewAssetProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitAddPairsProposal, rest.AddNewPairsProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitUpdatePairProposal, rest.UpdateNewPairProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitAddAppProposal, rest.AddNewAppProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitAddAssetInAppProposal, rest.AddNewAssetInAppProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitUpdateGovTimeInAppProposal, rest.UpdateNewGovTimeInAppProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitAddMultipleAssetsProposal, rest.AddNewAssetsProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitAddMultiplePairsProposal, rest.AddNewPairsProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdSubmitAddMultipleAssetsPairsProposal, rest.AddNewAssetsPairsProposalRESTHandler), + govclient.NewProposalHandler(cli.NewCmdSubmitAddAssetsProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitUpdateAssetProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitAddPairsProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitUpdatePairProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitAddAppProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitAddAssetInAppProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitUpdateGovTimeInAppProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitAddMultipleAssetsProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitAddMultiplePairsProposal), + govclient.NewProposalHandler(cli.NewCmdSubmitAddMultipleAssetsPairsProposal), } diff --git a/x/asset/client/rest/tx.go b/x/asset/client/rest/tx.go deleted file mode 100644 index cbc057862..000000000 --- a/x/asset/client/rest/tx.go +++ /dev/null @@ -1,139 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" -) - -type ( - UpdateNewAssetRequest struct{} - AddNewPairsRequest struct{} - UpdateNewPairRequest struct{} - AddNewAssetsPairs struct{} -) - -func AddNewAssetsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-new-assets", - Handler: AddNewAssetsRESTHandler(clientCtx), - } -} - -func AddNewAssetsPairsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-new-assets-pairs", - Handler: AddNewAssetsPairsRESTHandler(clientCtx), - } -} - -func UpdateNewAssetProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "update-new-asset", - Handler: UpdateNewAssetRESTHandler(clientCtx), - } -} - -func UpdateNewPairProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "update-new-pair", - Handler: UpdateNewPairsRESTHandler(clientCtx), - } -} - -func UpdateNewGovTimeInAppProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "update-gov-time-app", - Handler: UpdateGovTimeInAppRESTHandler(clientCtx), - } -} - -func AddNewPairsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-new-pairs", - Handler: AddNewPairsRESTHandler(clientCtx), - } -} - -func AddNewAssetsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req UpdateNewAssetRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddNewAssetsPairsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddNewAssetsPairs - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func UpdateNewAssetRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req UpdateNewAssetRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func UpdateGovTimeInAppRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req UpdateNewAssetRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddNewPairsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddNewPairsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func UpdateNewPairsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req UpdateNewPairRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddNewAppProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-new-app", - Handler: AddNewAssetsRESTHandler(clientCtx), - } -} - -func AddNewAssetInAppProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-update-new-asset-in-app", - Handler: AddNewAssetsRESTHandler(clientCtx), - } -} - -func AddExtendedPairsVaultProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-new-pairs-vault", - Handler: AddNewAssetsRESTHandler(clientCtx), - } -} diff --git a/x/asset/handler.go b/x/asset/handler.go index 8af17e5f5..8464c9476 100644 --- a/x/asset/handler.go +++ b/x/asset/handler.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/comdex-official/comdex/x/asset/keeper" "github.com/comdex-official/comdex/x/asset/types" diff --git a/x/asset/keeper/app.go b/x/asset/keeper/app.go index ffb509e79..d482b7f85 100644 --- a/x/asset/keeper/app.go +++ b/x/asset/keeper/app.go @@ -5,7 +5,7 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/x/asset/types" ) diff --git a/x/asset/keeper/asset.go b/x/asset/keeper/asset.go index d87819f62..befc6ffcb 100644 --- a/x/asset/keeper/asset.go +++ b/x/asset/keeper/asset.go @@ -4,7 +4,7 @@ import ( "regexp" sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/x/asset/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/x/asset/keeper/keeper.go b/x/asset/keeper/keeper.go index 3efe10ca7..771035188 100644 --- a/x/asset/keeper/keeper.go +++ b/x/asset/keeper/keeper.go @@ -7,12 +7,14 @@ import ( assettypes "github.com/comdex-official/comdex/x/asset/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/comdex-official/comdex/x/asset/expected" ) type Keeper struct { cdc codec.BinaryCodec - key sdk.StoreKey + key storetypes.StoreKey params paramstypes.Subspace account expected.AccountKeeper bank expected.BankKeeper @@ -23,7 +25,7 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, - key sdk.StoreKey, + key storetypes.StoreKey, params paramstypes.Subspace, account expected.AccountKeeper, bank expected.BankKeeper, diff --git a/x/asset/keeper/keeper_test.go b/x/asset/keeper/keeper_test.go index 60653fa22..0cd4b3b1e 100644 --- a/x/asset/keeper/keeper_test.go +++ b/x/asset/keeper/keeper_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" assetKeeper "github.com/comdex-official/comdex/x/asset/keeper" @@ -39,7 +39,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.vaultKeeper = s.app.VaultKeeper s.liquidationKeeper = s.app.LiquidationKeeper diff --git a/x/asset/keeper/pair.go b/x/asset/keeper/pair.go index 5f6ea843d..e94d592ce 100644 --- a/x/asset/keeper/pair.go +++ b/x/asset/keeper/pair.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/x/asset/types" ) diff --git a/x/asset/keeper/pairs_vault.go b/x/asset/keeper/pairs_vault.go index 24dc19c7a..a46730717 100644 --- a/x/asset/keeper/pairs_vault.go +++ b/x/asset/keeper/pairs_vault.go @@ -4,7 +4,7 @@ import ( "regexp" sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/app/wasm/bindings" rewardstypes "github.com/comdex-official/comdex/x/rewards/types" diff --git a/x/asset/module.go b/x/asset/module.go index 9629690ea..86ee035c8 100644 --- a/x/asset/module.go +++ b/x/asset/module.go @@ -3,8 +3,8 @@ package asset import ( "context" "encoding/json" - "math/rand" + abcitypes "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -14,7 +14,6 @@ import ( "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abcitypes "github.com/tendermint/tendermint/abci/types" "github.com/comdex-official/comdex/x/asset/client/cli" "github.com/comdex-official/comdex/x/asset/keeper" @@ -103,17 +102,12 @@ func (a AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawM func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -func (a AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(a.keeper)) -} - func (a AppModule) QuerierRoute() string { return types.QuerierRoute } -func (a AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return nil } - func (a AppModule) RegisterServices(configurator module.Configurator) { + types.RegisterMsgServer(configurator.MsgServer(), keeper.NewMsgServerImpl(a.keeper)) types.RegisterQueryServer(configurator.QueryServer(), keeper.NewQueryServer(a.keeper)) } @@ -131,9 +125,9 @@ func (a AppModule) ProposalContents(_ module.SimulationState) []simulation.Weigh return nil } -func (a AppModule) RandomizedParams(_ *rand.Rand) []simulation.ParamChange { - return nil -} +// func (a AppModule) RandomizedParams(_ *rand.Rand) []simulation.ParamChange { +// return nil +// } func (a AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/asset/types/app.pb.go b/x/asset/types/app.pb.go index 401221d82..721e616b4 100644 --- a/x/asset/types/app.pb.go +++ b/x/asset/types/app.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/asset/types/asset.pb.go b/x/asset/types/asset.pb.go index 417f4bb3c..2188b3963 100644 --- a/x/asset/types/asset.pb.go +++ b/x/asset/types/asset.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/asset/types/codec.go b/x/asset/types/codec.go index af9d8b77c..229a17992 100644 --- a/x/asset/types/codec.go +++ b/x/asset/types/codec.go @@ -6,7 +6,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { @@ -54,5 +54,6 @@ var ( func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/asset/types/events.pb.go b/x/asset/types/events.pb.go index f11a9bd0f..5c23689e0 100644 --- a/x/asset/types/events.pb.go +++ b/x/asset/types/events.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/asset/types/extendedPairVault.pb.go b/x/asset/types/extendedPairVault.pb.go index 1ff9cd077..031e27fe1 100644 --- a/x/asset/types/extendedPairVault.pb.go +++ b/x/asset/types/extendedPairVault.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -166,7 +166,7 @@ func (m *ExtendedPairVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) if err1 != nil { return 0, err1 } @@ -382,7 +382,7 @@ func (m *ExtendedPairVault) Size() (n int) { if m.BlockHeight != 0 { n += 2 + sovExtendedPairVault(uint64(m.BlockHeight)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) n += 2 + l + sovExtendedPairVault(uint64(l)) return n } @@ -895,7 +895,7 @@ func (m *ExtendedPairVault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/asset/types/genesis.pb.go b/x/asset/types/genesis.pb.go index 3490746b6..1f4bc3a99 100644 --- a/x/asset/types/genesis.pb.go +++ b/x/asset/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/asset/types/gov.go b/x/asset/types/gov.go index a533b061e..ed9ea95bd 100644 --- a/x/asset/types/gov.go +++ b/x/asset/types/gov.go @@ -1,7 +1,7 @@ package types import ( - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -19,34 +19,24 @@ const ( func init() { govtypes.RegisterProposalType(ProposalAddAssets) - govtypes.RegisterProposalTypeCodec(&AddAssetsProposal{}, "comdex/AddAssetsProposal") govtypes.RegisterProposalType(ProposalAddMultipleAssets) - govtypes.RegisterProposalTypeCodec(&AddMultipleAssetsProposal{}, "comdex/AddMultipleAssetsProposal") govtypes.RegisterProposalType(ProposalUpdateAsset) - govtypes.RegisterProposalTypeCodec(&UpdateAssetProposal{}, "comdex/UpdateAssetProposal") govtypes.RegisterProposalType(ProposalAddPairs) - govtypes.RegisterProposalTypeCodec(&AddPairsProposal{}, "comdex/AddPairsProposal") govtypes.RegisterProposalType(ProposalAddMultiplePairs) - govtypes.RegisterProposalTypeCodec(&AddMultiplePairsProposal{}, "comdex/AddMultiplePairsProposal") govtypes.RegisterProposalType(ProposalUpdatePair) - govtypes.RegisterProposalTypeCodec(&UpdatePairProposal{}, "comdex/UpdatePairProposal") govtypes.RegisterProposalType(ProposalUpdateGovTimeInApp) - govtypes.RegisterProposalTypeCodec(&UpdateGovTimeInAppProposal{}, "comdex/UpdateGovTimeInAppProposal") govtypes.RegisterProposalType(ProposalAddApp) - govtypes.RegisterProposalTypeCodec(&AddAppProposal{}, "comdex/AddAppProposal") govtypes.RegisterProposalType(ProposalAddAssetInApp) - govtypes.RegisterProposalTypeCodec(&AddAssetInAppProposal{}, "comdex/AddAssetInAppProposal") govtypes.RegisterProposalType(ProposalAddMultipleAssetsPairs) - govtypes.RegisterProposalTypeCodec(&AddMultipleAssetsPairsProposal{}, "comdex/AddMultipleAssetsPairsProposal") } var ( diff --git a/x/asset/types/gov.pb.go b/x/asset/types/gov.pb.go index bb7b38fa5..79c591060 100644 --- a/x/asset/types/gov.pb.go +++ b/x/asset/types/gov.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/asset/types/pair.pb.go b/x/asset/types/pair.pb.go index 45c132d80..4d4a60c1a 100644 --- a/x/asset/types/pair.pb.go +++ b/x/asset/types/pair.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/asset/types/params.pb.go b/x/asset/types/params.pb.go index 0ce4bcfd7..cf53f0690 100644 --- a/x/asset/types/params.pb.go +++ b/x/asset/types/params.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/asset/types/query.pb.go b/x/asset/types/query.pb.go index 8b263e4cd..8f7805152 100644 --- a/x/asset/types/query.pb.go +++ b/x/asset/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/asset/types/tx.pb.go b/x/asset/types/tx.pb.go index 8bab4ccc3..ed0fc05a6 100644 --- a/x/asset/types/tx.pb.go +++ b/x/asset/types/tx.pb.go @@ -6,9 +6,9 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/auction/keeper/debt_test.go b/x/auction/keeper/debt_test.go index c0db258f5..1adae3e5f 100644 --- a/x/auction/keeper/debt_test.go +++ b/x/auction/keeper/debt_test.go @@ -205,8 +205,8 @@ func (s *KeeperTestSuite) TestDebtActivator() { auctionMapData, auctionMappingFound := collectorKeeper.GetAuctionMappingForApp(*ctx, appId, collectorLookUp.CollectorAssetId) s.Require().True(auctionMappingFound) klswData := esmtypes.KillSwitchParams{ - 1, - false, + AppId: 1, + BreakerEnable: false, } err := collectorKeeper.SetNetFeeCollectedData(*ctx, uint64(1), 2, sdk.NewIntFromUint64(4700000)) s.Require().NoError(err) @@ -400,7 +400,7 @@ func (s *KeeperTestSuite) TestDebtBid() { s.Require().Equal(afterAuction.BiddingIds[tc.bidID-uint64(1)].BidId, tc.bidID) s.Require().Equal(afterAuction.BiddingIds[tc.bidID-uint64(1)].BidOwner, tc.msg.Bidder) if tc.bidID != uint64(1) { - s.Require().True(afterAuction.ExpectedMintedToken.Amount.LTE(beforeAuction.ExpectedMintedToken.Amount.ToDec().Mul(sdk.MustNewDecFromStr("1").Sub(beforeAuction.BidFactor)).TruncateInt())) + s.Require().True(afterAuction.ExpectedMintedToken.Amount.LTE(sdk.NewDec(beforeAuction.ExpectedMintedToken.Amount.Int64()).Mul(sdk.MustNewDecFromStr("1").Sub(beforeAuction.BidFactor)).TruncateInt())) } s.Require().Equal(beforeHarborBalance, afterHarborBalance) s.Require().Equal(beforeCmstBalance.Sub(expectedUserToken), afterCmstBalance) diff --git a/x/auction/keeper/dutch.go b/x/auction/keeper/dutch.go index 982a857a8..de4c4da4b 100644 --- a/x/auction/keeper/dutch.go +++ b/x/auction/keeper/dutch.go @@ -102,7 +102,7 @@ func (k Keeper) StartDutchAuction( outFlowTokenPrice = twaData.Twa // set target amount for debt inFlowTokenTargetAmount := lockedVault.AmountOut - mulfactor := inFlowTokenTargetAmount.ToDec().Mul(liquidationPenalty) + mulfactor := sdk.NewDec(inFlowTokenTargetAmount.Int64()).Mul(liquidationPenalty) inFlowTokenTargetAmount = inFlowTokenTargetAmount.Add(mulfactor.TruncateInt()).Add(lockedVault.InterestAccumulated) inFlowTokenTarget := sdk.NewCoin(inFlowToken.Denom, inFlowTokenTargetAmount) // These prices are in uusd diff --git a/x/auction/keeper/dutch_lend.go b/x/auction/keeper/dutch_lend.go index 91b599740..4276211d0 100644 --- a/x/auction/keeper/dutch_lend.go +++ b/x/auction/keeper/dutch_lend.go @@ -238,7 +238,7 @@ func (k Keeper) PlaceLendDutchAuctionBid(ctx sdk.Context, appID, auctionMappingI // calculating additional auction bonus to the bidder - auctionBonus := slice.ToDec().Mul(assetStats.LiquidationBonus) + auctionBonus := sdk.NewDec(slice.Int64()).Mul(assetStats.LiquidationBonus) totalAmountToBidder := sdk.NewCoin(auction.OutflowTokenInitAmount.Denom, slice.Add(auctionBonus.TruncateInt())) biddingID, err := k.CreateNewDutchLendBid(ctx, appID, auctionMappingID, auctionID, bidder.String(), inFlowTokenCoin, outFlowTokenCoin) diff --git a/x/auction/keeper/dutch_lend_test.go b/x/auction/keeper/dutch_lend_test.go index 3b637be9e..942919421 100644 --- a/x/auction/keeper/dutch_lend_test.go +++ b/x/auction/keeper/dutch_lend_test.go @@ -667,7 +667,7 @@ func (s *KeeperTestSuite) TestLiquidateBorrows() { updatedPrice := price.Sub(price.Mul(Dec("0.09090909090"))) s.Require().Equal(lockedVault[0].CollateralToBeAuctioned.TruncateInt(), updatedPrice.TruncateInt()) - s.Require().Equal(lockedVault[0].CrAtLiquidation, lockedVault[0].AmountOut.ToDec().Mul(s.GetAssetPrice(2)).Quo(beforeAmtIn.ToDec().Mul(s.GetAssetPrice(1)))) + s.Require().Equal(lockedVault[0].CrAtLiquidation, sdk.NewDec(lockedVault[0].AmountOut.Int64()).Mul(s.GetAssetPrice(2)).Quo(sdk.NewDec(beforeAmtIn.Int64()).Mul(s.GetAssetPrice(1)))) } func (s *KeeperTestSuite) TestDutchActivatorLend() { @@ -808,8 +808,8 @@ func (s *KeeperTestSuite) TestLendDutchBid() { s.Require().NoError(err) userBid, err := k.GetDutchLendUserBidding(*ctx, userAddress1, appID, biddingID) - userReceivableAmount := tc.msg.Amount.Amount.ToDec().Mul(beforeAuction.OutflowTokenCurrentPrice).Quo(beforeAuction.InflowTokenCurrentPrice).TruncateInt() - auctionBonus := userReceivableAmount.ToDec().Mul(Dec("0.005")) + userReceivableAmount := sdk.NewDec(tc.msg.Amount.Amount.Int64()).Mul(beforeAuction.OutflowTokenCurrentPrice).Quo(beforeAuction.InflowTokenCurrentPrice).TruncateInt() + auctionBonus := sdk.NewDec(userReceivableAmount.Int64()).Mul(Dec("0.005")) userOutflowCoin := sdk.NewCoin("ucmdx", userReceivableAmount) userOutflowCoinFinal := sdk.NewCoin("ucmdx", userReceivableAmount.Add(auctionBonus.TruncateInt())) userInflowCoin := tc.msg.Amount @@ -937,8 +937,8 @@ func (s *KeeperTestSuite) TestLendDutchBid3() { s.Require().NoError(err) userBid, err := k.GetDutchLendUserBidding(*ctx, userAddress1, appID, biddingID) - userReceivableAmount := tc.msg.Amount.Amount.ToDec().Mul(beforeAuction.OutflowTokenCurrentPrice).Quo(beforeAuction.InflowTokenCurrentPrice).TruncateInt() - auctionBonus := userReceivableAmount.ToDec().Mul(Dec("0.005")) + userReceivableAmount := sdk.NewDec(tc.msg.Amount.Amount.Int64()).Mul(beforeAuction.OutflowTokenCurrentPrice).Quo(beforeAuction.InflowTokenCurrentPrice).TruncateInt() + auctionBonus := sdk.NewDec(userReceivableAmount.Int64()).Mul(Dec("0.005")) userOutflowCoin := sdk.NewCoin("uosmo", userReceivableAmount) userOutflowCoinFinal := sdk.NewCoin("uosmo", userReceivableAmount.Add(auctionBonus.TruncateInt())) userInflowCoin := tc.msg.Amount diff --git a/x/auction/keeper/dutch_test.go b/x/auction/keeper/dutch_test.go index 4d5e26673..c5a37d399 100644 --- a/x/auction/keeper/dutch_test.go +++ b/x/auction/keeper/dutch_test.go @@ -267,7 +267,7 @@ func (s *KeeperTestSuite) LiquidateVaults1() { price, err := s.app.MarketKeeper.CalcAssetPrice(*ctx, uint64(1), beforeVault.AmountIn) s.Require().NoError(err) s.Require().Equal(lockedVault[0].CollateralToBeAuctioned, price) - s.Require().Equal(lockedVault[0].CrAtLiquidation, lockedVault[0].AmountIn.ToDec().Mul(s.GetAssetPrice(1)).Quo(lockedVault[0].AmountOut.ToDec().Mul(s.GetAssetPrice(2)))) + s.Require().Equal(lockedVault[0].CrAtLiquidation, sdk.NewDec(lockedVault[0].AmountIn.Int64()).Mul(s.GetAssetPrice(1)).Quo(sdk.NewDec(lockedVault[0].AmountOut.Int64()).Mul(s.GetAssetPrice(2)))) } func (s *KeeperTestSuite) AddAuctionParams() { @@ -317,7 +317,7 @@ func (s *KeeperTestSuite) TestDutchActivator() { s.Require().Equal(dutchAuction.InflowTokenCurrentAmount.Amount, sdk.ZeroInt()) inFlowTokenTargetAmount := lockedVault.AmountOut - mulfactor := inFlowTokenTargetAmount.ToDec().Mul(dutchAuction.LiquidationPenalty) + mulfactor := sdk.NewDec(inFlowTokenTargetAmount.Int64()).Mul(dutchAuction.LiquidationPenalty) inFlowTokenTargetAmount = inFlowTokenTargetAmount.Add(mulfactor.TruncateInt()).Add(lockedVault.InterestAccumulated) s.Require().Equal(dutchAuction.InflowTokenTargetAmount.Amount, inFlowTokenTargetAmount) @@ -439,7 +439,7 @@ func (s *KeeperTestSuite) TestDutchBid() { s.Require().NoError(err) userBid, err := k.GetDutchUserBidding(*ctx, userAddress1, appID, biddingID) - userReceivableAmount := tc.msg.Amount.Amount.ToDec().Mul(beforeAuction.OutflowTokenCurrentPrice).Quo(beforeAuction.InflowTokenCurrentPrice).TruncateInt() + userReceivableAmount := sdk.NewDec(tc.msg.Amount.Amount.Int64()).Mul(beforeAuction.OutflowTokenCurrentPrice).Quo(beforeAuction.InflowTokenCurrentPrice).TruncateInt() userOutflowCoin := sdk.NewCoin("ucmst", userReceivableAmount) userInflowCoin := tc.msg.Amount s.Require().Equal(beforeAuction.OutflowTokenCurrentAmount.Sub(userInflowCoin), afterAuction.OutflowTokenCurrentAmount) @@ -558,7 +558,7 @@ func (s *KeeperTestSuite) TestCloseDutchAuctionWithProtocolLoss() { // verify loss stats, found := k.GetProtocolStat(*ctx, appId, 2) s.Require().True(found) - loss := afterAuction.InflowTokenTargetAmount.Sub(afterAuction.InflowTokenCurrentAmount).Amount.ToDec() + loss := sdk.NewDec(afterAuction.InflowTokenTargetAmount.Sub(afterAuction.InflowTokenCurrentAmount).Amount.Int64()) s.Require().Equal(loss, stats.Loss) } diff --git a/x/auction/keeper/keeper.go b/x/auction/keeper/keeper.go index f0fbb12df..6a65b5110 100644 --- a/x/auction/keeper/keeper.go +++ b/x/auction/keeper/keeper.go @@ -3,9 +3,10 @@ package keeper import ( "fmt" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -16,8 +17,8 @@ import ( type ( Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey paramstore paramtypes.Subspace account expected.AccountKeeper bank expected.BankKeeper @@ -35,7 +36,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, ps paramtypes.Subspace, account expected.AccountKeeper, bank expected.BankKeeper, diff --git a/x/auction/keeper/keeper_test.go b/x/auction/keeper/keeper_test.go index d0a2457c7..542197c91 100644 --- a/x/auction/keeper/keeper_test.go +++ b/x/auction/keeper/keeper_test.go @@ -1,14 +1,15 @@ package keeper_test import ( - lendkeeper "github.com/comdex-official/comdex/x/lend/keeper" "testing" "time" + lendkeeper "github.com/comdex-official/comdex/x/lend/keeper" + "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" assetKeeper "github.com/comdex-official/comdex/x/asset/keeper" @@ -49,7 +50,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.vaultKeeper = s.app.VaultKeeper s.liquidationKeeper = s.app.LiquidationKeeper diff --git a/x/auction/keeper/math.go b/x/auction/keeper/math.go index dea4e43e1..eec3f73ab 100644 --- a/x/auction/keeper/math.go +++ b/x/auction/keeper/math.go @@ -9,7 +9,7 @@ func Multiply(a, b sdk.Dec) sdk.Dec { } func (k Keeper) getOutflowTokenInitialPrice(price sdk.Int, buffer sdk.Dec) sdk.Dec { - result := buffer.Mul(price.ToDec()) + result := buffer.Mul(sdk.NewDec(price.Int64())) return result } @@ -20,7 +20,7 @@ func (k Keeper) getOutflowTokenEndPrice(price, cusp sdk.Dec) sdk.Dec { func (k Keeper) getPriceFromLinearDecreaseFunction(top sdk.Dec, tau, dur sdk.Int) sdk.Dec { result1 := tau.Sub(dur) - result2 := top.Mul(result1.ToDec()) - result3 := result2.Quo(tau.ToDec()) + result2 := top.Mul(sdk.NewDec(result1.Int64())) + result3 := result2.Quo(sdk.NewDec(tau.Int64())) return result3 } diff --git a/x/auction/keeper/math_test.go b/x/auction/keeper/math_test.go index aa3fefbfc..cf05ed45e 100644 --- a/x/auction/keeper/math_test.go +++ b/x/auction/keeper/math_test.go @@ -9,7 +9,7 @@ import ( func getBurnAmount(amount sdk.Int, liqPenalty sdk.Dec) sdk.Int { liqPenalty = liqPenalty.Add(sdk.NewDec(1)) - result := amount.ToDec().Quo(liqPenalty).Ceil().TruncateInt() + result := sdk.NewDec(amount.Int64()).Quo(liqPenalty).Ceil().TruncateInt() return result } diff --git a/x/auction/keeper/store.go b/x/auction/keeper/store.go index e62e834af..624315159 100644 --- a/x/auction/keeper/store.go +++ b/x/auction/keeper/store.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" auctiontypes "github.com/comdex-official/comdex/x/auction/types" ) @@ -16,14 +16,14 @@ func (k Keeper) SetProtocolStatistics(ctx sdk.Context, appID, assetID uint64, am ) stat, found := k.GetProtocolStat(ctx, appID, assetID) if found { - stat.Loss = stat.Loss.Add(amount.ToDec()) + stat.Loss = stat.Loss.Add(sdk.NewDec(amount.Int64())) value := k.cdc.MustMarshal(&stat) store.Set(key, value) } else { var stats auctiontypes.ProtocolStatistics stats.AppId = appID stats.AssetId = assetID - stats.Loss = amount.ToDec() + stats.Loss = sdk.NewDec(amount.Int64()) value := k.cdc.MustMarshal(&stats) store.Set(key, value) } diff --git a/x/auction/keeper/surplus_test.go b/x/auction/keeper/surplus_test.go index 034bbdcd3..4a0b65aa9 100644 --- a/x/auction/keeper/surplus_test.go +++ b/x/auction/keeper/surplus_test.go @@ -250,7 +250,7 @@ func (s *KeeperTestSuite) TestSurplusBid() { s.Require().Equal(afterAuction.BiddingIds[tc.bidID-uint64(1)].BidId, tc.bidID) s.Require().Equal(afterAuction.BiddingIds[tc.bidID-uint64(1)].BidOwner, tc.msg.Bidder) if tc.bidID != uint64(1) { - s.Require().True(afterAuction.Bid.Amount.GTE(beforeAuction.Bid.Amount.ToDec().Mul(sdk.MustNewDecFromStr("1").Sub(beforeAuction.BidFactor)).TruncateInt())) + s.Require().True(afterAuction.Bid.Amount.GTE(sdk.NewDec(beforeAuction.Bid.Amount.Int64()).Mul(sdk.MustNewDecFromStr("1").Sub(beforeAuction.BidFactor)).TruncateInt())) } s.Require().Equal(beforeCmstBalance, afterCmstBalance) s.Require().Equal(beforeHarborBalance.Sub(bid), afterHarborBalance) diff --git a/x/auction/module.go b/x/auction/module.go index 883bd0ef2..be8e9039d 100644 --- a/x/auction/module.go +++ b/x/auction/module.go @@ -9,7 +9,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -129,19 +129,9 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(configurator module.Configurator) { diff --git a/x/auction/types/auction.pb.go b/x/auction/types/auction.pb.go index b3a51395e..982fc72cc 100644 --- a/x/auction/types/auction.pb.go +++ b/x/auction/types/auction.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -456,7 +456,7 @@ func (m *SurplusAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BidEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BidEndTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BidEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BidEndTime):]) if err1 != nil { return 0, err1 } @@ -520,7 +520,7 @@ func (m *SurplusAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x42 - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime):]) if err2 != nil { return 0, err2 } @@ -598,7 +598,7 @@ func (m *DebtAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BidEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BidEndTime):]) + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BidEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BidEndTime):]) if err6 != nil { return 0, err6 } @@ -686,7 +686,7 @@ func (m *DebtAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + n8, err8 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime):]) if err8 != nil { return 0, err8 } @@ -818,7 +818,7 @@ func (m *DutchAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x6a } } - n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + n12, err12 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err12 != nil { return 0, err12 } @@ -831,7 +831,7 @@ func (m *DutchAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x58 } - n13, err13 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + n13, err13 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime):]) if err13 != nil { return 0, err13 } @@ -1126,7 +1126,7 @@ func (m *SurplusAuction) Size() (n int) { } l = m.Bid.Size() n += 1 + l + sovAuction(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime) n += 1 + l + sovAuction(uint64(l)) l = m.BidFactor.Size() n += 1 + l + sovAuction(uint64(l)) @@ -1154,7 +1154,7 @@ func (m *SurplusAuction) Size() (n int) { if m.AssetOutId != 0 { n += 1 + sovAuction(uint64(m.AssetOutId)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BidEndTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BidEndTime) n += 2 + l + sovAuction(uint64(l)) return n } @@ -1174,7 +1174,7 @@ func (m *DebtAuction) Size() (n int) { n += 1 + l + sovAuction(uint64(l)) l = m.ExpectedMintedToken.Size() n += 1 + l + sovAuction(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime) n += 1 + l + sovAuction(uint64(l)) if m.ActiveBiddingId != 0 { n += 1 + sovAuction(uint64(m.ActiveBiddingId)) @@ -1211,7 +1211,7 @@ func (m *DebtAuction) Size() (n int) { if m.AssetOutId != 0 { n += 2 + sovAuction(uint64(m.AssetOutId)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BidEndTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BidEndTime) n += 2 + l + sovAuction(uint64(l)) return n } @@ -1241,12 +1241,12 @@ func (m *DutchAuction) Size() (n int) { n += 1 + l + sovAuction(uint64(l)) l = m.InflowTokenCurrentPrice.Size() n += 1 + l + sovAuction(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime) n += 1 + l + sovAuction(uint64(l)) if m.AuctionStatus != 0 { n += 1 + sovAuction(uint64(m.AuctionStatus)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovAuction(uint64(l)) if len(m.BiddingIds) > 0 { for _, e := range m.BiddingIds { @@ -1580,7 +1580,7 @@ func (m *SurplusAuction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1795,7 +1795,7 @@ func (m *SurplusAuction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BidEndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BidEndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1996,7 +1996,7 @@ func (m *DebtAuction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2295,7 +2295,7 @@ func (m *DebtAuction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BidEndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BidEndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2665,7 +2665,7 @@ func (m *DutchAuction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2717,7 +2717,7 @@ func (m *DutchAuction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/auction/types/biddings.pb.go b/x/auction/types/biddings.pb.go index 2767b7031..dbbab8d38 100644 --- a/x/auction/types/biddings.pb.go +++ b/x/auction/types/biddings.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -261,7 +261,7 @@ func (m *SurplusBiddings) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BiddingTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BiddingTimestamp):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BiddingTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BiddingTimestamp):]) if err1 != nil { return 0, err1 } @@ -353,7 +353,7 @@ func (m *DebtBiddings) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BiddingTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BiddingTimestamp):]) + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BiddingTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BiddingTimestamp):]) if err4 != nil { return 0, err4 } @@ -445,7 +445,7 @@ func (m *DutchBiddings) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x42 } - n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BiddingTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BiddingTimestamp):]) + n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BiddingTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BiddingTimestamp):]) if err7 != nil { return 0, err7 } @@ -535,7 +535,7 @@ func (m *SurplusBiddings) Size() (n int) { } l = m.Bid.Size() n += 1 + l + sovBiddings(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BiddingTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BiddingTimestamp) n += 1 + l + sovBiddings(uint64(l)) l = len(m.BiddingStatus) if l > 0 { @@ -574,7 +574,7 @@ func (m *DebtBiddings) Size() (n int) { } l = m.Bid.Size() n += 1 + l + sovBiddings(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BiddingTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BiddingTimestamp) n += 1 + l + sovBiddings(uint64(l)) l = len(m.BiddingStatus) if l > 0 { @@ -613,7 +613,7 @@ func (m *DutchBiddings) Size() (n int) { if l > 0 { n += 1 + l + sovBiddings(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BiddingTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BiddingTimestamp) n += 1 + l + sovBiddings(uint64(l)) l = len(m.BiddingStatus) if l > 0 { @@ -860,7 +860,7 @@ func (m *SurplusBiddings) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BiddingTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BiddingTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1181,7 +1181,7 @@ func (m *DebtBiddings) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BiddingTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BiddingTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1502,7 +1502,7 @@ func (m *DutchBiddings) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BiddingTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BiddingTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/auction/types/codec.go b/x/auction/types/codec.go index dbc24b83b..79d67cc61 100644 --- a/x/auction/types/codec.go +++ b/x/auction/types/codec.go @@ -34,5 +34,6 @@ var ( func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/auction/types/genesis.pb.go b/x/auction/types/genesis.pb.go index 99082bc32..b36f2176b 100644 --- a/x/auction/types/genesis.pb.go +++ b/x/auction/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/auction/types/params.pb.go b/x/auction/types/params.pb.go index e1c743254..28075dcae 100644 --- a/x/auction/types/params.pb.go +++ b/x/auction/types/params.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/auction/types/query.pb.go b/x/auction/types/query.pb.go index 4017bc744..94ff53c34 100644 --- a/x/auction/types/query.pb.go +++ b/x/auction/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/auction/types/tx.pb.go b/x/auction/types/tx.pb.go index 7a3389403..cbb696b7b 100644 --- a/x/auction/types/tx.pb.go +++ b/x/auction/types/tx.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/auctionsV2/client/cli/tx.go b/x/auctionsV2/client/cli/tx.go index 33c5c29b5..6eab6d149 100644 --- a/x/auctionsV2/client/cli/tx.go +++ b/x/auctionsV2/client/cli/tx.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" flag "github.com/spf13/pflag" "strconv" "time" @@ -213,7 +213,11 @@ func NewAddAuctionParamsProposal() *cobra.Command { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := AddAuctionParams(clientCtx, txf, cmd.Flags()) if err != nil { diff --git a/x/auctionsV2/client/proposal_handlers.go b/x/auctionsV2/client/proposal_handlers.go index e5f258eee..3915ab920 100644 --- a/x/auctionsV2/client/proposal_handlers.go +++ b/x/auctionsV2/client/proposal_handlers.go @@ -2,10 +2,9 @@ package client import ( "github.com/comdex-official/comdex/x/auctionsV2/client/cli" - "github.com/comdex-official/comdex/x/auctionsV2/client/rest" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" ) var AuctionsV2Handler = []govclient.ProposalHandler{ - govclient.NewProposalHandler(cli.NewAddAuctionParamsProposal, rest.AddAuctionParamsRESTHandler), + govclient.NewProposalHandler(cli.NewAddAuctionParamsProposal), } diff --git a/x/auctionsV2/client/rest/tx.go b/x/auctionsV2/client/rest/tx.go deleted file mode 100644 index 536802169..000000000 --- a/x/auctionsV2/client/rest/tx.go +++ /dev/null @@ -1,29 +0,0 @@ -package rest - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - "net/http" -) - -type ( - AddAuctionParamsRequest struct{} -) - -func AddAuctionParamsRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-auction-params", - Handler: AuctionParamsRequestRESTHandler(clientCtx), - } -} - -func AuctionParamsRequestRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddAuctionParamsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} diff --git a/x/auctionsV2/handler.go b/x/auctionsV2/handler.go index 62fc4272a..b9a519b5f 100644 --- a/x/auctionsV2/handler.go +++ b/x/auctionsV2/handler.go @@ -5,7 +5,7 @@ import ( "github.com/comdex-official/comdex/x/auctionsV2/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func NewHandler(k keeper.Keeper) sdk.Handler { diff --git a/x/auctionsV2/keeper/auctions.go b/x/auctionsV2/keeper/auctions.go index 6eedb19db..c835f0be9 100644 --- a/x/auctionsV2/keeper/auctions.go +++ b/x/auctionsV2/keeper/auctions.go @@ -411,12 +411,12 @@ func (k Keeper) CloseEnglishAuction(ctx sdk.Context, englishAuction types.Auctio //send newly minted token((collateral)) to the user // send debt to collector to get added //set net fees data - err = k.tokenMint.MintNewTokensForApp(ctx, englishAuction.AppId, englishAuction.DebtAssetId, bidding.BidderAddress, englishAuction.DebtToken.Amount) + err = k.tokenMint.MintNewTokensForApp(ctx, englishAuction.AppId, englishAuction.DebtAssetId, bidding.BidderAddress, englishAuction.CollateralToken.Amount) if err != nil { return err } - err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, auctionsV2types.ModuleName, collectortypes.ModuleName, sdk.NewCoins(englishAuction.CollateralToken)) + err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, auctionsV2types.ModuleName, collectortypes.ModuleName, sdk.NewCoins(englishAuction.DebtToken)) if err != nil { return err } diff --git a/x/auctionsV2/keeper/bid.go b/x/auctionsV2/keeper/bid.go index 1fdcecd58..ac1fc3139 100644 --- a/x/auctionsV2/keeper/bid.go +++ b/x/auctionsV2/keeper/bid.go @@ -8,7 +8,7 @@ import ( collectortypes "github.com/comdex-official/comdex/x/collector/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" ) func (k Keeper) PlaceDutchAuctionBid(ctx sdk.Context, auctionID uint64, bidder string, bid sdk.Coin, auctionData types.Auction, isAutoBid bool) (bidId uint64, err error) { diff --git a/x/auctionsV2/keeper/keeper.go b/x/auctionsV2/keeper/keeper.go index b589c39f9..4e27f16f4 100644 --- a/x/auctionsV2/keeper/keeper.go +++ b/x/auctionsV2/keeper/keeper.go @@ -5,17 +5,18 @@ import ( "github.com/comdex-official/comdex/x/auctionsV2/expected" "github.com/comdex-official/comdex/x/auctionsV2/types" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/tendermint/tendermint/libs/log" ) type ( Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey paramstore paramtypes.Subspace LiquidationsV2 expected.LiquidationsV2Keeper bankKeeper expected.BankKeeper @@ -31,7 +32,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, ps paramtypes.Subspace, LiquidationsV2Keeper expected.LiquidationsV2Keeper, bankKeeper expected.BankKeeper, diff --git a/x/auctionsV2/keeper/keeper_test.go b/x/auctionsV2/keeper/keeper_test.go index e58a7ee66..15e4978c9 100644 --- a/x/auctionsV2/keeper/keeper_test.go +++ b/x/auctionsV2/keeper/keeper_test.go @@ -17,9 +17,9 @@ import ( tokenmintKeeper "github.com/comdex-official/comdex/x/tokenmint/keeper" vaultKeeper "github.com/comdex-official/comdex/x/vault/keeper" vaultTypes "github.com/comdex-official/comdex/x/vault/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "testing" ) @@ -49,7 +49,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.vaultKeeper = s.app.VaultKeeper s.liquidationKeeper = s.app.NewliqKeeper diff --git a/x/auctionsV2/keeper/maths.go b/x/auctionsV2/keeper/maths.go index 0a0b0fa2a..4c1cb1386 100644 --- a/x/auctionsV2/keeper/maths.go +++ b/x/auctionsV2/keeper/maths.go @@ -7,14 +7,14 @@ func Multiply(a, b sdk.Dec) sdk.Dec { } func (k Keeper) GetCollalteralTokenInitialPrice(price sdk.Int, premium sdk.Dec) sdk.Dec { - result := premium.Mul(price.ToDec()) + result := premium.Mul(sdk.NewDec(price.Int64())) return result } func (k Keeper) GetPriceFromLinearDecreaseFunction(CollateralTokenAuctionPrice sdk.Dec, timeToReachZeroPrice, timeElapsed sdk.Int) sdk.Dec { timeDifference := timeToReachZeroPrice.Sub(timeElapsed) - resultantPrice := CollateralTokenAuctionPrice.Mul(timeDifference.ToDec()) - currentPrice := resultantPrice.Quo(timeToReachZeroPrice.ToDec()) + resultantPrice := CollateralTokenAuctionPrice.Mul(sdk.NewDec(timeDifference.Int64())) + currentPrice := resultantPrice.Quo(sdk.NewDec(timeToReachZeroPrice.Int64())) return currentPrice } diff --git a/x/auctionsV2/keeper/msg_server_test.go b/x/auctionsV2/keeper/msg_server_test.go index d63736f1e..b38b75ff3 100644 --- a/x/auctionsV2/keeper/msg_server_test.go +++ b/x/auctionsV2/keeper/msg_server_test.go @@ -289,8 +289,8 @@ func (s *KeeperTestSuite) TestLiquidateVaults() { s.Require().Equal(lockedVault[0].Owner, beforeVault.Owner) s.Require().Equal(lockedVault[0].CollateralToken.Amount, beforeVault.AmountIn) s.Require().Equal(lockedVault[0].DebtToken.Amount, beforeVault.AmountOut) - s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(beforeVault.AmountOut.ToDec().Mul(newDec("0.12")).TruncateInt())) - s.Require().Equal(lockedVault[0].FeeToBeCollected, beforeVault.AmountOut.ToDec().Mul(newDec("0.12")).TruncateInt()) + s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(sdk.NewDec(beforeVault.AmountOut.Int64()).Mul(newDec("0.12")).TruncateInt())) + s.Require().Equal(lockedVault[0].FeeToBeCollected, sdk.NewDec(beforeVault.AmountOut.Int64()).Mul(newDec("0.12")).TruncateInt()) s.Require().Equal(lockedVault[0].IsDebtCmst, false) s.Require().Equal(lockedVault[0].CollateralAssetId, uint64(2)) s.Require().Equal(lockedVault[0].DebtAssetId, uint64(3)) @@ -363,8 +363,8 @@ func (s *KeeperTestSuite) TestLiquidateBorrows() { s.Require().Equal(lockedVault[0].Owner, beforeLend.Owner) s.Require().Equal(lockedVault[0].CollateralToken.Amount, beforeBorrow.AmountIn.Amount) s.Require().Equal(lockedVault[0].DebtToken.Amount, beforeBorrow.AmountOut.Amount) - s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(beforeBorrow.AmountOut.Amount.ToDec().Mul(newDec("0.05")).TruncateInt())) - s.Require().Equal(lockedVault[0].FeeToBeCollected, beforeBorrow.AmountOut.Amount.ToDec().Mul(newDec("0.05")).TruncateInt()) + s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(sdk.NewDec(beforeBorrow.AmountOut.Amount.Int64()).Mul(newDec("0.05")).TruncateInt())) + s.Require().Equal(lockedVault[0].FeeToBeCollected, sdk.NewDec(beforeBorrow.AmountOut.Amount.Int64()).Mul(newDec("0.05")).TruncateInt()) s.Require().Equal(lockedVault[0].IsDebtCmst, false) s.Require().Equal(lockedVault[0].CollateralAssetId, uint64(1)) s.Require().Equal(lockedVault[0].DebtAssetId, uint64(2)) @@ -754,25 +754,25 @@ func (s *KeeperTestSuite) TestDebtAuctionBid() { }, { Name: "bidding amount is greater than maximum bidding amount", - Msg: *auctionsV2types.NewMsgPlaceMarketBid(bidder, 1, sdk.NewCoin("uasset2", sdk.NewInt(53000000))), + Msg: *auctionsV2types.NewMsgPlaceMarketBid(bidder, 1, sdk.NewCoin("uasset3", sdk.NewInt(53000000))), ExpErr: auctionsV2types.ErrorMaxBidAmount, ExpResp: nil, }, { Name: "success valid case", - Msg: *auctionsV2types.NewMsgPlaceMarketBid(bidder, 1, sdk.NewCoin("uasset2", sdk.NewInt(200000))), + Msg: *auctionsV2types.NewMsgPlaceMarketBid(bidder, 1, sdk.NewCoin("uasset3", sdk.NewInt(200000))), ExpErr: nil, ExpResp: &auctionsV2types.MsgPlaceMarketBidResponse{}, }, { Name: "bid should be less than or equal to 180000", - Msg: *auctionsV2types.NewMsgPlaceMarketBid(bidder, 1, sdk.NewCoin("uasset2", sdk.NewInt(200000))), + Msg: *auctionsV2types.NewMsgPlaceMarketBid(bidder, 1, sdk.NewCoin("uasset3", sdk.NewInt(200000))), ExpErr: fmt.Errorf("bid should be less than or equal to 180000 : not found"), ExpResp: nil, }, { Name: "success valid case 2", - Msg: *auctionsV2types.NewMsgPlaceMarketBid(bidder, 1, sdk.NewCoin("uasset2", sdk.NewInt(180000))), + Msg: *auctionsV2types.NewMsgPlaceMarketBid(bidder, 1, sdk.NewCoin("uasset3", sdk.NewInt(180000))), ExpErr: nil, ExpResp: &auctionsV2types.MsgPlaceMarketBidResponse{}, }, diff --git a/x/auctionsV2/keeper/utils.go b/x/auctionsV2/keeper/utils.go index f01b5e630..a4f3bca69 100644 --- a/x/auctionsV2/keeper/utils.go +++ b/x/auctionsV2/keeper/utils.go @@ -4,7 +4,7 @@ import ( "github.com/comdex-official/comdex/x/auctionsV2/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" ) func (k Keeper) SetAuctionID(ctx sdk.Context, id uint64) { diff --git a/x/auctionsV2/module.go b/x/auctionsV2/module.go index f068e909c..8ba4e5e62 100644 --- a/x/auctionsV2/module.go +++ b/x/auctionsV2/module.go @@ -4,13 +4,14 @@ import ( "context" "encoding/json" "fmt" + // this line is used by starport scaffolding # 1 "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/comdex-official/comdex/x/auctionsV2/client/cli" "github.com/comdex-official/comdex/x/auctionsV2/expected" @@ -117,22 +118,13 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) } diff --git a/x/auctionsV2/module_simulation.go b/x/auctionsV2/module_simulation.go index 2a2527763..bda25b1ea 100644 --- a/x/auctionsV2/module_simulation.go +++ b/x/auctionsV2/module_simulation.go @@ -1,13 +1,11 @@ package auctionsV2 import ( - "math/rand" - "github.com/comdex-official/comdex/testutil/sample" newaucsimulation "github.com/comdex-official/comdex/x/auctionsV2/simulation" "github.com/comdex-official/comdex/x/auctionsV2/types" "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -46,10 +44,10 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RandomizedParams creates randomized param changes for the simulator -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +// func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} -} +// return []simtypes.ParamChange{} +// } // RegisterStoreDecoder registers a decoder func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/auctionsV2/types/auction.pb.go b/x/auctionsV2/types/auction.pb.go index 5666c6dd9..8e172c909 100644 --- a/x/auctionsV2/types/auction.pb.go +++ b/x/auctionsV2/types/auction.pb.go @@ -8,9 +8,9 @@ import ( types "github.com/comdex-official/comdex/x/liquidationsV2/types" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -689,7 +689,7 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x68 } - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime):]) if err3 != nil { return 0, err3 } @@ -697,7 +697,7 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintAuction(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x62 - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err4 != nil { return 0, err4 } @@ -1081,9 +1081,9 @@ func (m *Auction) Size() (n int) { if m.LockedVaultId != 0 { n += 1 + sovAuction(uint64(m.LockedVaultId)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovAuction(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime) n += 1 + l + sovAuction(uint64(l)) if m.AppId != 0 { n += 1 + sovAuction(uint64(m.AppId)) @@ -1659,7 +1659,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1692,7 +1692,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/auctionsV2/types/bid.pb.go b/x/auctionsV2/types/bid.pb.go index 145869867..35fa4a2a4 100644 --- a/x/auctionsV2/types/bid.pb.go +++ b/x/auctionsV2/types/bid.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -221,7 +221,7 @@ type AuctionParams struct { ClosingFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=closing_fee,json=closingFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"closing_fee" yaml:"closing_fee"` MinUsdValueLeft uint64 `protobuf:"varint,5,opt,name=min_usd_value_left,json=minUsdValueLeft,proto3" json:"min_usd_value_left,omitempty" yaml:"min_usd_value_left"` BidFactor github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=bid_factor,json=bidFactor,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"bid_factor" yaml:"bid_factor"` - //For external apps + // For external apps LiquidationPenalty github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=liquidation_penalty,json=liquidationPenalty,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"liquidation_penalty" yaml:"liquidation_penalty"` AuctionBonus github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=auction_bonus,json=auctionBonus,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"auction_bonus" yaml:"auction_bonus"` } @@ -550,7 +550,7 @@ func (m *Bid) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BiddingTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BiddingTimestamp):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BiddingTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BiddingTimestamp):]) if err1 != nil { return 0, err1 } @@ -935,7 +935,7 @@ func (m *Bid) Size() (n int) { if l > 0 { n += 1 + l + sovBid(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BiddingTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BiddingTimestamp) n += 1 + l + sovBid(uint64(l)) if m.AppId != 0 { n += 1 + sovBid(uint64(m.AppId)) @@ -1260,7 +1260,7 @@ func (m *Bid) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BiddingTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BiddingTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/auctionsV2/types/codec.go b/x/auctionsV2/types/codec.go index 35b9c52d6..3b77a28f0 100644 --- a/x/auctionsV2/types/codec.go +++ b/x/auctionsV2/types/codec.go @@ -6,7 +6,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { @@ -40,5 +40,6 @@ var ( func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/auctionsV2/types/genesis.pb.go b/x/auctionsV2/types/genesis.pb.go index f7757d334..9bb68929c 100644 --- a/x/auctionsV2/types/genesis.pb.go +++ b/x/auctionsV2/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/auctionsV2/types/gov.go b/x/auctionsV2/types/gov.go index c2ac6281d..4c2841fb9 100644 --- a/x/auctionsV2/types/gov.go +++ b/x/auctionsV2/types/gov.go @@ -1,7 +1,7 @@ package types import ( - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -10,7 +10,6 @@ const ( func init() { govtypes.RegisterProposalType(ProposalDutchAutoBidParams) - govtypes.RegisterProposalTypeCodec(&DutchAutoBidParamsProposal{}, "comdex/AddDutchAutoBidParamsProposal") } var ( diff --git a/x/auctionsV2/types/gov.pb.go b/x/auctionsV2/types/gov.pb.go index febe11e3e..79e9357ea 100644 --- a/x/auctionsV2/types/gov.pb.go +++ b/x/auctionsV2/types/gov.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/auctionsV2/types/params.pb.go b/x/auctionsV2/types/params.pb.go index 64e5f8ff0..7e55af0bf 100644 --- a/x/auctionsV2/types/params.pb.go +++ b/x/auctionsV2/types/params.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/auctionsV2/types/query.pb.go b/x/auctionsV2/types/query.pb.go index 90249ce88..9cc3cb233 100644 --- a/x/auctionsV2/types/query.pb.go +++ b/x/auctionsV2/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/auctionsV2/types/tx.pb.go b/x/auctionsV2/types/tx.pb.go index 206ec8877..b2d9b7ac0 100644 --- a/x/auctionsV2/types/tx.pb.go +++ b/x/auctionsV2/types/tx.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/bandoracle/abci.go b/x/bandoracle/abci.go index 8933f8fea..270093bc0 100644 --- a/x/bandoracle/abci.go +++ b/x/bandoracle/abci.go @@ -1,9 +1,9 @@ package bandoracle import ( + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" "github.com/comdex-official/comdex/x/bandoracle/keeper" "github.com/comdex-official/comdex/x/bandoracle/types" @@ -14,8 +14,8 @@ func BeginBlocker(ctx sdk.Context, _ abci.RequestBeginBlock, k keeper.Keeper) { block := k.GetLastBlockHeight(ctx) if block != types.Int64Zero { - // if ctx.BlockHeight()%types.Int64Twenty == types.Int64Zero && ctx.BlockHeight() != block { - if ctx.BlockHeight()%types.Int64Twenty == types.Int64Zero { + // if ctx.BlockHeight()%types.Int64Forty == types.Int64Zero && ctx.BlockHeight() != block { + if ctx.BlockHeight()%types.Int64Forty == types.Int64Zero { if !k.GetCheckFlag(ctx) { msg := k.GetFetchPriceMsg(ctx) _, err := k.FetchPrice(ctx, msg) diff --git a/x/bandoracle/client/cli/tx.go b/x/bandoracle/client/cli/tx.go index 05c5f4491..9a956401a 100644 --- a/x/bandoracle/client/cli/tx.go +++ b/x/bandoracle/client/cli/tx.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/spf13/cobra" "github.com/comdex-official/comdex/x/bandoracle/types" diff --git a/x/bandoracle/client/proposal_handler.go b/x/bandoracle/client/proposal_handler.go index 754c872f5..364d7e470 100644 --- a/x/bandoracle/client/proposal_handler.go +++ b/x/bandoracle/client/proposal_handler.go @@ -4,7 +4,6 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/comdex-official/comdex/x/bandoracle/client/cli" - "github.com/comdex-official/comdex/x/bandoracle/client/rest" ) -var AddFetchPriceHandler = govclient.NewProposalHandler(cli.NewCmdSubmitFetchPriceProposal, rest.SubmitFetchPriceProposalRESTHandler) +var AddFetchPriceHandler = govclient.NewProposalHandler(cli.NewCmdSubmitFetchPriceProposal) diff --git a/x/bandoracle/client/rest/tx.go b/x/bandoracle/client/rest/tx.go deleted file mode 100644 index be3711d82..000000000 --- a/x/bandoracle/client/rest/tx.go +++ /dev/null @@ -1,28 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" -) - -type UpdateNewPairRequest struct{} - -func SubmitFetchPriceProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "fetch-price", - Handler: FetchPriceRESTHandler(clientCtx), - } -} - -func FetchPriceRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req UpdateNewPairRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} diff --git a/x/bandoracle/expected/keeper.go b/x/bandoracle/expected/keeper.go index 6818d61f5..183ad9c7d 100644 --- a/x/bandoracle/expected/keeper.go +++ b/x/bandoracle/expected/keeper.go @@ -3,8 +3,9 @@ package expected import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v4/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + // ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" assettypes "github.com/comdex-official/comdex/x/asset/types" marketttypes "github.com/comdex-official/comdex/x/market/types" @@ -22,7 +23,7 @@ type AssetKeeper interface { type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) - SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error + SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (uint64, error) } // PortKeeper defines the expected IBC port keeper diff --git a/x/bandoracle/handler.go b/x/bandoracle/handler.go index e2f199a24..7b0ea5d40 100644 --- a/x/bandoracle/handler.go +++ b/x/bandoracle/handler.go @@ -3,7 +3,7 @@ package bandoracle import ( "fmt" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/pkg/errors" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/bandoracle/keeper/keeper.go b/x/bandoracle/keeper/keeper.go index 19f50fbe0..f1811c423 100644 --- a/x/bandoracle/keeper/keeper.go +++ b/x/bandoracle/keeper/keeper.go @@ -4,14 +4,15 @@ import ( "fmt" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" assetkeeper "github.com/comdex-official/comdex/x/asset/keeper" "github.com/comdex-official/comdex/x/bandoracle/expected" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -21,8 +22,8 @@ import ( type ( Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey paramstore paramtypes.Subspace market expected.MarketKeeper assetKeeper assetkeeper.Keeper @@ -35,7 +36,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, ps paramtypes.Subspace, channelKeeper expected.ChannelKeeper, portKeeper expected.PortKeeper, diff --git a/x/bandoracle/keeper/oracle.go b/x/bandoracle/keeper/oracle.go index 2bc612af6..a04e3b666 100644 --- a/x/bandoracle/keeper/oracle.go +++ b/x/bandoracle/keeper/oracle.go @@ -7,10 +7,11 @@ import ( "github.com/bandprotocol/bandchain-packet/packet" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" - protobuftypes "github.com/gogo/protobuf/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + + // channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + protobuftypes "github.com/cosmos/gogoproto/types" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" "github.com/comdex-official/comdex/x/bandoracle/types" ) @@ -50,18 +51,18 @@ func (k Keeper) SetLastFetchPriceID(ctx sdk.Context, id types.OracleRequestID) { func (k Keeper) FetchPrice(ctx sdk.Context, msg types.MsgFetchPriceData) (*types.MsgFetchPriceDataResponse, error) { sourcePort := types.PortID - sourceChannelEnd, found := k.channelKeeper.GetChannel(ctx, sourcePort, msg.SourceChannel) - if !found { - return nil, nil - } - destinationPort := sourceChannelEnd.GetCounterparty().GetPortID() - destinationChannel := sourceChannelEnd.GetCounterparty().GetChannelID() - - // get the next sequence - sequence, found := k.channelKeeper.GetNextSequenceSend(ctx, sourcePort, msg.SourceChannel) - if !found { - return nil, nil - } + // sourceChannelEnd, found := k.channelKeeper.GetChannel(ctx, sourcePort, msg.SourceChannel) + // if !found { + // return nil, nil + // } + // destinationPort := sourceChannelEnd.GetCounterparty().GetPortID() + // destinationChannel := sourceChannelEnd.GetCounterparty().GetChannelID() + + // // get the next sequence + // sequence, found := k.channelKeeper.GetNextSequenceSend(ctx, sourcePort, msg.SourceChannel) + // if !found { + // return nil, nil + // } channelCap, ok := k.scopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(sourcePort, msg.SourceChannel)) if !ok { @@ -88,16 +89,24 @@ func (k Keeper) FetchPrice(ctx sdk.Context, msg types.MsgFetchPriceData) (*types msg.PrepareGas, msg.ExecuteGas, ) - err := k.channelKeeper.SendPacket(ctx, channelCap, channeltypes.NewPacket( - packetData.GetBytes(), - sequence, + // err := k.channelKeeper.SendPacket(ctx, channelCap, channeltypes.NewPacket( + // packetData.GetBytes(), + // sequence, + // sourcePort, + // msg.SourceChannel, + // destinationPort, + // destinationChannel, + // clienttypes.NewHeight(0, 0), + // uint64(ctx.BlockTime().UnixNano()+int64(10*time.Minute)), // Arbitrary timestamp timeout for now + // )) + _, err := k.channelKeeper.SendPacket(ctx, + channelCap, sourcePort, msg.SourceChannel, - destinationPort, - destinationChannel, clienttypes.NewHeight(0, 0), uint64(ctx.BlockTime().UnixNano()+int64(10*time.Minute)), // Arbitrary timestamp timeout for now - )) + packetData.GetBytes(), + ) if err != nil { return nil, nil } diff --git a/x/bandoracle/module.go b/x/bandoracle/module.go index 06947b60e..3173cb7a2 100644 --- a/x/bandoracle/module.go +++ b/x/bandoracle/module.go @@ -11,14 +11,14 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/comdex-official/comdex/x/bandoracle/client/cli" "github.com/comdex-official/comdex/x/bandoracle/keeper" @@ -147,19 +147,9 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/bandoracle/module_ibc.go b/x/bandoracle/module_ibc.go index 03e5f8c59..5092fccc7 100644 --- a/x/bandoracle/module_ibc.go +++ b/x/bandoracle/module_ibc.go @@ -1,15 +1,14 @@ package bandoracle import ( - "fmt" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibcexported "github.com/cosmos/ibc-go/v4/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" "github.com/comdex-official/comdex/x/bandoracle/types" ) @@ -132,16 +131,18 @@ func (im IBCModule) OnRecvPacket( return oracleAck } - var modulePacketData types.BandoraclePacketData - if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { - return channeltypes.NewErrorAcknowledgement(sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error())) - } + //TODO: review commented code + // var modulePacketData types.BandoraclePacketData + // if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { + // return channeltypes.NewErrorAcknowledgement(sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error())) + // } - // Dispatch packet - switch packet := modulePacketData.Packet.(type) { - default: - return channeltypes.NewErrorAcknowledgement(sdkerrors.Wrapf(types.ErrUnrecognisedPacket, "unrecognized %s packet type: %T", types.ModuleName, packet)) - } + // // Dispatch packet + // switch packet := modulePacketData.Packet.(type) { + // default: + // return channeltypes.NewErrorAcknowledgement(sdkerrors.Wrapf(types.ErrUnrecognisedPacket, "unrecognized %s packet type: %T", types.ModuleName, packet)) + // } + return nil // NOTE: acknowledgement will be written synchronously during IBC handler execution. } @@ -158,26 +159,31 @@ func (im IBCModule) OnAcknowledgementPacket( return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet acknowledgement: %v", err) } - sdkResult, err := im.handleOracleAcknowledgment(ctx, ack, modulePacket) + _, err := im.handleOracleAcknowledgment(ctx, ack, modulePacket) if err != nil { return err } - if sdkResult != nil { - sdkResult.Events = ctx.EventManager().Events().ToABCIEvents() - return nil - } - - var modulePacketData types.BandoraclePacketData - if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error()) - } - - // Dispatch packet - switch packet := modulePacketData.Packet.(type) { - default: - errMsg := fmt.Sprintf("unrecognized %s packet type: %T", types.ModuleName, packet) - return sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - } + //TODO: review commented code + // if sdkResult != nil { + // sdkResult.Events = ctx.EventManager().Events().ToABCIEvents() + // return nil + // } + + // var modulePacketData types.BandoraclePacketData + // if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { + // fmt.Println("err in OnAcknowledgementPacket------------------") + // return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error()) + // } + // fmt.Println("OnAcknowledgementPacket data", modulePacketData) + // fmt.Println("OnAcknowledgementPacket------------------ end") + + // // Dispatch packet + // switch packet := modulePacketData.Packet.(type) { + // default: + // errMsg := fmt.Sprintf("unrecognized %s packet type: %T", types.ModuleName, packet) + // return sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) + // } + return nil } // OnTimeoutPacket implements the IBCModule interface. @@ -186,17 +192,20 @@ func (im IBCModule) OnTimeoutPacket( modulePacket channeltypes.Packet, relayer sdk.AccAddress, ) error { - var modulePacketData types.BandoraclePacketData - if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error()) - } - - // Dispatch packet - switch packet := modulePacketData.Packet.(type) { - default: - errMsg := fmt.Sprintf("unrecognized %s packet type: %T", types.ModuleName, packet) - return sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - } + //TODO: review commented code + // fmt.Println("modulePacket.GetData(on timout reaal data)", modulePacket) + // var modulePacketData types.BandoraclePacketData + // if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { + // return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error()) + // } + + // // Dispatch packet + // switch packet := modulePacketData.Packet.(type) { + // default: + // errMsg := fmt.Sprintf("unrecognized %s packet type: %T", types.ModuleName, packet) + // return sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) + // } + return nil } func (am AppModule) NegotiateAppVersion(ctx sdk.Context, order channeltypes.Order, connectionID string, portID string, counterparty channeltypes.Counterparty, proposedVersion string) (version string, err error) { diff --git a/x/bandoracle/module_simulation.go b/x/bandoracle/module_simulation.go index 4e2eb0891..49f1c9df2 100644 --- a/x/bandoracle/module_simulation.go +++ b/x/bandoracle/module_simulation.go @@ -1,10 +1,8 @@ package bandoracle import ( - "math/rand" - "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -40,9 +38,9 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RandomizedParams creates randomized param changes for the simulator. -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} -} +// func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +// return []simtypes.ParamChange{} +// } // RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/bandoracle/oracle.go b/x/bandoracle/oracle.go index d65ffd5c8..3d1e91766 100644 --- a/x/bandoracle/oracle.go +++ b/x/bandoracle/oracle.go @@ -5,7 +5,7 @@ import ( "github.com/bandprotocol/bandchain-packet/packet" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/comdex-official/comdex/x/bandoracle/types" ) diff --git a/x/bandoracle/types/codec.go b/x/bandoracle/types/codec.go index a1eff4c1a..4faf682ab 100644 --- a/x/bandoracle/types/codec.go +++ b/x/bandoracle/types/codec.go @@ -4,16 +4,14 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func RegisterCodec(cdc *codec.LegacyAmino) { } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgFetchPriceData{}, - ) + registry.RegisterImplementations((*sdk.Msg)(nil)) registry.RegisterImplementations( (*govtypes.Content)(nil), @@ -23,5 +21,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { var ( Amino = codec.NewLegacyAmino() + // ModuleCdc = codec.NewAminoCodec(Amino) ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) ) diff --git a/x/bandoracle/types/fetch_price.pb.go b/x/bandoracle/types/fetch_price.pb.go index f19d8c2ae..c0c274af6 100644 --- a/x/bandoracle/types/fetch_price.pb.go +++ b/x/bandoracle/types/fetch_price.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/bandoracle/types/genesis.go b/x/bandoracle/types/genesis.go index ca5ce4e50..285ad85fe 100644 --- a/x/bandoracle/types/genesis.go +++ b/x/bandoracle/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - host "github.com/cosmos/ibc-go/v4/modules/core/24-host" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" ) // DefaultIndex is the default capability global index. diff --git a/x/bandoracle/types/genesis.pb.go b/x/bandoracle/types/genesis.pb.go index 12bd4bca1..92b2a4aa8 100644 --- a/x/bandoracle/types/genesis.pb.go +++ b/x/bandoracle/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/bandoracle/types/gov.go b/x/bandoracle/types/gov.go index 99a1bdc3d..ed382cc83 100644 --- a/x/bandoracle/types/gov.go +++ b/x/bandoracle/types/gov.go @@ -2,7 +2,7 @@ package types import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -11,7 +11,6 @@ const ( func init() { govtypes.RegisterProposalType(ProposalFetchPrice) - govtypes.RegisterProposalTypeCodec(&FetchPriceProposal{}, "comdex/FetchPriceProposal") } var _ govtypes.Content = &FetchPriceProposal{} diff --git a/x/bandoracle/types/gov.pb.go b/x/bandoracle/types/gov.pb.go index 1bff7d70f..f6eee9e83 100644 --- a/x/bandoracle/types/gov.pb.go +++ b/x/bandoracle/types/gov.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/bandoracle/types/packet.pb.go b/x/bandoracle/types/packet.pb.go index 2928e14d4..dd7539059 100644 --- a/x/bandoracle/types/packet.pb.go +++ b/x/bandoracle/types/packet.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -24,6 +24,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type BandoraclePacketData struct { // Types that are valid to be assigned to Packet: + // // *BandoraclePacketData_NoData Packet isBandoraclePacketData_Packet `protobuf_oneof:"packet"` } diff --git a/x/bandoracle/types/params.go b/x/bandoracle/types/params.go index 77bff3522..4fdcb7707 100644 --- a/x/bandoracle/types/params.go +++ b/x/bandoracle/types/params.go @@ -7,6 +7,7 @@ import ( var _ paramtypes.ParamSet = (*Params)(nil) const ( + Int64Forty = int64(40) Int64Twenty = int64(20) Int64TwentyOne = int64(21) Int64One = int64(1) diff --git a/x/bandoracle/types/params.pb.go b/x/bandoracle/types/params.pb.go index ecb6af5d8..431a93744 100644 --- a/x/bandoracle/types/params.pb.go +++ b/x/bandoracle/types/params.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/bandoracle/types/query.pb.go b/x/bandoracle/types/query.pb.go index 1b3230533..96eb7e09a 100644 --- a/x/bandoracle/types/query.pb.go +++ b/x/bandoracle/types/query.pb.go @@ -6,9 +6,9 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/bandoracle/types/tx.pb.go b/x/bandoracle/types/tx.pb.go index c65eeab6b..a9906969c 100644 --- a/x/bandoracle/types/tx.pb.go +++ b/x/bandoracle/types/tx.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/collector/client/cli/tx.go b/x/collector/client/cli/tx.go index 9d1c529f9..44a868ef6 100644 --- a/x/collector/client/cli/tx.go +++ b/x/collector/client/cli/tx.go @@ -2,6 +2,11 @@ package cli import ( "fmt" + "github.com/comdex-official/comdex/x/collector/types" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "strconv" "github.com/spf13/cobra" @@ -17,5 +22,40 @@ func GetTxCmd() *cobra.Command { SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } + cmd.AddCommand( + txDeposit(), + ) + return cmd +} +func txDeposit() *cobra.Command { + cmd := &cobra.Command{ + Use: "deposit [amount] [app-id]", + Short: "deposit cmst into collector", + Long: `This transaction is exclusively designed for depositing CMST tokens into the collector module. We strongly advise regular users against using this transaction, + as it could lead to potential fund loss and cannot be reversed. Its sole purpose is to facilitate refunds to stAtom vault owners by administrators.`, + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + asset, err := sdk.ParseCoinNormalized(args[0]) + if err != nil { + return err + } + + appID, err := strconv.ParseUint(args[1], 10, 64) + if err != nil { + return err + } + + msg := types.NewMsgDeposit(ctx.GetFromAddress().String(), asset, appID) + + return tx.GenerateOrBroadcastTxCLI(ctx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) return cmd } diff --git a/x/collector/client/rest/tx.go b/x/collector/client/rest/tx.go deleted file mode 100644 index 942b614a7..000000000 --- a/x/collector/client/rest/tx.go +++ /dev/null @@ -1,48 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" -) - -type ( - NewCmdLookupTableParams struct{} - NewCmdAuctionToAppLookupTable struct{} -) - -func NewCmdLookupTableParamsRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "collector-lookup-params", - Handler: LookupTableParamsRESTHandler(clientCtx), - } -} - -func LookupTableParamsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req NewCmdLookupTableParams - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func NewCmdAuctionTableAppRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "app-auction-lookup", - Handler: AuctionLookupTableAppRESTHandler(clientCtx), - } -} - -func AuctionLookupTableAppRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req NewCmdAuctionToAppLookupTable - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} diff --git a/x/collector/genesis_test.go b/x/collector/genesis_test.go index 76bc9502f..6126c75cd 100644 --- a/x/collector/genesis_test.go +++ b/x/collector/genesis_test.go @@ -3,7 +3,7 @@ package collector_test import ( "testing" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" app "github.com/comdex-official/comdex/app" "github.com/comdex-official/comdex/x/collector" @@ -12,7 +12,7 @@ import ( ) func TestGenesis(t *testing.T) { - comdexApp := app.Setup(false) + comdexApp := app.Setup(t, false) ctx := comdexApp.BaseApp.NewContext(false, tmproto.Header{}) genesisState := types.GenesisState{ Params: types.DefaultParams(), diff --git a/x/collector/handler.go b/x/collector/handler.go index 5e97beb79..88e5514b8 100644 --- a/x/collector/handler.go +++ b/x/collector/handler.go @@ -2,6 +2,7 @@ package collector import ( "fmt" + "github.com/comdex-official/comdex/x/collector/keeper" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -10,11 +11,16 @@ import ( ) // NewHandler ... -func NewHandler() sdk.Handler { +func NewHandler(k keeper.Keeper) sdk.Handler { + server := keeper.NewMsgServerImpl(k) + return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - _ = ctx.WithEventManager(sdk.NewEventManager()) + ctx = ctx.WithEventManager(sdk.NewEventManager()) switch msg := msg.(type) { + case *types.MsgDeposit: + res, err := server.Deposit(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) default: errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) diff --git a/x/collector/keeper/grpc_query_params_test.go b/x/collector/keeper/grpc_query_params_test.go index cdcb8305b..12a4b8ea1 100644 --- a/x/collector/keeper/grpc_query_params_test.go +++ b/x/collector/keeper/grpc_query_params_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/comdex-official/comdex/app" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/comdex-official/comdex/x/collector/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,7 +12,7 @@ import ( ) func TestParamsQuery(t *testing.T) { - comdexApp := app.Setup(false) + comdexApp := app.Setup(t, false) ctx := comdexApp.BaseApp.NewContext(false, tmproto.Header{}) wctx := sdk.WrapSDKContext(ctx) diff --git a/x/collector/keeper/keeper.go b/x/collector/keeper/keeper.go index a9e785ed3..840095675 100644 --- a/x/collector/keeper/keeper.go +++ b/x/collector/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,13 +12,14 @@ import ( "github.com/comdex-official/comdex/x/collector/expected" "github.com/comdex-official/comdex/x/collector/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) type ( Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey asset expected.AssetKeeper auction expected.AuctionKeeper locker expected.LockerKeeper @@ -31,7 +32,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, asset expected.AssetKeeper, auction expected.AuctionKeeper, locker expected.LockerKeeper, diff --git a/x/collector/keeper/keeper_test.go b/x/collector/keeper/keeper_test.go index 78b60a290..6513b371a 100644 --- a/x/collector/keeper/keeper_test.go +++ b/x/collector/keeper/keeper_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" assetKeeper "github.com/comdex-official/comdex/x/asset/keeper" @@ -33,7 +33,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.collectorKeeper = s.app.CollectorKeeper s.assetKeeper = s.app.AssetKeeper diff --git a/x/collector/keeper/msg_server.go b/x/collector/keeper/msg_server.go index f0cb4b6f5..a1daa85bd 100644 --- a/x/collector/keeper/msg_server.go +++ b/x/collector/keeper/msg_server.go @@ -1,17 +1,29 @@ package keeper import ( + "context" "github.com/comdex-official/comdex/x/collector/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) type msgServer struct { - Keeper + keeper Keeper } // NewMsgServerImpl returns an implementation of the MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return &msgServer{Keeper: keeper} + return &msgServer{keeper: keeper} } var _ types.MsgServer = msgServer{} + +func (m msgServer) Deposit(goCtx context.Context, deposit *types.MsgDeposit) (*types.MsgDepositResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if err := m.keeper.Deposit(ctx, deposit.Amount, deposit.AppId, deposit.Addr); err != nil { + return nil, err + } + + return &types.MsgDepositResponse{}, nil +} diff --git a/x/collector/keeper/refund.go b/x/collector/keeper/refund.go new file mode 100644 index 000000000..3beccf913 --- /dev/null +++ b/x/collector/keeper/refund.go @@ -0,0 +1,201 @@ +package keeper + +import ( + "fmt" + "github.com/comdex-official/comdex/x/collector/types" + collectortypes "github.com/comdex-official/comdex/x/collector/types" + sdk "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/x/bank/keeper" + protobuftypes "github.com/cosmos/gogoproto/types" +) + +func (k Keeper) Refund(ctx sdk.Context) error { + ////// refund CMST to vault owner//////// + + type refundStruct struct { + vaultOwner string + amount int64 + } + + refundData := []refundStruct{ + { + vaultOwner: "comdex1x22fak2s8a6m9gysx7y4d5794dgds0jy6jch3t", + amount: 27380000, + }, + { + vaultOwner: "comdex12jhse8d8uxgkqgrvfcv5j46wqu08yru7z3ze8z", + amount: 1142650000, + }, + { + vaultOwner: "comdex1w5lep3d53p5dtkg37gerq6qxdlagykyryta989", + amount: 4363010000, + }, + { + vaultOwner: "comdex122esu76xehp8sq9t88kcn666ejjum5g5ynxu0k", + amount: 32460000, + }, + { + vaultOwner: "comdex1reeycz4d4pu4fddzqafzsyh6vvjp3nflp84xpp", + amount: 44960000, + }, + { + vaultOwner: "comdex12q0708jnrd6d5ud7ap5lz4tgu3yshppfwd9x28", + amount: 808240000, + }, + { + vaultOwner: "comdex120t6ntph3za6a7trw3zegseefkyf5u8gu3q4yu", + amount: 29310000, + }, + { + vaultOwner: "comdex1qmklnue6z90vlljx04ll2v0elqjnzr3fswxm2u", + amount: 10249670000, + }, + { + vaultOwner: "comdex13mm0ua6c20f8jup3q2g0uuw2k5n54cgkrw3lqs", + amount: 664440000, + }, + { + vaultOwner: "comdex1wk25umx7ldgnca290dlg09yssusujhfek3l38l", + amount: 2520920000, + }, + { + vaultOwner: "comdex1z2cmdk7atwfefl4a3had7a2tsamxrwgucmhutx", + amount: 24300000, + }, + { + vaultOwner: "comdex1snezfskvsvdav5z9rsg5pgdrwnrg77kfjrc25f", + amount: 23090000, + }, + { + vaultOwner: "comdex15xvnvwffhmy5wx8y7a9rchxe4zys9pa4gv8k8r", + amount: 23650000, + }, + { + vaultOwner: "comdex1dwhhjyl6luv949ekpkplwc0zhqxa2jmhv6yl2w", + amount: 19930000, + }, + { + vaultOwner: "comdex1nwtwhhs3d8rjl6c3clmcxlf3qdpv8n6rc9u9uy", + amount: 18550000, + }, + { + vaultOwner: "comdex15gp4hjqf79zeggxteewzu2n0qde2zzfkkgec3z", + amount: 79060000, + }, + { + vaultOwner: "comdex1v3truxzuz0j7896tumz77unla4sltqlgxwzhxy", + amount: 45560000, + }, + { + vaultOwner: "comdex1850jsqvx54zl0urkav9tvee20j8r5fqj98zq9p", + amount: 21940000, + }, + { + vaultOwner: "comdex1qx46s5gen6c88yaauh9jfttmfgdxnxxshzhahu", + amount: 24400000, + }, + } + + // check if collector module account has enough balance to refund + macc := k.ModuleBalance(ctx, collectortypes.ModuleName, "ucmst") + // Check if sufficient balance exists + + if macc.Int64() < 20163520000 { + fmt.Println("collector module account does not have enough balance to refund") + return types.ErrorInsufficientBalance + } else { + for i := 0; i < len(refundData); i++ { + cmstCoins := sdk.NewCoin("ucmst", sdk.NewInt(refundData[i].amount)) + + vaultOwner1, err := sdk.AccAddressFromBech32(refundData[i].vaultOwner) + if err != nil { + fmt.Println("error in address of owner ", refundData[i].vaultOwner, err) + return err + } + + if err := k.bank.SendCoinsFromModuleToAccount(ctx, collectortypes.ModuleName, vaultOwner1, sdk.NewCoins(cmstCoins)); err != nil { + fmt.Println("error in transfer to owner ", refundData[i].vaultOwner, err) + return err + } + fmt.Println(`refund done for `, refundData[i].vaultOwner, ` amount `, refundData[i].amount) + } + + // decrease net fee collected + err := k.DecreaseNetFeeCollectedData(ctx, 2, 3, sdk.NewInt(20163520000)) + if err != nil { + return err + } + } + return nil +} + +func (k Keeper) Deposit(ctx sdk.Context, Amount sdk.Coin, AppID uint64, addr string) error { + counter := k.GetRefundCounterStatus(ctx) + if counter != 0 { + return types.ErrorRefundCompleted + } + + asset, found := k.asset.GetAssetForDenom(ctx, Amount.Denom) + if !found { + return types.ErrorAssetDoesNotExist + } + if asset.Id != 3 { + return types.ErrorAppDoesNotExist + } + + if AppID != 2 { + return types.ErrorAppDoesNotExist + } + + address, _ := sdk.AccAddressFromBech32(addr) + + err := k.bank.SendCoinsFromAccountToModule(ctx, address, types.ModuleName, sdk.NewCoins(Amount)) + if err != nil { + return err + } + + err = k.SetNetFeeCollectedData(ctx, AppID, asset.Id, Amount.Amount) + if err != nil { + return nil + } + + err = k.Refund(ctx) + if err != nil { + return err + } + + k.SetRefundCounterStatus(ctx, counter+1) + + return nil +} + +func (k Keeper) SetRefundCounterStatus(ctx sdk.Context, id uint64) { + var ( + store = ctx.KVStore(k.storeKey) + key = types.RefundCounterStatusPrefix + value = k.cdc.MustMarshal( + &protobuftypes.UInt64Value{ + Value: id, + }, + ) + ) + + store.Set(key, value) +} + +func (k Keeper) GetRefundCounterStatus(ctx sdk.Context) uint64 { + var ( + store = ctx.KVStore(k.storeKey) + key = types.RefundCounterStatusPrefix + value = store.Get(key) + ) + + if value == nil { + return 0 + } + + var id protobuftypes.UInt64Value + k.cdc.MustUnmarshal(value, &id) + + return id.GetValue() +} diff --git a/x/collector/module.go b/x/collector/module.go index 2199b636c..29035288e 100644 --- a/x/collector/module.go +++ b/x/collector/module.go @@ -9,7 +9,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -119,23 +119,14 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler()) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { // types.RegisterQueryServiceServer(cfg.QueryServer(), am.keeper) + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) } diff --git a/x/collector/module_simulation.go b/x/collector/module_simulation.go index 66d8c8674..bdce5430b 100644 --- a/x/collector/module_simulation.go +++ b/x/collector/module_simulation.go @@ -2,10 +2,8 @@ package collector //goland:noinspection ALL import ( - "math/rand" - "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -43,9 +41,9 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RandomizedParams creates randomized param changes for the simulator. -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} -} +// func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +// return []simtypes.ParamChange{} +// } // RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/collector/types/codec.go b/x/collector/types/codec.go index 3b6cc1918..6d35a30e3 100644 --- a/x/collector/types/codec.go +++ b/x/collector/types/codec.go @@ -4,23 +4,30 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgDeposit{}, "comdex/collector/MsgDeposit", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) registry.RegisterImplementations( (*govtypes.Content)(nil), ) + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgDeposit{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) + ModuleCdc = codec.NewAminoCodec(amino) ) func init() { diff --git a/x/collector/types/collector.pb.go b/x/collector/types/collector.pb.go index 32dc2c711..109021a32 100644 --- a/x/collector/types/collector.pb.go +++ b/x/collector/types/collector.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -669,7 +669,7 @@ func (m *CollectorLookupTableData) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) if err2 != nil { return 0, err2 } @@ -988,7 +988,7 @@ func (m *CollectorLookupTableData) Size() (n int) { if m.BlockHeight != 0 { n += 1 + sovCollector(uint64(m.BlockHeight)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) n += 1 + l + sovCollector(uint64(l)) return n } @@ -1821,7 +1821,7 @@ func (m *CollectorLookupTableData) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/collector/types/errors.go b/x/collector/types/errors.go index 642fa2296..d772ef513 100644 --- a/x/collector/types/errors.go +++ b/x/collector/types/errors.go @@ -21,4 +21,6 @@ var ( SendCoinFromModuleToModuleIsZero = sdkerrors.Register(ModuleName, 413, "Send coin from module to module is zero") ErrorSurplusDistributerCantbeTrue = sdkerrors.Register(ModuleName, 414, "Surplus and distributer can't be true at same time") ErrorSurplusDebtrCantbeTrueSameTime = sdkerrors.Register(ModuleName, 415, "Surplus and debt can't be true at same time") + ErrorInsufficientBalance = sdkerrors.Register(ModuleName, 416, "collector module account does not have enough balance to refund") + ErrorRefundCompleted = sdkerrors.Register(ModuleName, 417, "refund already processed") ) diff --git a/x/collector/types/genesis.pb.go b/x/collector/types/genesis.pb.go index 498a3fa0e..8ec83e518 100644 --- a/x/collector/types/genesis.pb.go +++ b/x/collector/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/collector/types/keys.go b/x/collector/types/keys.go index 46bf0aa17..83b98b65c 100644 --- a/x/collector/types/keys.go +++ b/x/collector/types/keys.go @@ -22,11 +22,13 @@ const ( ) var ( + TypeDepositRequest = ModuleName + ":deposit" AddCollectorLookupKey = []byte{0x01} AppIDToAssetCollectorMappingPrefix = []byte{0x03} AppIDToAuctionMappingPrefix = []byte{0x05} CollectorForDenomKeyPrefix = []byte{0x07} NetFeeCollectedDataPrefix = []byte{0x08} + RefundCounterStatusPrefix = []byte{0x09} ) func CollectorLookupTableMappingKey(appID, assetID uint64) []byte { diff --git a/x/collector/types/params.pb.go b/x/collector/types/params.pb.go index af4082426..4d31331b0 100644 --- a/x/collector/types/params.pb.go +++ b/x/collector/types/params.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/collector/types/query.pb.go b/x/collector/types/query.pb.go index cd798a5dc..d511084be 100644 --- a/x/collector/types/query.pb.go +++ b/x/collector/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/collector/types/tx.go b/x/collector/types/tx.go new file mode 100644 index 000000000..a7f010acf --- /dev/null +++ b/x/collector/types/tx.go @@ -0,0 +1,43 @@ +package types + +import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func NewMsgDeposit(addr string, amount sdk.Coin, appID uint64) *MsgDeposit { + return &MsgDeposit{ + Addr: addr, + Amount: amount, + AppId: appID, + } +} + +func (msg MsgDeposit) Route() string { return ModuleName } +func (msg MsgDeposit) Type() string { return TypeDepositRequest } + +func (msg *MsgDeposit) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.GetAddr()) + if err != nil { + return err + } + if msg.Amount.Amount.IsNegative() || msg.Amount.Amount.IsZero() { + return fmt.Errorf("invalid coin amount: %s < 0", msg.Amount.Amount) + } + if msg.AppId == 0 { + return fmt.Errorf("app id should not be 0: %d ", msg.AppId) + } + + return nil +} + +func (msg *MsgDeposit) GetSigners() []sdk.AccAddress { + lender, _ := sdk.AccAddressFromBech32(msg.GetAddr()) + return []sdk.AccAddress{lender} +} + +// GetSignBytes get the bytes for the message signer to sign on. +func (msg *MsgDeposit) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} diff --git a/x/collector/types/tx.pb.go b/x/collector/types/tx.pb.go index d18345d24..41ae3d053 100644 --- a/x/collector/types/tx.pb.go +++ b/x/collector/types/tx.pb.go @@ -6,10 +6,16 @@ package types import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,19 +29,130 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type MsgDeposit struct { + Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` + Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` + AppId uint64 `protobuf:"varint,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` +} + +func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } +func (m *MsgDeposit) String() string { return proto.CompactTextString(m) } +func (*MsgDeposit) ProtoMessage() {} +func (*MsgDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_b3c97bd7a906bd24, []int{0} +} +func (m *MsgDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeposit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeposit.Merge(m, src) +} +func (m *MsgDeposit) XXX_Size() int { + return m.Size() +} +func (m *MsgDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo + +func (m *MsgDeposit) GetAddr() string { + if m != nil { + return m.Addr + } + return "" +} + +func (m *MsgDeposit) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +func (m *MsgDeposit) GetAppId() uint64 { + if m != nil { + return m.AppId + } + return 0 +} + +type MsgDepositResponse struct { +} + +func (m *MsgDepositResponse) Reset() { *m = MsgDepositResponse{} } +func (m *MsgDepositResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositResponse) ProtoMessage() {} +func (*MsgDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b3c97bd7a906bd24, []int{1} +} +func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositResponse.Merge(m, src) +} +func (m *MsgDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgDeposit)(nil), "comdex.collector.v1beta1.MsgDeposit") + proto.RegisterType((*MsgDepositResponse)(nil), "comdex.collector.v1beta1.MsgDepositResponse") +} + func init() { proto.RegisterFile("comdex/collector/v1beta1/tx.proto", fileDescriptor_b3c97bd7a906bd24) } var fileDescriptor_b3c97bd7a906bd24 = []byte{ - // 143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xce, 0xcf, 0x4d, - 0x49, 0xad, 0xd0, 0x4f, 0xce, 0xcf, 0xc9, 0x49, 0x4d, 0x2e, 0xc9, 0x2f, 0xd2, 0x2f, 0x33, 0x4c, - 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x80, - 0x28, 0xd1, 0x83, 0x2b, 0xd1, 0x83, 0x2a, 0x31, 0x62, 0xe5, 0x62, 0xf6, 0x2d, 0x4e, 0x77, 0xf2, - 0x3d, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, - 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xe3, 0xf4, 0xcc, 0x92, 0x8c, - 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x88, 0x29, 0xba, 0xf9, 0x69, 0x69, 0x99, 0xc9, 0x99, - 0x89, 0x39, 0x50, 0xbe, 0x3e, 0xb2, 0xd5, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x6b, - 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5a, 0x66, 0xdf, 0x91, 0x9b, 0x00, 0x00, 0x00, + // 296 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x3d, 0x4f, 0x02, 0x31, + 0x18, 0xc7, 0xaf, 0x82, 0x18, 0xeb, 0xd6, 0x60, 0x72, 0x32, 0x54, 0x24, 0x0e, 0x0c, 0xda, 0x06, + 0x18, 0xdc, 0xd1, 0xc5, 0x81, 0xe5, 0x46, 0x13, 0x63, 0x7a, 0x6d, 0x39, 0x9b, 0xc0, 0x3d, 0x0d, + 0x2d, 0x06, 0xbf, 0x85, 0x1f, 0x8b, 0x91, 0xd1, 0xc9, 0x98, 0xbb, 0x2f, 0x62, 0xee, 0x0d, 0x5c, + 0x4c, 0xdc, 0xfe, 0x6d, 0x7e, 0xff, 0xe7, 0xd7, 0x17, 0x7c, 0x25, 0x61, 0xa9, 0xf4, 0x86, 0x4b, + 0x58, 0x2c, 0xb4, 0xf4, 0xb0, 0xe2, 0x6f, 0xa3, 0x58, 0x7b, 0x31, 0xe2, 0x7e, 0xc3, 0xec, 0x0a, + 0x3c, 0x90, 0xb0, 0x42, 0xd8, 0x1e, 0x61, 0x35, 0xd2, 0xa3, 0x12, 0xdc, 0x12, 0x1c, 0x8f, 0x85, + 0xd3, 0xfb, 0x9e, 0x04, 0x93, 0x56, 0xcd, 0x5e, 0x37, 0x81, 0x04, 0xca, 0xc8, 0x8b, 0x54, 0xed, + 0x0e, 0x2c, 0xc6, 0x33, 0x97, 0x3c, 0x68, 0x0b, 0xce, 0x78, 0x42, 0x70, 0x5b, 0x28, 0xb5, 0x0a, + 0x51, 0x1f, 0x0d, 0x4f, 0xa3, 0x32, 0x93, 0x3b, 0xdc, 0x11, 0x4b, 0x58, 0xa7, 0x3e, 0x3c, 0xea, + 0xa3, 0xe1, 0xd9, 0xf8, 0x82, 0x55, 0x22, 0x56, 0x88, 0x1a, 0x3b, 0xbb, 0x07, 0x93, 0x4e, 0xdb, + 0xdb, 0xaf, 0xcb, 0x20, 0xaa, 0x71, 0x72, 0x8e, 0x3b, 0xc2, 0xda, 0x17, 0xa3, 0xc2, 0x56, 0x1f, + 0x0d, 0xdb, 0xd1, 0xb1, 0xb0, 0xf6, 0x51, 0x0d, 0xba, 0x98, 0x1c, 0x8c, 0x91, 0x76, 0x16, 0x52, + 0xa7, 0xc7, 0x0a, 0xb7, 0x66, 0x2e, 0x21, 0xcf, 0xf8, 0xa4, 0x39, 0xcb, 0x35, 0xfb, 0xeb, 0xaa, + 0xec, 0xd0, 0xef, 0xdd, 0xfc, 0x87, 0x6a, 0x2c, 0xd3, 0xd9, 0x36, 0xa3, 0x68, 0x97, 0x51, 0xf4, + 0x9d, 0x51, 0xf4, 0x91, 0xd3, 0x60, 0x97, 0xd3, 0xe0, 0x33, 0xa7, 0xc1, 0xd3, 0x24, 0x31, 0xfe, + 0x75, 0x1d, 0x17, 0xd3, 0x78, 0x35, 0xf1, 0x16, 0xe6, 0x73, 0x23, 0x8d, 0x58, 0xd4, 0x6b, 0xfe, + 0xfb, 0x5f, 0xfc, 0xbb, 0xd5, 0x2e, 0xee, 0x94, 0x6f, 0x38, 0xf9, 0x09, 0x00, 0x00, 0xff, 0xff, + 0x9d, 0x9b, 0x83, 0x41, 0xb8, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -50,6 +167,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { + Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) } type msgClient struct { @@ -60,22 +178,440 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } +func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { + out := new(MsgDepositResponse) + err := c.cc.Invoke(ctx, "/comdex.collector.v1beta1.Msg/Deposit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { + Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } +func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") +} + func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } +func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeposit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Deposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/comdex.collector.v1beta1.Msg/Deposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "comdex.collector.v1beta1.Msg", HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "comdex/collector/v1beta1/tx.proto", + Methods: []grpc.MethodDesc{ + { + MethodName: "Deposit", + Handler: _Msg_Deposit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "comdex/collector/v1beta1/tx.proto", +} + +func (m *MsgDeposit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AppId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.AppId)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Addr) > 0 { + i -= len(m.Addr) + copy(dAtA[i:], m.Addr) + i = encodeVarintTx(dAtA, i, uint64(len(m.Addr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil } + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Addr) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + if m.AppId != 0 { + n += 1 + sovTx(uint64(m.AppId)) + } + return n +} + +func (m *MsgDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgDeposit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType) + } + m.AppId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AppId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/esm/abci.go b/x/esm/abci.go index ae5459eef..00b5ab9fa 100644 --- a/x/esm/abci.go +++ b/x/esm/abci.go @@ -3,9 +3,9 @@ package esm import ( assettypes "github.com/comdex-official/comdex/x/asset/types" "github.com/comdex-official/comdex/x/esm/expected" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/esm/keeper" diff --git a/x/esm/client/rest/tx.go b/x/esm/client/rest/tx.go deleted file mode 100644 index c31ea276d..000000000 --- a/x/esm/client/rest/tx.go +++ /dev/null @@ -1,28 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" -) - -type AddESMTriggerParamsRequest struct{} - -func AddESMTriggerParamsProposal(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-esm-trigger-params", - Handler: AddNewPairsRESTHandler(clientCtx), - } -} - -func AddNewPairsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddESMTriggerParamsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} diff --git a/x/esm/keeper/esm.go b/x/esm/keeper/esm.go index 44859e746..099fe250d 100644 --- a/x/esm/keeper/esm.go +++ b/x/esm/keeper/esm.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/app/wasm/bindings" assettypes "github.com/comdex-official/comdex/x/asset/types" diff --git a/x/esm/keeper/keeper.go b/x/esm/keeper/keeper.go index d6b293e82..3191b00a2 100644 --- a/x/esm/keeper/keeper.go +++ b/x/esm/keeper/keeper.go @@ -6,7 +6,7 @@ import ( "github.com/comdex-official/comdex/x/esm/expected" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -15,13 +15,14 @@ import ( assettypes "github.com/comdex-official/comdex/x/asset/types" "github.com/comdex-official/comdex/x/esm/types" tokenminttypes "github.com/comdex-official/comdex/x/tokenmint/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) type ( Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey paramstore paramtypes.Subspace asset expected.AssetKeeper vault expected.VaultKeeper @@ -35,7 +36,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, ps paramtypes.Subspace, asset expected.AssetKeeper, vault expected.VaultKeeper, diff --git a/x/esm/keeper/keeper_test.go b/x/esm/keeper/keeper_test.go index cf8641212..b3e5346f9 100644 --- a/x/esm/keeper/keeper_test.go +++ b/x/esm/keeper/keeper_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" "github.com/comdex-official/comdex/x/esm/keeper" @@ -28,7 +28,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.keeper = s.app.EsmKeeper s.querier = keeper.QueryServer{Keeper: s.keeper} diff --git a/x/esm/module.go b/x/esm/module.go index bc7d133bd..f40b057a5 100644 --- a/x/esm/module.go +++ b/x/esm/module.go @@ -11,7 +11,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -128,19 +128,9 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/esm/module_simulation.go b/x/esm/module_simulation.go index 5fdc9f185..aefef1735 100644 --- a/x/esm/module_simulation.go +++ b/x/esm/module_simulation.go @@ -1,10 +1,8 @@ package esm import ( - "math/rand" - "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -40,9 +38,9 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RandomizedParams creates randomized param changes for the simulator -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} -} +// func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +// return []simtypes.ParamChange{} +// } // RegisterStoreDecoder registers a decoder func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/esm/types/codec.go b/x/esm/types/codec.go index 5dfe7d2eb..8940e911a 100644 --- a/x/esm/types/codec.go +++ b/x/esm/types/codec.go @@ -5,7 +5,7 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/types/msgservice" ) @@ -33,11 +33,12 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { var ( Amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) + ModuleCdc = codec.NewAminoCodec(Amino) ) func init() { RegisterCodec(Amino) cryptocodec.RegisterCrypto(Amino) + // sdk.RegisterLegacyAminoCodec(Amino) Amino.Seal() -} \ No newline at end of file +} diff --git a/x/esm/types/esm.pb.go b/x/esm/types/esm.pb.go index cbea415d0..f18472c8b 100644 --- a/x/esm/types/esm.pb.go +++ b/x/esm/types/esm.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -791,7 +791,7 @@ func (m *ESMStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime):]) if err3 != nil { return 0, err3 } @@ -799,7 +799,7 @@ func (m *ESMStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEsm(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x2a - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err4 != nil { return 0, err4 } @@ -1133,9 +1133,9 @@ func (m *ESMStatus) Size() (n int) { if m.Status { n += 2 } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovEsm(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime) n += 1 + l + sovEsm(uint64(l)) if m.VaultRedemptionStatus { n += 2 @@ -1635,7 +1635,7 @@ func (m *ESMStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1668,7 +1668,7 @@ func (m *ESMStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/esm/types/genesis.pb.go b/x/esm/types/genesis.pb.go index b3b0bd5b5..290c077d4 100644 --- a/x/esm/types/genesis.pb.go +++ b/x/esm/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/esm/types/params.pb.go b/x/esm/types/params.pb.go index eeee7469d..6e25f6e65 100644 --- a/x/esm/types/params.pb.go +++ b/x/esm/types/params.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/esm/types/query.pb.go b/x/esm/types/query.pb.go index f13be0e8e..e362150ae 100644 --- a/x/esm/types/query.pb.go +++ b/x/esm/types/query.pb.go @@ -6,9 +6,9 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/esm/types/tx.pb.go b/x/esm/types/tx.pb.go index 96f525405..78b26763e 100644 --- a/x/esm/types/tx.pb.go +++ b/x/esm/types/tx.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/lend/abci.go b/x/lend/abci.go index ad82156ec..45971e350 100644 --- a/x/lend/abci.go +++ b/x/lend/abci.go @@ -4,9 +4,9 @@ import ( utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/lend/keeper" "github.com/comdex-official/comdex/x/lend/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" ) func BeginBlocker(ctx sdk.Context, _ abci.RequestBeginBlock, k keeper.Keeper) { diff --git a/x/lend/client/cli/tx.go b/x/lend/client/cli/tx.go index 5eddf9f1d..034be0a5e 100644 --- a/x/lend/client/cli/tx.go +++ b/x/lend/client/cli/tx.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/spf13/cobra" flag "github.com/spf13/pflag" @@ -466,7 +466,11 @@ func CmdAddNewLendPairsProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateNewLendPairs(clientCtx, txf, cmd.Flags()) if err != nil { @@ -549,7 +553,11 @@ func CmdAddNewMultipleLendPairsProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateNewMultipleLendPairs(clientCtx, txf, cmd.Flags()) if err != nil { @@ -638,7 +646,11 @@ func CmdAddPoolProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateLendPool(clientCtx, txf, cmd.Flags()) if err != nil { @@ -867,7 +879,11 @@ func CmdAddNewAssetRatesParamsProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateassetRatesParams(clientCtx, txf, cmd.Flags()) if err != nil { @@ -986,7 +1002,11 @@ func CmdAddNewAuctionParamsProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewAddAuctionParams(clientCtx, txf, cmd.Flags()) if err != nil { @@ -1127,7 +1147,11 @@ func CmdAddPoolPairsProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateLendPoolPairs(clientCtx, txf, cmd.Flags()) if err != nil { @@ -1215,7 +1239,11 @@ func CmdAddAssetRatesPoolPairsProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewCreateAssetRatesPoolPairs(clientCtx, txf, cmd.Flags()) if err != nil { @@ -1374,7 +1402,11 @@ func CmdDepreciatePoolsProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf =txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewDepreciatePools(clientCtx, txf, cmd.Flags()) if err != nil { @@ -1432,7 +1464,11 @@ func CmdAddEModePairsProposal() *cobra.Command { if err != nil { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf =txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := NewAddEModePairs(clientCtx, txf, cmd.Flags()) if err != nil { diff --git a/x/lend/client/proposal_handler.go b/x/lend/client/proposal_handler.go index 3708b8b26..03e4ad3f5 100644 --- a/x/lend/client/proposal_handler.go +++ b/x/lend/client/proposal_handler.go @@ -4,19 +4,18 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/comdex-official/comdex/x/lend/client/cli" - "github.com/comdex-official/comdex/x/lend/client/rest" ) var ( - AddLendPairsHandler = govclient.NewProposalHandler(cli.CmdAddNewLendPairsProposal, rest.AddNewPairsProposalRESTHandler) - AddPoolHandler = govclient.NewProposalHandler(cli.CmdAddPoolProposal, rest.AddPoolProposalRESTHandler) - AddAssetToPairHandler = govclient.NewProposalHandler(cli.CmdAddAssetToPairProposal, rest.AddAssetToPairProposalRESTHandler) - AddMultipleAssetToPairHandler = govclient.NewProposalHandler(cli.CmdAddMultipleAssetToPairProposal, rest.AddAssetToPairProposalRESTHandler) - AddAssetRatesParamsHandler = govclient.NewProposalHandler(cli.CmdAddNewAssetRatesParamsProposal, rest.AddNewAssetRatesParamsProposalRESTHandler) - AddAuctionParamsHandler = govclient.NewProposalHandler(cli.CmdAddNewAuctionParamsProposal, rest.AddNewAuctionParamsProposalRESTHandler) - AddMultipleLendPairsHandler = govclient.NewProposalHandler(cli.CmdAddNewMultipleLendPairsProposal, rest.AddNewPairsProposalRESTHandler) - AddPoolPairsHandler = govclient.NewProposalHandler(cli.CmdAddPoolPairsProposal, rest.AddPoolPairsProposalRESTHandler) - AddAssetRatesPoolPairsHandler = govclient.NewProposalHandler(cli.CmdAddAssetRatesPoolPairsProposal, rest.AddAssetRatesPoolPairsProposalRESTHandler) - AddDepreciatePoolsHandler = govclient.NewProposalHandler(cli.CmdDepreciatePoolsProposal, rest.AddDepreciatePoolsProposalRESTHandler) - AddEModePairsHandler = govclient.NewProposalHandler(cli.CmdAddEModePairsProposal, rest.AddEModePairsProposalRESTHandler) + AddLendPairsHandler = govclient.NewProposalHandler(cli.CmdAddNewLendPairsProposal) + AddPoolHandler = govclient.NewProposalHandler(cli.CmdAddPoolProposal) + AddAssetToPairHandler = govclient.NewProposalHandler(cli.CmdAddAssetToPairProposal) + AddMultipleAssetToPairHandler = govclient.NewProposalHandler(cli.CmdAddMultipleAssetToPairProposal) + AddAssetRatesParamsHandler = govclient.NewProposalHandler(cli.CmdAddNewAssetRatesParamsProposal) + AddAuctionParamsHandler = govclient.NewProposalHandler(cli.CmdAddNewAuctionParamsProposal) + AddMultipleLendPairsHandler = govclient.NewProposalHandler(cli.CmdAddNewMultipleLendPairsProposal) + AddPoolPairsHandler = govclient.NewProposalHandler(cli.CmdAddPoolPairsProposal) + AddAssetRatesPoolPairsHandler = govclient.NewProposalHandler(cli.CmdAddAssetRatesPoolPairsProposal) + AddDepreciatePoolsHandler = govclient.NewProposalHandler(cli.CmdDepreciatePoolsProposal) + AddEModePairsHandler = govclient.NewProposalHandler(cli.CmdAddEModePairsProposal) ) diff --git a/x/lend/client/rest/tx.go b/x/lend/client/rest/tx.go deleted file mode 100644 index 365808075..000000000 --- a/x/lend/client/rest/tx.go +++ /dev/null @@ -1,181 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - - "github.com/comdex-official/comdex/x/asset/types" -) - -type AddNewAssetsRequest struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - Asset []types.Asset `json:"assets" yaml:"assets"` -} - -type ( - AddNewPairsRequest struct{} - UpdateNewPairRequest struct{} - AddPoolRequest struct{} - AddAssetToPairRequest struct{} - AddAssetRatesParamsRequest struct{} - AddAuctionParamsRequest struct{} - AddDepreciatePoolsRequest struct{} - AddEModePairsRequest struct{} -) - -func AddNewPairsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-new-pairs", - Handler: AddNewPairsRESTHandler(clientCtx), - } -} - -func UpdatePairProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "update-new-pair", - Handler: UpdateNewPairsRESTHandler(clientCtx), - } -} - -func AddPoolProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-lend-pools", - Handler: AddpoolRESTHandler(clientCtx), - } -} - -func AddPoolPairsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-lend-pool-pairs", - Handler: AddpoolRESTHandler(clientCtx), - } -} - -func AddAssetRatesPoolPairsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-asset-pool-pairs", - Handler: AddpoolRESTHandler(clientCtx), - } -} - -func AddAssetToPairProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-asset-to-pair", - Handler: AddAssetToPairRESTHandler(clientCtx), - } -} - -func AddNewAssetRatesParamsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-asset-rates-params", - Handler: AddAssetRatesParamsRESTHandler(clientCtx), - } -} - -func AddNewAuctionParamsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-auction-params", - Handler: AddAuctionParamsRESTHandler(clientCtx), - } -} - -func AddNewPairsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddNewPairsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func UpdateNewPairsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req UpdateNewPairRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddpoolRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddPoolRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddAssetToPairRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddAssetToPairRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddAssetRatesParamsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddAssetRatesParamsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddAuctionParamsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddAuctionParamsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddDepreciatePoolsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "depreciate_pools", - Handler: AddDepreciatePoolsRESTHandler(clientCtx), - } -} - -func AddDepreciatePoolsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddDepreciatePoolsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} - -func AddEModePairsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add_e_mode_pairs", - Handler: AddEModePairsRESTHandler(clientCtx), - } -} - -func AddEModePairsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req AddEModePairsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} diff --git a/x/lend/expected/keeper.go b/x/lend/expected/keeper.go index fd82cae2c..b375eb935 100644 --- a/x/lend/expected/keeper.go +++ b/x/lend/expected/keeper.go @@ -1,6 +1,7 @@ package expected import ( + auctiontypes "github.com/comdex-official/comdex/x/auction/types" "github.com/comdex-official/comdex/x/liquidation/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -51,6 +52,12 @@ type EsmKeeper interface { type LiquidationKeeper interface { GetLockedVaultByApp(ctx sdk.Context, appID uint64) (lockedVault []types.LockedVault) + GetLockedVault(ctx sdk.Context, appID, id uint64) (lockedVault types.LockedVault, found bool) + DeleteLockedVault(ctx sdk.Context, appID, id uint64) } -type AuctionKeeper interface{} +type AuctionKeeper interface { + GetDutchLendAuctions(ctx sdk.Context, appID uint64) (auctions []auctiontypes.DutchAuction) + SetHistoryDutchLendAuction(ctx sdk.Context, auction auctiontypes.DutchAuction) error + DeleteDutchLendAuction(ctx sdk.Context, auction auctiontypes.DutchAuction) error +} diff --git a/x/lend/handler.go b/x/lend/handler.go index 66c88fec9..b55c5831b 100644 --- a/x/lend/handler.go +++ b/x/lend/handler.go @@ -3,7 +3,7 @@ package lend import ( "fmt" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/pkg/errors" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/lend/keeper/borrow.go b/x/lend/keeper/borrow.go index 14288e855..c9b6ab97e 100644 --- a/x/lend/keeper/borrow.go +++ b/x/lend/keeper/borrow.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/x/lend/types" ) diff --git a/x/lend/keeper/keeper.go b/x/lend/keeper/keeper.go index e933b508a..ff09f8d0c 100644 --- a/x/lend/keeper/keeper.go +++ b/x/lend/keeper/keeper.go @@ -2,28 +2,30 @@ package keeper import ( "fmt" + auctiontypes "github.com/comdex-official/comdex/x/auction/types" "strconv" liquidationtypes "github.com/comdex-official/comdex/x/liquidation/types" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/tendermint/tendermint/libs/log" assettypes "github.com/comdex-official/comdex/x/asset/types" esmtypes "github.com/comdex-official/comdex/x/esm/types" "github.com/comdex-official/comdex/x/lend/expected" "github.com/comdex-official/comdex/x/lend/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" // liquidationtypes "github.com/comdex-official/comdex/x/liquidation/types" ) type ( Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey paramstore paramtypes.Subspace bank expected.BankKeeper account expected.AccountKeeper @@ -38,7 +40,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, ps paramtypes.Subspace, bank expected.BankKeeper, account expected.AccountKeeper, @@ -698,7 +700,7 @@ func (k Keeper) BorrowAsset(ctx sdk.Context, addr string, lendID, pairID uint64, mappingData.BorrowId = append(mappingData.BorrowId, borrowPos.ID) k.SetUserLendBorrowMapping(ctx, mappingData) } else { - updatedAmtIn := AmountIn.Amount.ToDec().Mul(assetInRatesStatsLtv) + updatedAmtIn := sdk.NewDec(AmountIn.Amount.Int64()).Mul(assetInRatesStatsLtv) updatedAmtInPrice, err := k.Market.CalcAssetPrice(ctx, lendPos.AssetID, updatedAmtIn.TruncateInt()) if err != nil { return err @@ -1608,7 +1610,59 @@ func (k Keeper) FundReserveAcc(ctx sdk.Context, assetID uint64, lender string, p } resBals.FundReserveBalance = append(resBals.FundReserveBalance, resBal) k.SetFundReserveBal(ctx, resBals) + err = k.RemoveFaultyAuctions(ctx) + if err != nil { + return err + } + + return nil +} + +func (k Keeper) RemoveFaultyAuctions(ctx sdk.Context) error { + //Send Inflow_token_target_amount to the pool + //Subtract Inflow_token_target_amount from borrow Position + //Add the Borrowed amount in poolLBMapping + //Delete Auction + //Update BorrowPosition Is liquidated -> false + + // get all the current auctions + dutchAuctions := k.Auction.GetDutchLendAuctions(ctx, 3) + for _, dutchAuction := range dutchAuctions { + cPoolModuleName := types.ModuleAcc1 + reserveModuleName := types.ModuleName + //send debt from reserve to the pool + err := k.bank.SendCoinsFromModuleToModule(ctx, reserveModuleName, cPoolModuleName, sdk.NewCoins(dutchAuction.InflowTokenTargetAmount)) + if err != nil { + return err + } + //send collateral to the reserve from auction module outflow_token_current_amount + err = k.bank.SendCoinsFromModuleToModule(ctx, auctiontypes.ModuleName, reserveModuleName, sdk.NewCoins(dutchAuction.OutflowTokenCurrentAmount)) + if err != nil { + return err + } + borrowPos := k.GetBorrowByUserAndAssetID(ctx, dutchAuction.VaultOwner.String(), dutchAuction.InflowTokenTargetAmount.Denom, dutchAuction.AssetOutId) + borrowPos.AmountOut.Amount = borrowPos.AmountOut.Amount.Sub(dutchAuction.InflowTokenTargetAmount.Amount) + borrowPos.IsLiquidated = false + k.SetBorrow(ctx, borrowPos) + + poolAssetLBMappingData, _ := k.GetAssetStatsByPoolIDAndAssetID(ctx, 1, dutchAuction.AssetInId) + + poolAssetLBMappingData.TotalBorrowed = poolAssetLBMappingData.TotalBorrowed.Add(borrowPos.AmountOut.Amount) + k.SetAssetStatsByPoolIDAndAssetID(ctx, poolAssetLBMappingData) + lockedVault, found := k.Liquidation.GetLockedVault(ctx, 3, dutchAuction.LockedVaultId) + if found { + k.Liquidation.DeleteLockedVault(ctx, lockedVault.AppId, lockedVault.LockedVaultId) + } + err = k.Auction.SetHistoryDutchLendAuction(ctx, dutchAuction) + if err != nil { + return err + } + err = k.Auction.DeleteDutchLendAuction(ctx, dutchAuction) + if err != nil { + return err + } + } return nil } @@ -1645,7 +1699,7 @@ func (k Keeper) CreteNewBorrow(ctx sdk.Context, liqBorrow liquidationtypes.Locke // Adjusting bridged asset qty after auctions if !kind.BridgedAssetAmount.Amount.Equal(sdk.ZeroInt()) { - amtIn, _ := k.Market.CalcAssetPrice(ctx, pair.AssetIn, borrowPos.AmountIn.Amount.ToDec().Mul(assetInRatesStats.Ltv).TruncateInt()) + amtIn, _ := k.Market.CalcAssetPrice(ctx, pair.AssetIn, sdk.NewDec(borrowPos.AmountIn.Amount.Int64()).Mul(assetInRatesStats.Ltv).TruncateInt()) priceFirstBridgedAsset, _ := k.Market.CalcAssetPrice(ctx, firstTransitAssetID, sdk.OneInt()) priceSecondBridgedAsset, _ := k.Market.CalcAssetPrice(ctx, secondTransitAssetID, sdk.OneInt()) firstBridgedAsset, _ := k.Asset.GetAsset(ctx, firstTransitAssetID) diff --git a/x/lend/keeper/keeper_test.go b/x/lend/keeper/keeper_test.go index 7d03e0e81..4501279d0 100644 --- a/x/lend/keeper/keeper_test.go +++ b/x/lend/keeper/keeper_test.go @@ -2,14 +2,15 @@ package keeper_test import ( "encoding/binary" - "github.com/comdex-official/comdex/x/lend" - abci "github.com/tendermint/tendermint/abci/types" "testing" + "github.com/comdex-official/comdex/x/lend" + abci "github.com/cometbft/cometbft/abci/types" + assettypes "github.com/comdex-official/comdex/x/asset/types" markettypes "github.com/comdex-official/comdex/x/market/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" "github.com/comdex-official/comdex/x/lend/keeper" @@ -32,7 +33,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.keeper = s.app.LendKeeper s.querier = keeper.QueryServer{Keeper: s.keeper} @@ -297,7 +298,7 @@ func (s *KeeperTestSuite) nextBlock() { lend.BeginBlocker(s.ctx, abci.RequestBeginBlock{ Hash: nil, Header: tmproto.Header{}, - LastCommitInfo: abci.LastCommitInfo{}, + LastCommitInfo: abci.CommitInfo{}, ByzantineValidators: nil, }, s.keeper) diff --git a/x/lend/keeper/lend.go b/x/lend/keeper/lend.go index 3fe59ab8d..f8af87eb7 100644 --- a/x/lend/keeper/lend.go +++ b/x/lend/keeper/lend.go @@ -4,7 +4,7 @@ import ( "sort" sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/x/lend/types" ) diff --git a/x/lend/keeper/maths.go b/x/lend/keeper/maths.go index 5ff43b3f4..30276f6ee 100644 --- a/x/lend/keeper/maths.go +++ b/x/lend/keeper/maths.go @@ -14,10 +14,10 @@ func (k Keeper) GetUtilisationRatioByPoolIDAndAssetID(ctx sdk.Context, poolID, a if !found { return sdk.ZeroDec(), types.ErrAssetStatsNotFound } - if moduleBalance.ToDec().Add(assetStats.TotalBorrowed.Add(assetStats.TotalStableBorrowed).ToDec()).IsZero() { + if sdk.NewDec(moduleBalance.Int64()).Add(sdk.NewDec(assetStats.TotalBorrowed.Add(assetStats.TotalStableBorrowed).Int64())).IsZero() { return sdk.ZeroDec(), nil } - utilizationRatio := (assetStats.TotalBorrowed.Add(assetStats.TotalStableBorrowed).ToDec()).Quo(moduleBalance.ToDec().Add(assetStats.TotalBorrowed.Add(assetStats.TotalStableBorrowed).ToDec())) + utilizationRatio := (sdk.NewDec(assetStats.TotalBorrowed.Add(assetStats.TotalStableBorrowed).Int64())).Quo(sdk.NewDec(moduleBalance.Int64()).Add(sdk.NewDec(assetStats.TotalBorrowed.Add(assetStats.TotalStableBorrowed).Int64()))) return utilizationRatio, nil } @@ -80,10 +80,10 @@ func (k Keeper) GetLendAPRByAssetIDAndPoolID(ctx sdk.Context, poolID, assetID ui func (k Keeper) GetAverageBorrowRate(ctx sdk.Context, poolID, assetID uint64) (sdk.Dec, error) { assetStats, _ := k.UpdateAPR(ctx, poolID, assetID) - factor1 := assetStats.BorrowApr.Mul(assetStats.TotalBorrowed.ToDec()) - factor2 := assetStats.StableBorrowApr.Mul(assetStats.TotalStableBorrowed.ToDec()) + factor1 := assetStats.BorrowApr.Mul(sdk.NewDec(assetStats.TotalBorrowed.Int64())) + factor2 := assetStats.StableBorrowApr.Mul(sdk.NewDec(assetStats.TotalStableBorrowed.Int64())) numerator := factor1.Add(factor2) - denominator := assetStats.TotalStableBorrowed.Add(assetStats.TotalBorrowed).ToDec() + denominator := sdk.NewDec(assetStats.TotalStableBorrowed.Add(assetStats.TotalBorrowed).Int64()) if denominator.LTE(sdk.ZeroDec()) { return sdk.ZeroDec(), types.ErrAverageBorrowRate diff --git a/x/lend/keeper/pair.go b/x/lend/keeper/pair.go index 0849d27ad..b5dedbdde 100644 --- a/x/lend/keeper/pair.go +++ b/x/lend/keeper/pair.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/x/lend/types" ) diff --git a/x/lend/migrations/v2/types/lend.pb.go b/x/lend/migrations/v2/types/lend.pb.go index 9a6e8e617..7e686c635 100644 --- a/x/lend/migrations/v2/types/lend.pb.go +++ b/x/lend/migrations/v2/types/lend.pb.go @@ -2,14 +2,15 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/protobuf/types/known/timestamppb" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/lend/module.go b/x/lend/module.go index 05b78cc5a..0c6c1243c 100644 --- a/x/lend/module.go +++ b/x/lend/module.go @@ -9,7 +9,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -123,19 +123,9 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { @@ -145,6 +135,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err := cfg.RegisterMigration(types.ModuleName, 2, migrator.Migrate2to3); err != nil { panic(fmt.Errorf("failed to migrate %s to v2: %w", types.ModuleName, err)) } + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) } diff --git a/x/lend/module_simulation.go b/x/lend/module_simulation.go index 4e6150ac4..c3e147163 100644 --- a/x/lend/module_simulation.go +++ b/x/lend/module_simulation.go @@ -1,10 +1,8 @@ package lend import ( - "math/rand" - "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -40,9 +38,9 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RandomizedParams creates randomized param changes for the simulator. -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} -} +// func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +// return []simtypes.ParamChange{} +// } // RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/lend/types/codec.go b/x/lend/types/codec.go index de0f6f1d1..b70c00e9f 100644 --- a/x/lend/types/codec.go +++ b/x/lend/types/codec.go @@ -6,7 +6,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { @@ -81,5 +81,6 @@ var ( func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/lend/types/genesis.pb.go b/x/lend/types/genesis.pb.go index f640d5410..edaddc804 100644 --- a/x/lend/types/genesis.pb.go +++ b/x/lend/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/lend/types/gov.go b/x/lend/types/gov.go index ad48e8021..8291eb11a 100644 --- a/x/lend/types/gov.go +++ b/x/lend/types/gov.go @@ -1,7 +1,7 @@ package types import ( - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) var ( @@ -20,27 +20,16 @@ var ( func init() { govtypes.RegisterProposalType(ProposalAddLendPairs) - govtypes.RegisterProposalTypeCodec(&LendPairsProposal{}, "comdex/AddLendPairsProposal") govtypes.RegisterProposalType(ProposalAddMultipleLendPairs) - govtypes.RegisterProposalTypeCodec(&MultipleLendPairsProposal{}, "comdex/AddMultipleLendPairsProposal") govtypes.RegisterProposalType(ProposalAddPool) - govtypes.RegisterProposalTypeCodec(&AddPoolsProposal{}, "comdex/AddPoolsProposal") govtypes.RegisterProposalType(ProposalAddAssetToPair) - govtypes.RegisterProposalTypeCodec(&AddAssetToPairProposal{}, "comdex/AddAssetToPairProposal") govtypes.RegisterProposalType(ProposalAddMultipleAssetToPair) - govtypes.RegisterProposalTypeCodec(&AddMultipleAssetToPairProposal{}, "comdex/AddMultipleAssetToPairProposal") govtypes.RegisterProposalType(ProposalAddAssetRatesParams) - govtypes.RegisterProposalTypeCodec(&AddAssetRatesParams{}, "comdex/AddAssetRatesParams") govtypes.RegisterProposalType(ProposalAddAuctionParams) - govtypes.RegisterProposalTypeCodec(&AddAuctionParamsProposal{}, "comdex/AddAuctionParamsProposal") govtypes.RegisterProposalType(ProposalAddPoolPairs) - govtypes.RegisterProposalTypeCodec(&AddPoolPairsProposal{}, "comdex/AddPoolPairsProposal") govtypes.RegisterProposalType(ProposalAddAssetRatesPoolPairs) - govtypes.RegisterProposalTypeCodec(&AddAssetRatesPoolPairsProposal{}, "comdex/AddAssetRatesPoolPairsProposal") govtypes.RegisterProposalType(ProposalDepreciatePool) - govtypes.RegisterProposalTypeCodec(&AddPoolDepreciateProposal{}, "comdex/AddPoolDepreciateProposal") govtypes.RegisterProposalType(ProposalAddEModePairs) - govtypes.RegisterProposalTypeCodec(&AddEModePairsProposal{}, "comdex/AddEModePairsProposal") } var ( diff --git a/x/lend/types/gov.pb.go b/x/lend/types/gov.pb.go index 21410c846..55f9d5c03 100644 --- a/x/lend/types/gov.pb.go +++ b/x/lend/types/gov.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/lend/types/lend.pb.go b/x/lend/types/lend.pb.go index a32d54ebc..8e515e71d 100644 --- a/x/lend/types/lend.pb.go +++ b/x/lend/types/lend.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -338,7 +338,7 @@ func (m *Pool) GetAssetData() []*AssetDataPoolMapping { type UserAssetLendBorrowMapping struct { Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"` - //to check if poool id is needed + // to check if poool id is needed LendId uint64 `protobuf:"varint,2,opt,name=lend_id,json=lendId,proto3" json:"lend_id,omitempty" yaml:"lend_id"` PoolId uint64 `protobuf:"varint,3,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` BorrowId []uint64 `protobuf:"varint,4,rep,packed,name=borrow_id,json=borrowId,proto3" json:"borrow_id,omitempty" yaml:"borrow_id"` @@ -2282,7 +2282,7 @@ func (m *LendAsset) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x5a } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastInteractionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastInteractionTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastInteractionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastInteractionTime):]) if err1 != nil { return 0, err1 } @@ -2315,7 +2315,7 @@ func (m *LendAsset) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x3a - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LendingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LendingTime):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LendingTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LendingTime):]) if err2 != nil { return 0, err2 } @@ -2395,7 +2395,7 @@ func (m *BorrowAsset) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x72 } - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastInteractionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastInteractionTime):]) + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastInteractionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastInteractionTime):]) if err4 != nil { return 0, err4 } @@ -2443,7 +2443,7 @@ func (m *BorrowAsset) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x4a - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BorrowingTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BorrowingTime):]) + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BorrowingTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BorrowingTime):]) if err5 != nil { return 0, err5 } @@ -3528,7 +3528,7 @@ func (m *FundModBal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.DepositTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositTime):]) + n18, err18 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.DepositTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DepositTime):]) if err18 != nil { return 0, err18 } @@ -3586,7 +3586,7 @@ func (m *FundReserveBal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - n20, err20 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.DepositTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositTime):]) + n20, err20 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.DepositTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DepositTime):]) if err20 != nil { return 0, err20 } @@ -4367,7 +4367,7 @@ func (m *LendAsset) Size() (n int) { } l = m.AmountIn.Size() n += 1 + l + sovLend(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LendingTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LendingTime) n += 1 + l + sovLend(uint64(l)) l = m.AvailableToBorrow.Size() n += 1 + l + sovLend(uint64(l)) @@ -4376,7 +4376,7 @@ func (m *LendAsset) Size() (n int) { } l = m.GlobalIndex.Size() n += 1 + l + sovLend(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastInteractionTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastInteractionTime) n += 1 + l + sovLend(uint64(l)) l = len(m.CPoolName) if l > 0 { @@ -4411,7 +4411,7 @@ func (m *BorrowAsset) Size() (n int) { n += 1 + l + sovLend(uint64(l)) l = m.BridgedAssetAmount.Size() n += 1 + l + sovLend(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BorrowingTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BorrowingTime) n += 1 + l + sovLend(uint64(l)) l = m.StableBorrowRate.Size() n += 1 + l + sovLend(uint64(l)) @@ -4421,7 +4421,7 @@ func (m *BorrowAsset) Size() (n int) { n += 1 + l + sovLend(uint64(l)) l = m.ReserveGlobalIndex.Size() n += 1 + l + sovLend(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastInteractionTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastInteractionTime) n += 1 + l + sovLend(uint64(l)) l = len(m.CPoolName) if l > 0 { @@ -4800,7 +4800,7 @@ func (m *FundModBal) Size() (n int) { } l = m.AmountIn.Size() n += 1 + l + sovLend(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DepositTime) n += 1 + l + sovLend(uint64(l)) l = len(m.Funder) if l > 0 { @@ -4820,7 +4820,7 @@ func (m *FundReserveBal) Size() (n int) { } l = m.AmountIn.Size() n += 1 + l + sovLend(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DepositTime) n += 1 + l + sovLend(uint64(l)) l = len(m.Funder) if l > 0 { @@ -5273,7 +5273,7 @@ func (m *LendAsset) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LendingTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LendingTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5393,7 +5393,7 @@ func (m *LendAsset) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastInteractionTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LastInteractionTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5718,7 +5718,7 @@ func (m *BorrowAsset) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BorrowingTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BorrowingTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5887,7 +5887,7 @@ func (m *BorrowAsset) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastInteractionTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LastInteractionTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9040,7 +9040,7 @@ func (m *FundModBal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.DepositTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.DepositTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9207,7 +9207,7 @@ func (m *FundReserveBal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.DepositTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.DepositTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/lend/types/params.pb.go b/x/lend/types/params.pb.go index 0372d493a..fa0c13f1b 100644 --- a/x/lend/types/params.pb.go +++ b/x/lend/types/params.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/lend/types/query.pb.go b/x/lend/types/query.pb.go index f0c53dcc4..88f3d9cea 100644 --- a/x/lend/types/query.pb.go +++ b/x/lend/types/query.pb.go @@ -9,9 +9,9 @@ import ( _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/lend/types/tx.pb.go b/x/lend/types/tx.pb.go index 2dd5f4111..80eed8f03 100644 --- a/x/lend/types/tx.pb.go +++ b/x/lend/types/tx.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/liquidation/abci.go b/x/liquidation/abci.go index 8fc34a5e4..d7bd48b89 100644 --- a/x/liquidation/abci.go +++ b/x/liquidation/abci.go @@ -3,9 +3,9 @@ package liquidation import ( "fmt" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" "github.com/comdex-official/comdex/x/liquidation/keeper" "github.com/comdex-official/comdex/x/liquidation/types" diff --git a/x/liquidation/keeper/keeper.go b/x/liquidation/keeper/keeper.go index b84f0f29f..8ca65772c 100644 --- a/x/liquidation/keeper/keeper.go +++ b/x/liquidation/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,12 +11,13 @@ import ( "github.com/comdex-official/comdex/x/liquidation/expected" "github.com/comdex-official/comdex/x/liquidation/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) type Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey paramstore paramtypes.Subspace account expected.AccountKeeper bank expected.BankKeeper @@ -32,7 +33,7 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, ps paramtypes.Subspace, account expected.AccountKeeper, bank expected.BankKeeper, diff --git a/x/liquidation/keeper/keeper_test.go b/x/liquidation/keeper/keeper_test.go index 24b9a73e3..32e15a725 100644 --- a/x/liquidation/keeper/keeper_test.go +++ b/x/liquidation/keeper/keeper_test.go @@ -1,14 +1,15 @@ package keeper_test import ( - lendkeeper "github.com/comdex-official/comdex/x/lend/keeper" "testing" "time" + lendkeeper "github.com/comdex-official/comdex/x/lend/keeper" + "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" assetKeeper "github.com/comdex-official/comdex/x/asset/keeper" @@ -43,7 +44,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.vaultKeeper = s.app.VaultKeeper s.liquidationKeeper = s.app.LiquidationKeeper diff --git a/x/liquidation/keeper/liquidate_borrow_test.go b/x/liquidation/keeper/liquidate_borrow_test.go index a0de5aece..cbcd5dc45 100644 --- a/x/liquidation/keeper/liquidate_borrow_test.go +++ b/x/liquidation/keeper/liquidate_borrow_test.go @@ -662,5 +662,5 @@ func (s *KeeperTestSuite) TestLiquidateBorrows() { updatedPrice := price.Sub(price.Mul(Dec("0.09090909090"))) s.Require().Equal(lockedVault[0].CollateralToBeAuctioned.TruncateInt(), updatedPrice.TruncateInt()) - s.Require().Equal(lockedVault[0].CrAtLiquidation, lockedVault[0].AmountOut.ToDec().Mul(s.GetAssetPrice(2)).Quo(beforeAmtIn.ToDec().Mul(s.GetAssetPrice(1)))) + s.Require().Equal(lockedVault[0].CrAtLiquidation, sdk.NewDec(lockedVault[0].AmountOut.Int64()).Mul(s.GetAssetPrice(2)).Quo(sdk.NewDec(beforeAmtIn.Int64()).Mul(s.GetAssetPrice(1)))) } diff --git a/x/liquidation/keeper/liquidate_vaults.go b/x/liquidation/keeper/liquidate_vaults.go index 1a128c7b1..0469dbcee 100644 --- a/x/liquidation/keeper/liquidate_vaults.go +++ b/x/liquidation/keeper/liquidate_vaults.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidation/types" diff --git a/x/liquidation/keeper/liquidate_vaults_test.go b/x/liquidation/keeper/liquidate_vaults_test.go index 1b78ef8a4..38609d01e 100644 --- a/x/liquidation/keeper/liquidate_vaults_test.go +++ b/x/liquidation/keeper/liquidate_vaults_test.go @@ -264,7 +264,7 @@ func (s *KeeperTestSuite) TestLiquidateVaults1() { price, err := s.app.MarketKeeper.CalcAssetPrice(*ctx, uint64(1), beforeVault.AmountIn) s.Require().NoError(err) s.Require().Equal(lockedVault[0].CollateralToBeAuctioned, price) - s.Require().Equal(lockedVault[0].CrAtLiquidation, lockedVault[0].AmountIn.ToDec().Mul(s.GetAssetPrice(1)).Quo(lockedVault[0].AmountOut.ToDec().Mul(s.GetAssetPrice(2)))) + s.Require().Equal(lockedVault[0].CrAtLiquidation, sdk.NewDec(lockedVault[0].AmountIn.Int64()).Mul(s.GetAssetPrice(1)).Quo(sdk.NewDec(lockedVault[0].AmountOut.Int64()).Mul(s.GetAssetPrice(2)))) } func (s *KeeperTestSuite) TestUpdateLockedVaults() { @@ -272,7 +272,7 @@ func (s *KeeperTestSuite) TestUpdateLockedVaults() { liquidationKeeper, ctx := &s.liquidationKeeper, &s.ctx lockedVault1 := liquidationKeeper.GetLockedVaults(*ctx) - s.Require().Equal(lockedVault1[0].CrAtLiquidation, lockedVault1[0].AmountIn.ToDec().Mul(s.GetAssetPrice(1)).Quo(lockedVault1[0].AmountOut.ToDec().Mul(s.GetAssetPrice(2)))) + s.Require().Equal(lockedVault1[0].CrAtLiquidation, sdk.NewDec(lockedVault1[0].AmountIn.Int64()).Mul(s.GetAssetPrice(1)).Quo(sdk.NewDec(lockedVault1[0].AmountOut.Int64()).Mul(s.GetAssetPrice(2)))) } func (s *KeeperTestSuite) TestSetFlags() { diff --git a/x/liquidation/module.go b/x/liquidation/module.go index a3650763f..104846cee 100644 --- a/x/liquidation/module.go +++ b/x/liquidation/module.go @@ -9,7 +9,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -120,19 +120,9 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(configurator module.Configurator) { diff --git a/x/liquidation/types/codec.go b/x/liquidation/types/codec.go index db2f55517..c20d7f0ab 100644 --- a/x/liquidation/types/codec.go +++ b/x/liquidation/types/codec.go @@ -24,11 +24,12 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { var ( amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) + ModuleCdc = codec.NewAminoCodec(amino) ) func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/liquidation/types/genesis.pb.go b/x/liquidation/types/genesis.pb.go index 3a3d8adb5..558d84e57 100644 --- a/x/liquidation/types/genesis.pb.go +++ b/x/liquidation/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/liquidation/types/liquidations.pb.go b/x/liquidation/types/liquidations.pb.go index d09063c61..9554890af 100644 --- a/x/liquidation/types/liquidations.pb.go +++ b/x/liquidation/types/liquidations.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/liquidation/types/locked_vault.pb.go b/x/liquidation/types/locked_vault.pb.go index 8d10a9254..61c76493c 100644 --- a/x/liquidation/types/locked_vault.pb.go +++ b/x/liquidation/types/locked_vault.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -295,7 +295,7 @@ func (m *LockedVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x82 } } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LiquidationTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LiquidationTimestamp):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LiquidationTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LiquidationTimestamp):]) if err1 != nil { return 0, err1 } @@ -556,7 +556,7 @@ func (m *LockedVault) Size() (n int) { n += 1 + l + sovLockedVault(uint64(l)) l = m.CollateralToBeAuctioned.Size() n += 1 + l + sovLockedVault(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LiquidationTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LiquidationTimestamp) n += 1 + l + sovLockedVault(uint64(l)) if len(m.SellOffHistory) > 0 { for _, s := range m.SellOffHistory { @@ -1051,7 +1051,7 @@ func (m *LockedVault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LiquidationTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LiquidationTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/liquidation/types/params.pb.go b/x/liquidation/types/params.pb.go index 5858b1e27..ac8a1d156 100644 --- a/x/liquidation/types/params.pb.go +++ b/x/liquidation/types/params.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/liquidation/types/querier.pb.go b/x/liquidation/types/querier.pb.go index 14578cdf1..eaf8f5839 100644 --- a/x/liquidation/types/querier.pb.go +++ b/x/liquidation/types/querier.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/liquidation/types/tx.pb.go b/x/liquidation/types/tx.pb.go index fd05a5443..315be0096 100644 --- a/x/liquidation/types/tx.pb.go +++ b/x/liquidation/types/tx.pb.go @@ -6,9 +6,9 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/liquidationsV2/abci.go b/x/liquidationsV2/abci.go index 8a191f856..b8d3ad507 100644 --- a/x/liquidationsV2/abci.go +++ b/x/liquidationsV2/abci.go @@ -2,11 +2,12 @@ package liquidationsV2 import ( "fmt" + "github.com/comdex-official/comdex/x/liquidationsV2/keeper" "github.com/comdex-official/comdex/x/liquidationsV2/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" ) func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) { diff --git a/x/liquidationsV2/client/cli/tx.go b/x/liquidationsV2/client/cli/tx.go index 21c37721e..ec429d4a1 100644 --- a/x/liquidationsV2/client/cli/tx.go +++ b/x/liquidationsV2/client/cli/tx.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" flag "github.com/spf13/pflag" "strconv" "time" @@ -181,7 +181,11 @@ func NewCmdSubmitWhitelistingLiquidationProposal() *cobra.Command { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err !=nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) txf, msg, err := WhitelistLiquidation(clientCtx, txf, cmd.Flags()) if err != nil { diff --git a/x/liquidationsV2/client/proposal_handler.go b/x/liquidationsV2/client/proposal_handler.go index 2db6adcc5..3cf3d645a 100644 --- a/x/liquidationsV2/client/proposal_handler.go +++ b/x/liquidationsV2/client/proposal_handler.go @@ -2,10 +2,9 @@ package client import ( "github.com/comdex-official/comdex/x/liquidationsV2/client/cli" - "github.com/comdex-official/comdex/x/liquidationsV2/client/rest" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" ) var LiquidationsV2Handler = []govclient.ProposalHandler{ - govclient.NewProposalHandler(cli.NewCmdSubmitWhitelistingLiquidationProposal, rest.AddNewWhitelistingLiquidationRESTHandler), + govclient.NewProposalHandler(cli.NewCmdSubmitWhitelistingLiquidationProposal), } diff --git a/x/liquidationsV2/client/rest/tx.go b/x/liquidationsV2/client/rest/tx.go deleted file mode 100644 index 5536b81a5..000000000 --- a/x/liquidationsV2/client/rest/tx.go +++ /dev/null @@ -1,29 +0,0 @@ -package rest - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - "net/http" -) - -type ( - WhitelistingLiquidationRequest struct{} -) - -func AddNewWhitelistingLiquidationRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "add-liquidation-whitelisting", - Handler: WhitelistingLiquidationRequestRESTHandler(clientCtx), - } -} - -func WhitelistingLiquidationRequestRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req WhitelistingLiquidationRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - } -} diff --git a/x/liquidationsV2/handler.go b/x/liquidationsV2/handler.go index 1bc73fefd..b9568b37a 100644 --- a/x/liquidationsV2/handler.go +++ b/x/liquidationsV2/handler.go @@ -5,7 +5,7 @@ import ( "github.com/comdex-official/comdex/x/liquidationsV2/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // NewHandler ... diff --git a/x/liquidationsV2/keeper/keeper.go b/x/liquidationsV2/keeper/keeper.go index 0441400cc..59c4431e6 100644 --- a/x/liquidationsV2/keeper/keeper.go +++ b/x/liquidationsV2/keeper/keeper.go @@ -3,20 +3,21 @@ package keeper import ( "fmt" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/comdex-official/comdex/x/liquidationsV2/expected" "github.com/comdex-official/comdex/x/liquidationsV2/types" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) type Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey paramstore paramtypes.Subspace account expected.AccountKeeper bank expected.BankKeeper @@ -33,7 +34,7 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, ps paramtypes.Subspace, account expected.AccountKeeper, bank expected.BankKeeper, diff --git a/x/liquidationsV2/keeper/keeper_test.go b/x/liquidationsV2/keeper/keeper_test.go index 0a898da47..b8f6acb00 100644 --- a/x/liquidationsV2/keeper/keeper_test.go +++ b/x/liquidationsV2/keeper/keeper_test.go @@ -15,9 +15,9 @@ import ( markettypes "github.com/comdex-official/comdex/x/market/types" vaultKeeper "github.com/comdex-official/comdex/x/vault/keeper" vaultTypes "github.com/comdex-official/comdex/x/vault/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "testing" ) @@ -46,7 +46,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.vaultKeeper = s.app.VaultKeeper s.liquidationKeeper = s.app.NewliqKeeper diff --git a/x/liquidationsV2/keeper/liquidate.go b/x/liquidationsV2/keeper/liquidate.go index 68e5bf800..bc1fbf687 100644 --- a/x/liquidationsV2/keeper/liquidate.go +++ b/x/liquidationsV2/keeper/liquidate.go @@ -527,7 +527,7 @@ func (k Keeper) CheckStatsForSurplusAndDebt(ctx sdk.Context, appID, assetID uint // // --Collateral cmst harbor // debt harbor cmst -func (k Keeper) DebtTokenAmount(ctx sdk.Context, CollateralAssetId, DebtAssetID uint64, lotSize, debtLotSize sdk.Int) (collateralToken, debtToken sdk.Coin) { +func (k Keeper) DebtTokenAmount(ctx sdk.Context, DebtAssetID, CollateralAssetId uint64, lotSize, debtLotSize sdk.Int) (collateralToken, debtToken sdk.Coin) { collateralAsset, found1 := k.asset.GetAsset(ctx, CollateralAssetId) debtAsset, found2 := k.asset.GetAsset(ctx, DebtAssetID) if !found1 || !found2 { diff --git a/x/liquidationsV2/keeper/liquidations.go b/x/liquidationsV2/keeper/liquidations.go index 2af4e76d7..bba2dd07e 100644 --- a/x/liquidationsV2/keeper/liquidations.go +++ b/x/liquidationsV2/keeper/liquidations.go @@ -3,7 +3,7 @@ package keeper import ( "github.com/comdex-official/comdex/x/liquidationsV2/types" sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" ) // locked vaults kvs diff --git a/x/liquidationsV2/keeper/msg_server_test.go b/x/liquidationsV2/keeper/msg_server_test.go index 33046f327..2f99083a4 100644 --- a/x/liquidationsV2/keeper/msg_server_test.go +++ b/x/liquidationsV2/keeper/msg_server_test.go @@ -281,8 +281,8 @@ func (s *KeeperTestSuite) TestLiquidateVaults() { s.Require().Equal(lockedVault[0].Owner, beforeVault.Owner) s.Require().Equal(lockedVault[0].CollateralToken.Amount, beforeVault.AmountIn) s.Require().Equal(lockedVault[0].DebtToken.Amount, beforeVault.AmountOut) - s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(beforeVault.AmountOut.ToDec().Mul(newDec("0.12")).TruncateInt())) - s.Require().Equal(lockedVault[0].FeeToBeCollected, beforeVault.AmountOut.ToDec().Mul(newDec("0.12")).TruncateInt()) + s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(sdk.NewDec(beforeVault.AmountOut.Int64()).Mul(newDec("0.12")).TruncateInt())) + s.Require().Equal(lockedVault[0].FeeToBeCollected, sdk.NewDec(beforeVault.AmountOut.Int64()).Mul(newDec("0.12")).TruncateInt()) s.Require().Equal(lockedVault[0].IsDebtCmst, false) s.Require().Equal(lockedVault[0].CollateralAssetId, uint64(2)) s.Require().Equal(lockedVault[0].DebtAssetId, uint64(3)) @@ -337,8 +337,8 @@ func (s *KeeperTestSuite) TestLiquidateBorrows() { s.Require().Equal(lockedVault[0].Owner, beforeLend.Owner) s.Require().Equal(lockedVault[0].CollateralToken.Amount, beforeBorrow.AmountIn.Amount) s.Require().Equal(lockedVault[0].DebtToken.Amount, beforeBorrow.AmountOut.Amount) - s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(beforeBorrow.AmountOut.Amount.ToDec().Mul(newDec("0.05")).TruncateInt())) - s.Require().Equal(lockedVault[0].FeeToBeCollected, beforeBorrow.AmountOut.Amount.ToDec().Mul(newDec("0.05")).TruncateInt()) + s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(sdk.NewDec(beforeBorrow.AmountOut.Amount.Int64()).Mul(newDec("0.05")).TruncateInt())) + s.Require().Equal(lockedVault[0].FeeToBeCollected, sdk.NewDec(beforeBorrow.AmountOut.Amount.Int64()).Mul(newDec("0.05")).TruncateInt()) s.Require().Equal(lockedVault[0].IsDebtCmst, false) s.Require().Equal(lockedVault[0].CollateralAssetId, uint64(1)) s.Require().Equal(lockedVault[0].DebtAssetId, uint64(2)) @@ -434,8 +434,8 @@ func (s *KeeperTestSuite) TestLiquidateInternalKeeperForVault() { s.Require().Equal(lockedVault[0].Owner, beforeVault.Owner) s.Require().Equal(lockedVault[0].CollateralToken.Amount, beforeVault.AmountIn) s.Require().Equal(lockedVault[0].DebtToken.Amount, beforeVault.AmountOut) - s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(beforeVault.AmountOut.ToDec().Mul(newDec("0.12")).TruncateInt())) - s.Require().Equal(lockedVault[0].FeeToBeCollected, beforeVault.AmountOut.ToDec().Mul(newDec("0.12")).TruncateInt()) + s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(sdk.NewDec(beforeVault.AmountOut.Int64()).Mul(newDec("0.12")).TruncateInt())) + s.Require().Equal(lockedVault[0].FeeToBeCollected, sdk.NewDec(beforeVault.AmountOut.Int64()).Mul(newDec("0.12")).TruncateInt()) s.Require().Equal(lockedVault[0].IsDebtCmst, false) s.Require().Equal(lockedVault[0].CollateralAssetId, uint64(2)) s.Require().Equal(lockedVault[0].DebtAssetId, uint64(3)) @@ -533,8 +533,8 @@ func (s *KeeperTestSuite) TestLiquidateInternalKeeperForBorrow() { s.Require().Equal(lockedVault[0].Owner, beforeLend.Owner) s.Require().Equal(lockedVault[0].CollateralToken.Amount, beforeBorrow.AmountIn.Amount) s.Require().Equal(lockedVault[0].DebtToken.Amount, beforeBorrow.AmountOut.Amount) - s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(beforeBorrow.AmountOut.Amount.ToDec().Mul(newDec("0.05")).TruncateInt())) - s.Require().Equal(lockedVault[0].FeeToBeCollected, beforeBorrow.AmountOut.Amount.ToDec().Mul(newDec("0.05")).TruncateInt()) + s.Require().Equal(lockedVault[0].TargetDebt.Amount, lockedVault[0].DebtToken.Amount.Add(sdk.NewDec(beforeBorrow.AmountOut.Amount.Int64()).Mul(newDec("0.05")).TruncateInt())) + s.Require().Equal(lockedVault[0].FeeToBeCollected, sdk.NewDec(beforeBorrow.AmountOut.Amount.Int64()).Mul(newDec("0.05")).TruncateInt()) s.Require().Equal(lockedVault[0].IsDebtCmst, false) s.Require().Equal(lockedVault[0].CollateralAssetId, uint64(1)) s.Require().Equal(lockedVault[0].DebtAssetId, uint64(2)) @@ -775,12 +775,12 @@ func (s *KeeperTestSuite) WasmSetCollectorLookupTableAndAuctionControlForDebt() AppID: 2, CollectorAssetID: 2, SecondaryAssetID: 3, - SurplusThreshold: sdk.NewInt(10000000), - DebtThreshold: sdk.NewInt(5000000), + SurplusThreshold: sdk.NewInt(1000000000000000000), + DebtThreshold: sdk.NewInt(282078000000), LockerSavingRate: sdk.MustNewDecFromStr("0.1"), - LotSize: sdk.NewInt(200000), + LotSize: sdk.NewInt(25000000000), BidFactor: sdk.MustNewDecFromStr("0.01"), - DebtLotSize: sdk.NewInt(2000000), + DebtLotSize: sdk.NewInt(13157894000000), }, }, } { diff --git a/x/liquidationsV2/module.go b/x/liquidationsV2/module.go index cbab44915..c76e2c036 100644 --- a/x/liquidationsV2/module.go +++ b/x/liquidationsV2/module.go @@ -4,13 +4,14 @@ import ( "context" "encoding/json" "fmt" + // this line is used by starport scaffolding # 1 "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/comdex-official/comdex/x/liquidationsV2/client/cli" "github.com/comdex-official/comdex/x/liquidationsV2/keeper" @@ -119,22 +120,13 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) } diff --git a/x/liquidationsV2/module_simulation.go b/x/liquidationsV2/module_simulation.go index 8a30f16f1..1d5331f17 100644 --- a/x/liquidationsV2/module_simulation.go +++ b/x/liquidationsV2/module_simulation.go @@ -1,13 +1,12 @@ package liquidationsV2 import ( - "math/rand" "github.com/comdex-official/comdex/testutil/sample" newliqsimulation "github.com/comdex-official/comdex/x/liquidationsV2/simulation" "github.com/comdex-official/comdex/x/liquidationsV2/types" "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -46,10 +45,10 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RandomizedParams creates randomized param changes for the simulator -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +// func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} -} +// return []simtypes.ParamChange{} +// } // RegisterStoreDecoder registers a decoder func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/liquidationsV2/types/codec.go b/x/liquidationsV2/types/codec.go index 493ba95f1..b9480ac39 100644 --- a/x/liquidationsV2/types/codec.go +++ b/x/liquidationsV2/types/codec.go @@ -5,7 +5,7 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" // this line is used by starport scaffolding # 1 "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -33,11 +33,12 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { var ( amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) + ModuleCdc = codec.NewAminoCodec(amino) ) func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/liquidationsV2/types/genesis.pb.go b/x/liquidationsV2/types/genesis.pb.go index 73aef3044..bf44cc4db 100644 --- a/x/liquidationsV2/types/genesis.pb.go +++ b/x/liquidationsV2/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/liquidationsV2/types/gov.go b/x/liquidationsV2/types/gov.go index e16671d00..e165126bc 100644 --- a/x/liquidationsV2/types/gov.go +++ b/x/liquidationsV2/types/gov.go @@ -1,7 +1,7 @@ package types import ( - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -10,7 +10,6 @@ const ( func init() { govtypes.RegisterProposalType(ProposalWhitelistLiquidation) - govtypes.RegisterProposalTypeCodec(&WhitelistLiquidationProposal{}, "comdex/AddWhitelistLiquidation") } var ( diff --git a/x/liquidationsV2/types/gov.pb.go b/x/liquidationsV2/types/gov.pb.go index f8f83d14c..9bb5db8d6 100644 --- a/x/liquidationsV2/types/gov.pb.go +++ b/x/liquidationsV2/types/gov.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/liquidationsV2/types/liquidate.pb.go b/x/liquidationsV2/types/liquidate.pb.go index d4681b501..aa8e0717e 100644 --- a/x/liquidationsV2/types/liquidate.pb.go +++ b/x/liquidationsV2/types/liquidate.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -947,7 +947,7 @@ func (m *LockedVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x60 } - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LiquidationTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LiquidationTimestamp):]) + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LiquidationTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LiquidationTimestamp):]) if err5 != nil { return 0, err5 } @@ -1203,7 +1203,7 @@ func (m *LockedVault) Size() (n int) { n += 1 + l + sovLiquidate(uint64(l)) l = m.TargetDebt.Size() n += 1 + l + sovLiquidate(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LiquidationTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LiquidationTimestamp) n += 1 + l + sovLiquidate(uint64(l)) if m.IsInternalKeeper { n += 2 @@ -2494,7 +2494,7 @@ func (m *LockedVault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LiquidationTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LiquidationTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/liquidationsV2/types/params.pb.go b/x/liquidationsV2/types/params.pb.go index 0fb2eb101..a534094ae 100644 --- a/x/liquidationsV2/types/params.pb.go +++ b/x/liquidationsV2/types/params.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/liquidationsV2/types/query.pb.go b/x/liquidationsV2/types/query.pb.go index 7873ee24e..8f4e6ab9d 100644 --- a/x/liquidationsV2/types/query.pb.go +++ b/x/liquidationsV2/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/liquidationsV2/types/tx.pb.go b/x/liquidationsV2/types/tx.pb.go index ac7e78b61..61eb1d844 100644 --- a/x/liquidationsV2/types/tx.pb.go +++ b/x/liquidationsV2/types/tx.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/liquidity/amm/amm.go b/x/liquidity/amm/amm.go index 13032a3a7..e29578010 100644 --- a/x/liquidity/amm/amm.go +++ b/x/liquidity/amm/amm.go @@ -1,17 +1,17 @@ package amm import ( - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" ) // The minimum and maximum coin amount used in the amm package. var ( - MinCoinAmount = sdk.NewInt(100) - MaxCoinAmount = sdk.NewIntWithDecimal(1, 40) + MinCoinAmount = sdkmath.NewInt(100) + MaxCoinAmount = sdkmath.NewIntWithDecimal(1, 40) ) var ( - MinPoolPrice = sdk.NewDecWithPrec(1, 15) // 10^-15 - MaxPoolPrice = sdk.NewIntWithDecimal(1, 20).ToDec() // 10^20 - MinRangedPoolPriceGapRatio = sdk.NewDecWithPrec(1, 3) // 0.001, 0.1% + MinPoolPrice = sdkmath.LegacyNewDecWithPrec(1, 15) // 10^-15 + MaxPoolPrice = sdkmath.LegacyNewDecFromInt(sdkmath.NewIntWithDecimal(1, 20)) // 10^20 + MinRangedPoolPriceGapRatio = sdkmath.LegacyNewDecWithPrec(1, 3) // 0.001, 0.1% ) diff --git a/x/liquidity/amm/match.go b/x/liquidity/amm/match.go index 97527aac6..2d645674e 100644 --- a/x/liquidity/amm/match.go +++ b/x/liquidity/amm/match.go @@ -3,7 +3,7 @@ package amm import ( "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" ) // PriceDirection specifies estimated price direction within this batch. @@ -29,12 +29,12 @@ func (dir PriceDirection) String() string { } // FillOrder fills the order by given amount and price. -func FillOrder(order Order, amt sdk.Int, price sdk.Dec) (quoteCoinDiff sdk.Int) { +func FillOrder(order Order, amt sdkmath.Int, price sdkmath.LegacyDec) (quoteCoinDiff sdkmath.Int) { matchableAmt := MatchableAmount(order, price) if amt.GT(matchableAmt) { panic(fmt.Errorf("cannot match more than open amount; %s > %s", amt, matchableAmt)) } - var paid, received sdk.Int + var paid, received sdkmath.Int switch order.GetDirection() { case Buy: paid = price.MulInt(amt).Ceil().TruncateInt() @@ -52,8 +52,8 @@ func FillOrder(order Order, amt sdk.Int, price sdk.Dec) (quoteCoinDiff sdk.Int) } // FulfillOrder fills the order by its remaining open amount at given price. -func FulfillOrder(order Order, price sdk.Dec) (quoteCoinDiff sdk.Int) { - quoteCoinDiff = sdk.ZeroInt() +func FulfillOrder(order Order, price sdkmath.LegacyDec) (quoteCoinDiff sdkmath.Int) { + quoteCoinDiff = sdkmath.ZeroInt() matchableAmt := MatchableAmount(order, price) if matchableAmt.IsPositive() { quoteCoinDiff = quoteCoinDiff.Add(FillOrder(order, matchableAmt, price)) @@ -63,25 +63,25 @@ func FulfillOrder(order Order, price sdk.Dec) (quoteCoinDiff sdk.Int) { // FulfillOrders fills multiple orders by their remaining open amount // at given price. -func FulfillOrders(orders []Order, price sdk.Dec) (quoteCoinDiff sdk.Int) { - quoteCoinDiff = sdk.ZeroInt() +func FulfillOrders(orders []Order, price sdkmath.LegacyDec) (quoteCoinDiff sdkmath.Int) { + quoteCoinDiff = sdkmath.ZeroInt() for _, order := range orders { quoteCoinDiff = quoteCoinDiff.Add(FulfillOrder(order, price)) } return } -func FindMatchPrice(ov OrderView, tickPrec int) (matchPrice sdk.Dec, found bool) { +func FindMatchPrice(ov OrderView, tickPrec int) (matchPrice sdkmath.LegacyDec, found bool) { highestBuyPrice, found := ov.HighestBuyPrice() if !found { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } lowestSellPrice, found := ov.LowestSellPrice() if !found { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } if highestBuyPrice.LT(lowestSellPrice) { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } prec := TickPrecision(tickPrec) @@ -93,14 +93,14 @@ func FindMatchPrice(ov OrderView, tickPrec int) (matchPrice sdk.Dec, found bool) return sellAmt.IsPositive() && ov.BuyAmountOver(prec.TickFromIndex(i+1), true).LTE(sellAmt) }) if !found { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } j, found = findFirstTrueCondition(highestTickIdx, lowestTickIdx, func(i int) bool { buyAmt := ov.BuyAmountOver(prec.TickFromIndex(i), true) return buyAmt.IsPositive() && buyAmt.GTE(ov.SellAmountUnder(prec.TickFromIndex(i-1), true)) }) if !found { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } midTick := TickFromIndex(i, tickPrec).Add(TickFromIndex(j, tickPrec)).QuoInt64(2) return RoundPrice(midTick, tickPrec), true @@ -108,12 +108,12 @@ func FindMatchPrice(ov OrderView, tickPrec int) (matchPrice sdk.Dec, found bool) // FindMatchableAmountAtSinglePrice returns the largest matchable amount of orders // when matching orders at single price(batch auction). -func (ob *OrderBook) FindMatchableAmountAtSinglePrice(matchPrice sdk.Dec) (matchableAmt sdk.Int, found bool) { +func (ob *OrderBook) FindMatchableAmountAtSinglePrice(matchPrice sdkmath.LegacyDec) (matchableAmt sdkmath.Int, found bool) { type Side struct { ticks []*orderBookTick - totalMatchableAmt sdk.Int + totalMatchableAmt sdkmath.Int i int - partialMatchAmt sdk.Int + partialMatchAmt sdkmath.Int } buildSide := func(ticks []*orderBookTick, priceIncreasing bool) (side *Side) { side = &Side{totalMatchableAmt: zeroInt} @@ -130,11 +130,11 @@ func (ob *OrderBook) FindMatchableAmountAtSinglePrice(matchPrice sdk.Dec) (match } buySide := buildSide(ob.buys.ticks, ob.buys.priceIncreasing) if len(buySide.ticks) == 0 { - return sdk.Int{}, false + return sdkmath.Int{}, false } sellSide := buildSide(ob.sells.ticks, ob.sells.priceIncreasing) if len(sellSide.ticks) == 0 { - return sdk.Int{}, false + return sdkmath.Int{}, false } sides := map[OrderDirection]*Side{ Buy: buySide, @@ -153,13 +153,13 @@ func (ob *OrderBook) FindMatchableAmountAtSinglePrice(matchPrice sdk.Dec) (match // FindMatchableAmountAtSinglePrice won't return a negative amount because // the if-block below would set ok = false if otherTicksAmt >= matchAmt // and the loop would be continued. - matchableAmt = sdk.MinInt(buySide.totalMatchableAmt, sellSide.totalMatchableAmt) + matchableAmt = sdkmath.MinInt(buySide.totalMatchableAmt, sellSide.totalMatchableAmt) otherTicksAmt := side.totalMatchableAmt.Sub(tickAmt) side.partialMatchAmt = matchableAmt.Sub(otherTicksAmt) if otherTicksAmt.GTE(matchableAmt) || (dir == Sell && matchPrice.MulInt(side.partialMatchAmt).TruncateInt().IsZero()) { if i == 0 { // There's no orders left, which means orders are not matchable. - return sdk.Int{}, false + return sdkmath.Int{}, false } side.totalMatchableAmt = side.totalMatchableAmt.Sub(tickAmt) side.i-- @@ -175,12 +175,12 @@ func (ob *OrderBook) FindMatchableAmountAtSinglePrice(matchPrice sdk.Dec) (match // MatchAtSinglePrice matches all matchable orders(buy orders with higher(or equal) price // than the price and sell orders with lower(or equal) price than the price) // at the price. -func (ob *OrderBook) MatchAtSinglePrice(matchPrice sdk.Dec) (quoteCoinDiff sdk.Int, matched bool) { +func (ob *OrderBook) MatchAtSinglePrice(matchPrice sdkmath.LegacyDec) (quoteCoinDiff sdkmath.Int, matched bool) { matchableAmt, found := ob.FindMatchableAmountAtSinglePrice(matchPrice) if !found { - return sdk.Int{}, false + return sdkmath.Int{}, false } - quoteCoinDiff = sdk.ZeroInt() + quoteCoinDiff = sdkmath.ZeroInt() distributeToTicks := func(ticks []*orderBookTick) { remainingAmt := matchableAmt for _, tick := range ticks { @@ -205,10 +205,10 @@ func (ob *OrderBook) MatchAtSinglePrice(matchPrice sdk.Dec) (quoteCoinDiff sdk.I // PriceDirection returns the estimated price direction within this batch // considering the last price. -func (ob *OrderBook) PriceDirection(lastPrice sdk.Dec) PriceDirection { +func (ob *OrderBook) PriceDirection(lastPrice sdkmath.LegacyDec) PriceDirection { // TODO: use OrderBookView - buyAmtOverLastPrice := sdk.ZeroInt() - buyAmtAtLastPrice := sdk.ZeroInt() + buyAmtOverLastPrice := sdkmath.ZeroInt() + buyAmtAtLastPrice := sdkmath.ZeroInt() for _, tick := range ob.buys.ticks { if tick.price.LT(lastPrice) { break @@ -220,8 +220,8 @@ func (ob *OrderBook) PriceDirection(lastPrice sdk.Dec) PriceDirection { } buyAmtOverLastPrice = buyAmtOverLastPrice.Add(amt) } - sellAmtUnderLastPrice := sdk.ZeroInt() - sellAmtAtLastPrice := sdk.ZeroInt() + sellAmtUnderLastPrice := sdkmath.ZeroInt() + sellAmtAtLastPrice := sdkmath.ZeroInt() for _, tick := range ob.sells.ticks { if tick.price.GT(lastPrice) { break @@ -246,9 +246,9 @@ func (ob *OrderBook) PriceDirection(lastPrice sdk.Dec) PriceDirection { // Match matches orders sequentially, starting from buy orders with the highest price // and sell orders with the lowest price. // The matching continues until there's no more matchable orders. -func (ob *OrderBook) Match(lastPrice sdk.Dec) (matchPrice sdk.Dec, quoteCoinDiff sdk.Int, matched bool) { +func (ob *OrderBook) Match(lastPrice sdkmath.LegacyDec) (matchPrice sdkmath.LegacyDec, quoteCoinDiff sdkmath.Int, matched bool) { if len(ob.buys.ticks) == 0 || len(ob.sells.ticks) == 0 { - return sdk.Dec{}, sdk.Int{}, false + return sdkmath.LegacyDec{}, sdkmath.Int{}, false } matchPrice = lastPrice dir := ob.PriceDirection(lastPrice) @@ -257,13 +257,13 @@ func (ob *OrderBook) Match(lastPrice sdk.Dec) (matchPrice sdk.Dec, quoteCoinDiff return matchPrice, quoteCoinDiff, matched } if !matched { - quoteCoinDiff = sdk.ZeroInt() + quoteCoinDiff = sdkmath.ZeroInt() } bi, si := 0, 0 for bi < len(ob.buys.ticks) && si < len(ob.sells.ticks) && ob.buys.ticks[bi].price.GTE(ob.sells.ticks[si].price) { buyTick := ob.buys.ticks[bi] sellTick := ob.sells.ticks[si] - var p sdk.Dec + var p sdkmath.LegacyDec switch dir { case PriceIncreasing: p = sellTick.price @@ -302,9 +302,9 @@ func (ob *OrderBook) Match(lastPrice sdk.Dec) (matchPrice sdk.Dec, quoteCoinDiff // at the tick. // Orders with higher priority(have lower batch id) get matched first, // then the remaining amount is distributed to the remaining orders. -func DistributeOrderAmountToTick(tick *orderBookTick, amt sdk.Int, price sdk.Dec) (quoteCoinDiff sdk.Int) { +func DistributeOrderAmountToTick(tick *orderBookTick, amt sdkmath.Int, price sdkmath.LegacyDec) (quoteCoinDiff sdkmath.Int) { remainingAmt := amt - quoteCoinDiff = sdk.ZeroInt() + quoteCoinDiff = sdkmath.ZeroInt() groups := GroupOrdersByBatchID(tick.orders) for _, group := range groups { openAmt := TotalMatchableAmount(group.Orders, price) @@ -317,7 +317,7 @@ func DistributeOrderAmountToTick(tick *orderBookTick, amt sdk.Int, price sdk.Dec } else { SortOrders(group.Orders) quoteCoinDiff = quoteCoinDiff.Add(DistributeOrderAmountToOrders(group.Orders, remainingAmt, price)) - remainingAmt = sdk.ZeroInt() + remainingAmt = sdkmath.ZeroInt() } if remainingAmt.IsZero() { break @@ -334,19 +334,19 @@ func DistributeOrderAmountToTick(tick *orderBookTick, amt sdk.Int, price sdk.Dec // to the orders again, by priority. // This time, the proportion is not considered and each order takes up // the amount as much as possible. -func DistributeOrderAmountToOrders(orders []Order, amt sdk.Int, price sdk.Dec) (quoteCoinDiff sdk.Int) { +func DistributeOrderAmountToOrders(orders []Order, amt sdkmath.Int, price sdkmath.LegacyDec) (quoteCoinDiff sdkmath.Int) { totalAmt := TotalAmount(orders) - totalMatchedAmt := sdk.ZeroInt() - matchedAmtByOrder := map[Order]sdk.Int{} + totalMatchedAmt := sdkmath.ZeroInt() + matchedAmtByOrder := map[Order]sdkmath.Int{} for _, order := range orders { matchableAmt := MatchableAmount(order, price) if matchableAmt.IsZero() { continue } - orderAmt := order.GetAmount().ToDec() - proportion := orderAmt.QuoTruncate(totalAmt.ToDec()) - matchedAmt := sdk.MinInt(matchableAmt, proportion.MulInt(amt).TruncateInt()) + orderAmt := sdkmath.LegacyNewDec(order.GetAmount().Int64()) + proportion := orderAmt.QuoTruncate(sdkmath.LegacyNewDec(totalAmt.Int64())) + matchedAmt := sdkmath.MinInt(matchableAmt, proportion.MulInt(amt).TruncateInt()) if matchedAmt.IsPositive() { matchedAmtByOrder[order] = matchedAmt totalMatchedAmt = totalMatchedAmt.Add(matchedAmt) @@ -360,10 +360,10 @@ func DistributeOrderAmountToOrders(orders []Order, amt sdk.Int, price sdk.Dec) ( } prevMatchedAmt, ok := matchedAmtByOrder[order] if !ok { // TODO: is it possible? - prevMatchedAmt = sdk.ZeroInt() + prevMatchedAmt = sdkmath.ZeroInt() } matchableAmt := MatchableAmount(order, price) - matchedAmt := sdk.MinInt(remainingAmt, matchableAmt.Sub(prevMatchedAmt)) + matchedAmt := sdkmath.MinInt(remainingAmt, matchableAmt.Sub(prevMatchedAmt)) matchedAmtByOrder[order] = prevMatchedAmt.Add(matchedAmt) remainingAmt = remainingAmt.Sub(matchedAmt) } @@ -372,7 +372,7 @@ func DistributeOrderAmountToOrders(orders []Order, amt sdk.Int, price sdk.Dec) ( for _, order := range orders { matchedAmt, ok := matchedAmtByOrder[order] if !ok { - matchedAmt = sdk.ZeroInt() + matchedAmt = sdkmath.ZeroInt() } if !matchedAmt.IsZero() && (order.GetDirection() == Buy || price.MulInt(matchedAmt).TruncateInt().IsPositive()) { matchedOrders = append(matchedOrders, order) @@ -388,7 +388,7 @@ func DistributeOrderAmountToOrders(orders []Order, amt sdk.Int, price sdk.Dec) ( return DistributeOrderAmountToOrders(matchedOrders, amt, price) } - quoteCoinDiff = sdk.ZeroInt() + quoteCoinDiff = sdkmath.ZeroInt() for order, matchedAmt := range matchedAmtByOrder { quoteCoinDiff = quoteCoinDiff.Add(FillOrder(order, matchedAmt, price)) } diff --git a/x/liquidity/amm/match_test.go b/x/liquidity/amm/match_test.go index 0f573285b..827988c89 100644 --- a/x/liquidity/amm/match_test.go +++ b/x/liquidity/amm/match_test.go @@ -1,17 +1,16 @@ package amm_test import ( - "fmt" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidity/amm" ) -func newOrder(dir amm.OrderDirection, price sdk.Dec, amt sdk.Int) amm.Order { +func newOrder(dir amm.OrderDirection, price sdkmath.LegacyDec, amt sdkmath.Int) amm.Order { return amm.DefaultOrderer.Order(dir, price, amt) } @@ -20,13 +19,13 @@ func TestFindMatchPrice(t *testing.T) { name string ov amm.OrderView found bool - matchPrice sdk.Dec + matchPrice sdkmath.LegacyDec }{ { "happy case", amm.NewOrderBook( - newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("0.9"), sdk.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("0.9"), sdkmath.NewInt(10000)), ).MakeView(), true, utils.ParseDec("1.0"), @@ -34,27 +33,27 @@ func TestFindMatchPrice(t *testing.T) { { "buy order only", amm.NewOrderBook( - newOrder(amm.Buy, utils.ParseDec("1.0"), sdk.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), ).MakeView(), false, - sdk.Dec{}, + sdkmath.LegacyDec{}, }, { "sell order only", amm.NewOrderBook( - newOrder(amm.Sell, utils.ParseDec("1.0"), sdk.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), ).MakeView(), false, - sdk.Dec{}, + sdkmath.LegacyDec{}, }, { "highest buy price is lower than lowest sell price", amm.NewOrderBook( - newOrder(amm.Buy, utils.ParseDec("0.9"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("0.9"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(10000)), ).MakeView(), false, - sdk.Dec{}, + sdkmath.LegacyDec{}, }, } { t.Run(tc.name, func(t *testing.T) { @@ -72,14 +71,14 @@ func TestFindMatchPrice_Rounding(t *testing.T) { for i := 0; i < 50; i++ { ob := amm.NewOrderBook( - newOrder(amm.Buy, defTickPrec.UpTick(defTickPrec.UpTick(basePrice)), sdk.NewInt(80)), - newOrder(amm.Sell, defTickPrec.UpTick(basePrice), sdk.NewInt(20)), - newOrder(amm.Buy, basePrice, sdk.NewInt(10)), newOrder(amm.Sell, basePrice, sdk.NewInt(10)), - newOrder(amm.Sell, defTickPrec.DownTick(basePrice), sdk.NewInt(70)), + newOrder(amm.Buy, defTickPrec.UpTick(defTickPrec.UpTick(basePrice)), sdkmath.NewInt(80)), + newOrder(amm.Sell, defTickPrec.UpTick(basePrice), sdkmath.NewInt(20)), + newOrder(amm.Buy, basePrice, sdkmath.NewInt(10)), newOrder(amm.Sell, basePrice, sdkmath.NewInt(10)), + newOrder(amm.Sell, defTickPrec.DownTick(basePrice), sdkmath.NewInt(70)), ) matchPrice, found := amm.FindMatchPrice(ob.MakeView(), int(defTickPrec)) require.True(t, found) - require.True(sdk.DecEq(t, + require.True(sdkmath.LegacyDecEq(t, defTickPrec.RoundPrice(basePrice.Add(defTickPrec.UpTick(basePrice)).QuoInt64(2)), matchPrice)) @@ -94,63 +93,63 @@ func TestMatchOrders(t *testing.T) { for _, tc := range []struct { name string ob *amm.OrderBook - lastPrice sdk.Dec + lastPrice sdkmath.LegacyDec matched bool - matchPrice sdk.Dec - quoteCoinDust sdk.Int + matchPrice sdkmath.LegacyDec + quoteCoinDust sdkmath.Int }{ { "happy case", amm.NewOrderBook( - newOrder(amm.Buy, utils.ParseDec("1.0"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("1.0"), sdk.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), ), utils.ParseDec("1.0"), true, utils.ParseDec("1.0"), - sdk.ZeroInt(), + sdkmath.ZeroInt(), }, { "happy case #2", amm.NewOrderBook( - newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("0.9"), sdk.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("0.9"), sdkmath.NewInt(10000)), ), utils.ParseDec("1.0"), true, utils.ParseDec("1.0"), - sdk.ZeroInt(), + sdkmath.ZeroInt(), }, { "positive quote coin dust", amm.NewOrderBook( - newOrder(amm.Buy, utils.ParseDec("0.9999"), sdk.NewInt(1000)), - newOrder(amm.Buy, utils.ParseDec("0.9999"), sdk.NewInt(1000)), - newOrder(amm.Sell, utils.ParseDec("0.9999"), sdk.NewInt(1000)), - newOrder(amm.Sell, utils.ParseDec("0.9999"), sdk.NewInt(1000)), + newOrder(amm.Buy, utils.ParseDec("0.9999"), sdkmath.NewInt(1000)), + newOrder(amm.Buy, utils.ParseDec("0.9999"), sdkmath.NewInt(1000)), + newOrder(amm.Sell, utils.ParseDec("0.9999"), sdkmath.NewInt(1000)), + newOrder(amm.Sell, utils.ParseDec("0.9999"), sdkmath.NewInt(1000)), ), utils.ParseDec("0.9999"), true, utils.ParseDec("0.9999"), - sdk.NewInt(2), + sdkmath.NewInt(2), }, } { t.Run(tc.name, func(t *testing.T) { matchPrice, quoteCoinDust, matched := tc.ob.Match(tc.lastPrice) require.Equal(t, tc.matched, matched) - require.True(sdk.DecEq(t, tc.matchPrice, matchPrice)) + require.True(sdkmath.LegacyDecEq(t, tc.matchPrice, matchPrice)) if matched { - require.True(sdk.IntEq(t, tc.quoteCoinDust, quoteCoinDust)) + require.True(sdkmath.IntEq(t, tc.quoteCoinDust, quoteCoinDust)) for _, order := range tc.ob.Orders() { if order.IsMatched() { paid := order.GetPaidOfferCoinAmount() received := order.GetReceivedDemandCoinAmount() - var effPrice sdk.Dec // Effective swap price + var effPrice sdkmath.LegacyDec // Effective swap price switch order.GetDirection() { case amm.Buy: - effPrice = paid.ToDec().QuoInt(received) + effPrice = paid.ToLegacyDec().QuoInt(received) case amm.Sell: - effPrice = received.ToDec().QuoInt(paid) + effPrice = received.ToLegacyDec().QuoInt(paid) } require.True(t, utils.DecApproxEqual(tc.lastPrice, effPrice)) } @@ -163,30 +162,30 @@ func TestMatchOrders(t *testing.T) { func TestFindMatchableAmountAtSinglePrice(t *testing.T) { for _, tc := range []struct { orders []amm.Order - matchPrice sdk.Dec + matchPrice sdkmath.LegacyDec found bool - matchableAmt sdk.Int + matchableAmt sdkmath.Int }{ { []amm.Order{ - newOrder(amm.Sell, utils.ParseDec("0.100"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("0.099"), sdk.NewInt(9995)), - newOrder(amm.Buy, utils.ParseDec("0.101"), sdk.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("0.100"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("0.099"), sdkmath.NewInt(9995)), + newOrder(amm.Buy, utils.ParseDec("0.101"), sdkmath.NewInt(10000)), }, utils.ParseDec("0.100"), true, - sdk.NewInt(9995), + sdkmath.NewInt(9995), }, { []amm.Order{ - newOrder(amm.Sell, utils.ParseDec("0.100"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("0.099"), sdk.NewInt(9995)), - newOrder(amm.Buy, utils.ParseDec("0.101"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("0.100"), sdk.NewInt(1000)), + newOrder(amm.Sell, utils.ParseDec("0.100"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("0.099"), sdkmath.NewInt(9995)), + newOrder(amm.Buy, utils.ParseDec("0.101"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("0.100"), sdkmath.NewInt(1000)), }, utils.ParseDec("0.100"), true, - sdk.NewInt(11000), + sdkmath.NewInt(11000), }, } { t.Run("", func(t *testing.T) { @@ -194,7 +193,7 @@ func TestFindMatchableAmountAtSinglePrice(t *testing.T) { matchableAmt, found := ob.FindMatchableAmountAtSinglePrice(tc.matchPrice) require.Equal(t, tc.found, found) if found { - require.True(sdk.IntEq(t, tc.matchableAmt, matchableAmt)) + require.True(sdkmath.IntEq(t, tc.matchableAmt, matchableAmt)) } }) } @@ -202,18 +201,12 @@ func TestFindMatchableAmountAtSinglePrice(t *testing.T) { func TestMatch_edgecase1(t *testing.T) { orders := []amm.Order{ - newOrder(amm.Sell, utils.ParseDec("0.100"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("0.099"), sdk.NewInt(9995)), - newOrder(amm.Buy, utils.ParseDec("0.101"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("0.100"), sdk.NewInt(5000)), + newOrder(amm.Sell, utils.ParseDec("0.100"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("0.099"), sdkmath.NewInt(9995)), + newOrder(amm.Buy, utils.ParseDec("0.101"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("0.100"), sdkmath.NewInt(5000)), } ob := amm.NewOrderBook(orders...) _, _, matched := ob.Match(utils.ParseDec("0.098")) require.True(t, matched) - for _, order := range orders { - fmt.Printf( - "%s %s (%s/%s) paid=%s, received=%s\n", - order.GetDirection(), order.GetPrice(), order.GetOpenAmount(), order.GetAmount(), - order.GetPaidOfferCoinAmount(), order.GetReceivedDemandCoinAmount()) - } } diff --git a/x/liquidity/amm/order.go b/x/liquidity/amm/order.go index f84a57ce9..5862d98d4 100644 --- a/x/liquidity/amm/order.go +++ b/x/liquidity/amm/order.go @@ -3,7 +3,7 @@ package amm import ( "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" ) var ( @@ -34,14 +34,14 @@ func (dir OrderDirection) String() string { } type Orderer interface { - Order(dir OrderDirection, price sdk.Dec, amt sdk.Int) Order + Order(dir OrderDirection, price sdkmath.LegacyDec, amt sdkmath.Int) Order } // BaseOrderer creates new BaseOrder with sufficient offer coin amount // considering price and amount. type BaseOrderer struct{} -func (orderer BaseOrderer) Order(dir OrderDirection, price sdk.Dec, amt sdk.Int) Order { +func (orderer BaseOrderer) Order(dir OrderDirection, price sdkmath.LegacyDec, amt sdkmath.Int) Order { return NewBaseOrder(dir, price, amt, OfferCoinAmount(dir, price, amt)) } @@ -51,15 +51,15 @@ type Order interface { // GetBatchId returns the batch id where the order was created. // Batch id of 0 means the current batch. GetBatchID() uint64 - GetPrice() sdk.Dec - GetAmount() sdk.Int // The original order amount - GetOfferCoinAmount() sdk.Int - GetPaidOfferCoinAmount() sdk.Int - SetPaidOfferCoinAmount(amt sdk.Int) - GetReceivedDemandCoinAmount() sdk.Int - SetReceivedDemandCoinAmount(amt sdk.Int) - GetOpenAmount() sdk.Int - SetOpenAmount(amt sdk.Int) + GetPrice() sdkmath.LegacyDec + GetAmount() sdkmath.Int // The original order amount + GetOfferCoinAmount() sdkmath.Int + GetPaidOfferCoinAmount() sdkmath.Int + SetPaidOfferCoinAmount(amt sdkmath.Int) + GetReceivedDemandCoinAmount() sdkmath.Int + SetReceivedDemandCoinAmount(amt sdkmath.Int) + GetOpenAmount() sdkmath.Int + SetOpenAmount(amt sdkmath.Int) IsMatched() bool // HasPriority returns true if the order has higher priority // than the other order. @@ -70,26 +70,26 @@ type Order interface { // BaseOrder is the base struct for an Order. type BaseOrder struct { Direction OrderDirection - Price sdk.Dec - Amount sdk.Int - OfferCoinAmount sdk.Int + Price sdkmath.LegacyDec + Amount sdkmath.Int + OfferCoinAmount sdkmath.Int // Match info - OpenAmount sdk.Int - PaidOfferCoinAmount sdk.Int - ReceivedDemandCoinAmount sdk.Int + OpenAmount sdkmath.Int + PaidOfferCoinAmount sdkmath.Int + ReceivedDemandCoinAmount sdkmath.Int } // NewBaseOrder returns a new BaseOrder. -func NewBaseOrder(dir OrderDirection, price sdk.Dec, amt, offerCoinAmt sdk.Int) *BaseOrder { +func NewBaseOrder(dir OrderDirection, price sdkmath.LegacyDec, amt, offerCoinAmt sdkmath.Int) *BaseOrder { return &BaseOrder{ Direction: dir, Price: price, Amount: amt, OfferCoinAmount: offerCoinAmt, OpenAmount: amt, - PaidOfferCoinAmount: sdk.ZeroInt(), - ReceivedDemandCoinAmount: sdk.ZeroInt(), + PaidOfferCoinAmount: sdkmath.ZeroInt(), + ReceivedDemandCoinAmount: sdkmath.ZeroInt(), } } @@ -103,40 +103,40 @@ func (order *BaseOrder) GetBatchID() uint64 { } // GetPrice returns the order price. -func (order *BaseOrder) GetPrice() sdk.Dec { +func (order *BaseOrder) GetPrice() sdkmath.LegacyDec { return order.Price } // GetAmount returns the order amount. -func (order *BaseOrder) GetAmount() sdk.Int { +func (order *BaseOrder) GetAmount() sdkmath.Int { return order.Amount } -func (order *BaseOrder) GetOfferCoinAmount() sdk.Int { +func (order *BaseOrder) GetOfferCoinAmount() sdkmath.Int { return order.OfferCoinAmount } -func (order *BaseOrder) GetPaidOfferCoinAmount() sdk.Int { +func (order *BaseOrder) GetPaidOfferCoinAmount() sdkmath.Int { return order.PaidOfferCoinAmount } -func (order *BaseOrder) SetPaidOfferCoinAmount(amt sdk.Int) { +func (order *BaseOrder) SetPaidOfferCoinAmount(amt sdkmath.Int) { order.PaidOfferCoinAmount = amt } -func (order *BaseOrder) GetReceivedDemandCoinAmount() sdk.Int { +func (order *BaseOrder) GetReceivedDemandCoinAmount() sdkmath.Int { return order.ReceivedDemandCoinAmount } -func (order *BaseOrder) SetReceivedDemandCoinAmount(amt sdk.Int) { +func (order *BaseOrder) SetReceivedDemandCoinAmount(amt sdkmath.Int) { order.ReceivedDemandCoinAmount = amt } -func (order *BaseOrder) GetOpenAmount() sdk.Int { +func (order *BaseOrder) GetOpenAmount() sdkmath.Int { return order.OpenAmount } -func (order *BaseOrder) SetOpenAmount(amt sdk.Int) { +func (order *BaseOrder) SetOpenAmount(amt sdkmath.Int) { order.OpenAmount = amt } diff --git a/x/liquidity/amm/orderbook.go b/x/liquidity/amm/orderbook.go index 3366bd20c..fddb6725b 100644 --- a/x/liquidity/amm/orderbook.go +++ b/x/liquidity/amm/orderbook.go @@ -5,7 +5,7 @@ import ( "sort" "strings" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" ) // OrderBook is an order book. @@ -48,47 +48,47 @@ func (ob *OrderBook) Orders() []Order { // BuyOrdersAt returns buy orders at given price in the order book. // Note that the orders are not sorted. -func (ob *OrderBook) BuyOrdersAt(price sdk.Dec) []Order { +func (ob *OrderBook) BuyOrdersAt(price sdkmath.LegacyDec) []Order { return ob.buys.ordersAt(price) } // SellOrdersAt returns sell orders at given price in the order book. // Note that the orders are not sorted. -func (ob *OrderBook) SellOrdersAt(price sdk.Dec) []Order { +func (ob *OrderBook) SellOrdersAt(price sdkmath.LegacyDec) []Order { return ob.sells.ordersAt(price) } -func (ob *OrderBook) HighestPrice() (sdk.Dec, bool) { +func (ob *OrderBook) HighestPrice() (sdkmath.LegacyDec, bool) { highestBuyPrice, _, foundBuy := ob.buys.highestPrice() highestSellPrice, _, foundSell := ob.sells.highestPrice() switch { case foundBuy && foundSell: - return sdk.MaxDec(highestBuyPrice, highestSellPrice), true + return sdkmath.LegacyMaxDec(highestBuyPrice, highestSellPrice), true case foundBuy: return highestBuyPrice, true case foundSell: return highestSellPrice, true default: - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } } -func (ob *OrderBook) LowestPrice() (sdk.Dec, bool) { +func (ob *OrderBook) LowestPrice() (sdkmath.LegacyDec, bool) { lowestBuyPrice, _, foundBuy := ob.buys.lowestPrice() lowestSellPrice, _, foundSell := ob.sells.lowestPrice() switch { case foundBuy && foundSell: - return sdk.MinDec(lowestBuyPrice, lowestSellPrice), true + return sdkmath.LegacyMinDec(lowestBuyPrice, lowestSellPrice), true case foundBuy: return lowestBuyPrice, true case foundSell: return lowestSellPrice, true default: - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } } -func (ob *OrderBook) stringRepresentation(prices []sdk.Dec) string { +func (ob *OrderBook) stringRepresentation(prices []sdkmath.LegacyDec) string { if len(prices) == 0 { return "" } @@ -110,7 +110,7 @@ func (ob *OrderBook) stringRepresentation(prices []sdk.Dec) string { // FullString includes all possible price ticks from the order book's // highest price to the lowest price. func (ob *OrderBook) FullString(tickPrec int) string { - var prices []sdk.Dec + var prices []sdkmath.LegacyDec highest, found := ob.HighestPrice() if !found { return "" @@ -125,11 +125,11 @@ func (ob *OrderBook) FullString(tickPrec int) string { // String returns a compact string representation of the order book. // String includes a tick only when there is at least one order on it. func (ob *OrderBook) String() string { - priceSet := map[string]sdk.Dec{} + priceSet := map[string]sdkmath.LegacyDec{} for _, tick := range append(ob.buys.ticks, ob.sells.ticks...) { priceSet[tick.price.String()] = tick.price } - prices := make([]sdk.Dec, 0, len(priceSet)) + prices := make([]sdkmath.LegacyDec, 0, len(priceSet)) for _, price := range priceSet { prices = append(prices, price) } @@ -155,7 +155,7 @@ func newOrderBookSellTicks() *orderBookTicks { } } -func (ticks *orderBookTicks) findPrice(price sdk.Dec) (i int, exact bool) { +func (ticks *orderBookTicks) findPrice(price sdkmath.LegacyDec) (i int, exact bool) { i = sort.Search(len(ticks.ticks), func(i int) bool { if ticks.priceIncreasing { return ticks.ticks[i].price.GTE(price) @@ -183,7 +183,7 @@ func (ticks *orderBookTicks) addOrder(order Order) { } } -func (ticks *orderBookTicks) ordersAt(price sdk.Dec) []Order { +func (ticks *orderBookTicks) ordersAt(price sdkmath.LegacyDec) []Order { i, exact := ticks.findPrice(price) if !exact { return nil @@ -191,9 +191,9 @@ func (ticks *orderBookTicks) ordersAt(price sdk.Dec) []Order { return ticks.ticks[i].orders } -func (ticks *orderBookTicks) highestPrice() (sdk.Dec, int, bool) { +func (ticks *orderBookTicks) highestPrice() (sdkmath.LegacyDec, int, bool) { if len(ticks.ticks) == 0 { - return sdk.Dec{}, 0, false + return sdkmath.LegacyDec{}, 0, false } if ticks.priceIncreasing { return ticks.ticks[len(ticks.ticks)-1].price, len(ticks.ticks) - 1, true @@ -201,9 +201,9 @@ func (ticks *orderBookTicks) highestPrice() (sdk.Dec, int, bool) { return ticks.ticks[0].price, 0, true } -func (ticks *orderBookTicks) lowestPrice() (sdk.Dec, int, bool) { +func (ticks *orderBookTicks) lowestPrice() (sdkmath.LegacyDec, int, bool) { if len(ticks.ticks) == 0 { - return sdk.Dec{}, 0, false + return sdkmath.LegacyDec{}, 0, false } if ticks.priceIncreasing { return ticks.ticks[0].price, 0, true @@ -213,7 +213,7 @@ func (ticks *orderBookTicks) lowestPrice() (sdk.Dec, int, bool) { // orderBookTick represents a tick in OrderBook. type orderBookTick struct { - price sdk.Dec + price sdkmath.LegacyDec orders []Order } diff --git a/x/liquidity/amm/orderbook_internal_test.go b/x/liquidity/amm/orderbook_internal_test.go index 99b27a020..abe0e7f9e 100644 --- a/x/liquidity/amm/orderbook_internal_test.go +++ b/x/liquidity/amm/orderbook_internal_test.go @@ -6,17 +6,17 @@ import ( "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" ) -func newOrder(dir OrderDirection, price sdk.Dec, amt sdk.Int) *BaseOrder { +func newOrder(dir OrderDirection, price sdkmath.LegacyDec, amt sdkmath.Int) *BaseOrder { return NewBaseOrder(dir, price, amt, OfferCoinAmount(dir, price, amt)) } func TestOrderBookTicks_add(t *testing.T) { - prices := []sdk.Dec{ + prices := []sdkmath.LegacyDec{ utils.ParseDec("1.0"), utils.ParseDec("1.1"), utils.ParseDec("1.05"), @@ -27,7 +27,7 @@ func TestOrderBookTicks_add(t *testing.T) { } var ticks orderBookTicks for _, price := range prices { - ticks.addOrder(newOrder(Buy, price, sdk.NewInt(10000))) + ticks.addOrder(newOrder(Buy, price, sdkmath.NewInt(10000))) } pricesSet := map[string]struct{}{} for _, price := range prices { @@ -41,6 +41,6 @@ func TestOrderBookTicks_add(t *testing.T) { return prices[i].GT(prices[j]) }) for i, price := range prices { - require.True(sdk.DecEq(t, price, ticks.ticks[i].price)) + require.True(sdkmath.LegacyDecEq(t, price, ticks.ticks[i].price)) } } diff --git a/x/liquidity/amm/orderbook_test.go b/x/liquidity/amm/orderbook_test.go index 454625ad0..a9ce384da 100644 --- a/x/liquidity/amm/orderbook_test.go +++ b/x/liquidity/amm/orderbook_test.go @@ -5,7 +5,7 @@ import ( "math/rand" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" utils "github.com/comdex-official/comdex/types" @@ -14,30 +14,30 @@ import ( func TestOrderBook(t *testing.T) { ob := amm.NewOrderBook( - newOrder(amm.Buy, utils.ParseDec("10.01"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("10.00"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("9.999"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("9.999"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("9.998"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("9.998"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("9.997"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("9.996"), sdk.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("10.01"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("10.00"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("9.999"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("9.999"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("9.998"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("9.998"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("9.997"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("9.996"), sdkmath.NewInt(10000)), ) highest, found := ob.HighestPrice() require.True(t, found) - require.True(sdk.DecEq(t, utils.ParseDec("10.01"), highest)) + require.True(sdkmath.LegacyDecEq(t, utils.ParseDec("10.01"), highest)) lowest, found := ob.LowestPrice() require.True(t, found) - require.True(sdk.DecEq(t, utils.ParseDec("9.996"), lowest)) + require.True(sdkmath.LegacyDecEq(t, utils.ParseDec("9.996"), lowest)) } func TestOrderBook_BuyOrdersAt(t *testing.T) { - order1 := newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(10000)) - order2 := newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(10000)) - order3 := newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(10000)) - order4 := newOrder(amm.Buy, utils.ParseDec("1.0"), sdk.NewInt(10000)) - order5 := newOrder(amm.Buy, utils.ParseDec("1.2"), sdk.NewInt(10000)) + order1 := newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(10000)) + order2 := newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(10000)) + order3 := newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(10000)) + order4 := newOrder(amm.Buy, utils.ParseDec("1.0"), sdkmath.NewInt(10000)) + order5 := newOrder(amm.Buy, utils.ParseDec("1.2"), sdkmath.NewInt(10000)) ob := amm.NewOrderBook(order1, order2, order3, order4, order5) buyOrders := ob.BuyOrdersAt(utils.ParseDec("1.1")) @@ -50,11 +50,11 @@ func TestOrderBook_BuyOrdersAt(t *testing.T) { } func TestOrderBook_SellOrdersAt(t *testing.T) { - order1 := newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(10000)) - order2 := newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(10000)) - order3 := newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(10000)) - order4 := newOrder(amm.Sell, utils.ParseDec("1.0"), sdk.NewInt(10000)) - order5 := newOrder(amm.Sell, utils.ParseDec("1.2"), sdk.NewInt(10000)) + order1 := newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(10000)) + order2 := newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(10000)) + order3 := newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(10000)) + order4 := newOrder(amm.Sell, utils.ParseDec("1.0"), sdkmath.NewInt(10000)) + order5 := newOrder(amm.Sell, utils.ParseDec("1.2"), sdkmath.NewInt(10000)) ob := amm.NewOrderBook(order1, order2, order3, order4, order5) sellOrders := ob.SellOrdersAt(utils.ParseDec("1.1")) @@ -70,33 +70,33 @@ func TestOrderBook_HighestPriceLowestPrice(t *testing.T) { for _, tc := range []struct { ob *amm.OrderBook found bool - highestPrice sdk.Dec - lowestPrice sdk.Dec + highestPrice sdkmath.LegacyDec + lowestPrice sdkmath.LegacyDec }{ { amm.NewOrderBook(), - false, sdk.Dec{}, sdk.Dec{}, + false, sdkmath.LegacyDec{}, sdkmath.LegacyDec{}, }, { amm.NewOrderBook( - newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("1.0"), sdk.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), ), true, utils.ParseDec("1.1"), utils.ParseDec("1.0"), }, { amm.NewOrderBook( - newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("1.0"), sdk.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), ), true, utils.ParseDec("1.1"), utils.ParseDec("1.0"), }, { amm.NewOrderBook( - newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("1.0"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("1.0"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("0.9"), sdk.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("0.9"), sdkmath.NewInt(10000)), ), true, utils.ParseDec("1.1"), utils.ParseDec("0.9"), }, @@ -107,8 +107,8 @@ func TestOrderBook_HighestPriceLowestPrice(t *testing.T) { lowestPrice, foundLowestPrice := tc.ob.LowestPrice() require.Equal(t, tc.found, foundLowestPrice) if tc.found { - require.True(sdk.DecEq(t, tc.highestPrice, highestPrice)) - require.True(sdk.DecEq(t, tc.lowestPrice, lowestPrice)) + require.True(sdkmath.LegacyDecEq(t, tc.highestPrice, highestPrice)) + require.True(sdkmath.LegacyDecEq(t, tc.lowestPrice, lowestPrice)) } }) } @@ -116,15 +116,15 @@ func TestOrderBook_HighestPriceLowestPrice(t *testing.T) { func ExampleOrderBook_String() { ob := amm.NewOrderBook( - newOrder(amm.Sell, utils.ParseDec("1.2"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("1.17"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("1.15"), sdk.NewInt(5000)), - newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(3000)), - newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(5000)), - newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(1000)), - newOrder(amm.Sell, utils.ParseDec("1.09"), sdk.NewInt(6000)), - newOrder(amm.Sell, utils.ParseDec("1.09"), sdk.NewInt(4000)), - newOrder(amm.Buy, utils.ParseDec("1.06"), sdk.NewInt(15000)), + newOrder(amm.Sell, utils.ParseDec("1.2"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.17"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.15"), sdkmath.NewInt(5000)), + newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(3000)), + newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(5000)), + newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(1000)), + newOrder(amm.Sell, utils.ParseDec("1.09"), sdkmath.NewInt(6000)), + newOrder(amm.Sell, utils.ParseDec("1.09"), sdkmath.NewInt(4000)), + newOrder(amm.Buy, utils.ParseDec("1.06"), sdkmath.NewInt(15000)), ) fmt.Println(ob.String()) @@ -141,15 +141,15 @@ func ExampleOrderBook_String() { func ExampleOrderBook_FullString() { ob := amm.NewOrderBook( - newOrder(amm.Sell, utils.ParseDec("1.2"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("1.17"), sdk.NewInt(10000)), - newOrder(amm.Sell, utils.ParseDec("1.15"), sdk.NewInt(5000)), - newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(3000)), - newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(5000)), - newOrder(amm.Buy, utils.ParseDec("1.1"), sdk.NewInt(1000)), - newOrder(amm.Sell, utils.ParseDec("1.09"), sdk.NewInt(6000)), - newOrder(amm.Sell, utils.ParseDec("1.09"), sdk.NewInt(4000)), - newOrder(amm.Buy, utils.ParseDec("1.06"), sdk.NewInt(15000)), + newOrder(amm.Sell, utils.ParseDec("1.2"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.17"), sdkmath.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.15"), sdkmath.NewInt(5000)), + newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(3000)), + newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(5000)), + newOrder(amm.Buy, utils.ParseDec("1.1"), sdkmath.NewInt(1000)), + newOrder(amm.Sell, utils.ParseDec("1.09"), sdkmath.NewInt(6000)), + newOrder(amm.Sell, utils.ParseDec("1.09"), sdkmath.NewInt(4000)), + newOrder(amm.Buy, utils.ParseDec("1.06"), sdkmath.NewInt(15000)), ) fmt.Println(ob.FullString(2)) @@ -202,7 +202,7 @@ func BenchmarkOrderBook_AddOrder(b *testing.B) { } price := defTickPrec.PriceToDownTick( utils.RandomDec(r, utils.ParseDec("0.01"), utils.ParseDec("100.0"))) - orders[i] = newOrder(dir, price, sdk.NewInt(10000)) + orders[i] = newOrder(dir, price, sdkmath.NewInt(10000)) } for _, numOrders := range []int{1000, 5000, 10000} { b.Run(fmt.Sprintf("%d orders", numOrders), func(b *testing.B) { diff --git a/x/liquidity/amm/pool.go b/x/liquidity/amm/pool.go index 81c2379df..3b1efd2d4 100644 --- a/x/liquidity/amm/pool.go +++ b/x/liquidity/amm/pool.go @@ -4,7 +4,7 @@ import ( "fmt" "math/big" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" ) @@ -16,18 +16,18 @@ var ( // Pool is the interface of a pool. type Pool interface { - Balances() (rx, ry sdk.Int) - SetBalances(rx, ry sdk.Int, derive bool) - PoolCoinSupply() sdk.Int - Price() sdk.Dec + Balances() (rx, ry sdkmath.Int) + SetBalances(rx, ry sdkmath.Int, derive bool) + PoolCoinSupply() sdkmath.Int + Price() sdkmath.LegacyDec IsDepleted() bool - HighestBuyPrice() (sdk.Dec, bool) - LowestSellPrice() (sdk.Dec, bool) - BuyAmountOver(price sdk.Dec, inclusive bool) sdk.Int - SellAmountUnder(price sdk.Dec, inclusive bool) sdk.Int - BuyAmountTo(price sdk.Dec) sdk.Int - SellAmountTo(price sdk.Dec) sdk.Int + HighestBuyPrice() (sdkmath.LegacyDec, bool) + LowestSellPrice() (sdkmath.LegacyDec, bool) + BuyAmountOver(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int + SellAmountUnder(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int + BuyAmountTo(price sdkmath.LegacyDec) sdkmath.Int + SellAmountTo(price sdkmath.LegacyDec) sdkmath.Int Clone() Pool } @@ -37,14 +37,14 @@ type BasicPool struct { // rx and ry are the pool's reserve balance of each x/y coin. // In perspective of a pair, x coin is the quote coin and // y coin is the base coin. - rx, ry sdk.Int + rx, ry sdkmath.Int // ps is the pool's pool coin supply. - ps sdk.Int + ps sdkmath.Int } // NewBasicPool returns a new BasicPool. -// It is OK to pass an empty sdk.Int to ps when ps is not going to be used. -func NewBasicPool(rx, ry, ps sdk.Int) *BasicPool { +// It is OK to pass an empty sdkmath.Int to ps when ps is not going to be used. +func NewBasicPool(rx, ry, ps sdkmath.Int) *BasicPool { return &BasicPool{ rx: rx, ry: ry, @@ -52,11 +52,11 @@ func NewBasicPool(rx, ry, ps sdk.Int) *BasicPool { } } -func CreateBasicPool(rx, ry sdk.Int) (*BasicPool, error) { +func CreateBasicPool(rx, ry sdkmath.Int) (*BasicPool, error) { if rx.IsZero() || ry.IsZero() { return nil, fmt.Errorf("cannot create basic pool with zero reserve amount") } - p := rx.ToDec().Quo(ry.ToDec()) + p := rx.ToLegacyDec().Quo(ry.ToLegacyDec()) if p.LT(MinPoolPrice) { return nil, fmt.Errorf("pool price is lower than min price %s", MinPoolPrice) } @@ -67,26 +67,26 @@ func CreateBasicPool(rx, ry sdk.Int) (*BasicPool, error) { } // Balances returns the balances of the pool. -func (pool *BasicPool) Balances() (rx, ry sdk.Int) { +func (pool *BasicPool) Balances() (rx, ry sdkmath.Int) { return pool.rx, pool.ry } -func (pool *BasicPool) SetBalances(rx, ry sdk.Int, _ bool) { +func (pool *BasicPool) SetBalances(rx, ry sdkmath.Int, _ bool) { pool.rx = rx pool.ry = ry } // PoolCoinSupply returns the pool coin supply. -func (pool *BasicPool) PoolCoinSupply() sdk.Int { +func (pool *BasicPool) PoolCoinSupply() sdkmath.Int { return pool.ps } // Price returns the pool price. -func (pool *BasicPool) Price() sdk.Dec { +func (pool *BasicPool) Price() sdkmath.LegacyDec { if pool.rx.IsZero() || pool.ry.IsZero() { panic("pool price is not defined for a depleted pool") } - return pool.rx.ToDec().Quo(pool.ry.ToDec()) + return pool.rx.ToLegacyDec().Quo(pool.ry.ToLegacyDec()) } // IsDepleted returns whether the pool is depleted or not. @@ -95,14 +95,14 @@ func (pool *BasicPool) IsDepleted() bool { } // HighestBuyPrice returns the highest buy price of the pool. -func (pool *BasicPool) HighestBuyPrice() (price sdk.Dec, found bool) { +func (pool *BasicPool) HighestBuyPrice() (price sdkmath.LegacyDec, found bool) { // The highest buy price is actually a bit lower than pool price, // but it's not important for our matching logic. return pool.Price(), true } // LowestSellPrice returns the lowest sell price of the pool. -func (pool *BasicPool) LowestSellPrice() (price sdk.Dec, found bool) { +func (pool *BasicPool) LowestSellPrice() (price sdkmath.LegacyDec, found bool) { // The lowest sell price is actually a bit higher than the pool price, // but it's not important for our matching logic. return pool.Price(), true @@ -111,7 +111,7 @@ func (pool *BasicPool) LowestSellPrice() (price sdk.Dec, found bool) { // BuyAmountOver returns the amount of buy orders for price greater than // or equal to given price. // amt = (X - P*Y)/P -func (pool *BasicPool) BuyAmountOver(price sdk.Dec, _ bool) (amt sdk.Int) { +func (pool *BasicPool) BuyAmountOver(price sdkmath.LegacyDec, _ bool) (amt sdkmath.Int) { origPrice := price if price.LT(MinPoolPrice) { price = MinPoolPrice @@ -119,7 +119,7 @@ func (pool *BasicPool) BuyAmountOver(price sdk.Dec, _ bool) (amt sdk.Int) { if price.GTE(pool.Price()) { return zeroInt } - dx := pool.rx.ToDec().Sub(price.MulInt(pool.ry)) + dx := pool.rx.ToLegacyDec().Sub(price.MulInt(pool.ry)) if !dx.IsPositive() { return zeroInt } @@ -134,14 +134,14 @@ func (pool *BasicPool) BuyAmountOver(price sdk.Dec, _ bool) (amt sdk.Int) { return } -func (pool *BasicPool) SellAmountUnder(price sdk.Dec, _ bool) (amt sdk.Int) { +func (pool *BasicPool) SellAmountUnder(price sdkmath.LegacyDec, _ bool) (amt sdkmath.Int) { if price.GT(MaxPoolPrice) { price = MaxPoolPrice } if price.LTE(pool.Price()) { return zeroInt } - amt = pool.ry.ToDec().Sub(pool.rx.ToDec().QuoRoundUp(price)).TruncateInt() + amt = pool.ry.ToLegacyDec().Sub(pool.rx.ToLegacyDec().QuoRoundUp(price)).TruncateInt() if !amt.IsPositive() { return zeroInt } @@ -151,7 +151,7 @@ func (pool *BasicPool) SellAmountUnder(price sdk.Dec, _ bool) (amt sdk.Int) { // BuyAmountTo returns the amount of buy orders of the pool for price, // where BuyAmountTo is used when the pool price is higher than the highest // price of the order book. -func (pool *BasicPool) BuyAmountTo(price sdk.Dec) (amt sdk.Int) { +func (pool *BasicPool) BuyAmountTo(price sdkmath.LegacyDec) (amt sdkmath.Int) { origPrice := price if price.LT(MinPoolPrice) { price = MinPoolPrice @@ -159,10 +159,10 @@ func (pool *BasicPool) BuyAmountTo(price sdk.Dec) (amt sdk.Int) { if price.GTE(pool.Price()) { return zeroInt } - sqrtRx := utils.DecApproxSqrt(pool.rx.ToDec()) - sqrtRy := utils.DecApproxSqrt(pool.ry.ToDec()) + sqrtRx := utils.DecApproxSqrt(pool.rx.ToLegacyDec()) + sqrtRy := utils.DecApproxSqrt(pool.ry.ToLegacyDec()) sqrtPrice := utils.DecApproxSqrt(price) - dx := pool.rx.ToDec().Sub(sqrtPrice.Mul(sqrtRx.Mul(sqrtRy))) // dx = rx - sqrt(P * rx * ry) + dx := pool.rx.ToLegacyDec().Sub(sqrtPrice.Mul(sqrtRx.Mul(sqrtRy))) // dx = rx - sqrt(P * rx * ry) if !dx.IsPositive() { return zeroInt } @@ -180,18 +180,18 @@ func (pool *BasicPool) BuyAmountTo(price sdk.Dec) (amt sdk.Int) { // SellAmountTo returns the amount of sell orders of the pool for price, // where SellAmountTo is used when the pool price is lower than the lowest // price of the order book. -func (pool *BasicPool) SellAmountTo(price sdk.Dec) (amt sdk.Int) { +func (pool *BasicPool) SellAmountTo(price sdkmath.LegacyDec) (amt sdkmath.Int) { if price.GT(MaxPoolPrice) { price = MaxPoolPrice } if price.LTE(pool.Price()) { return zeroInt } - sqrtRx := utils.DecApproxSqrt(pool.rx.ToDec()) - sqrtRy := utils.DecApproxSqrt(pool.ry.ToDec()) + sqrtRx := utils.DecApproxSqrt(pool.rx.ToLegacyDec()) + sqrtRy := utils.DecApproxSqrt(pool.ry.ToLegacyDec()) sqrtPrice := utils.DecApproxSqrt(price) // dy = ry - sqrt(rx * ry / P) - amt = pool.ry.ToDec().Sub(sqrtRx.Mul(sqrtRy).Quo(sqrtPrice)).TruncateInt() + amt = pool.ry.ToLegacyDec().Sub(sqrtRx.Mul(sqrtRy).Quo(sqrtPrice)).TruncateInt() if !amt.IsPositive() { return zeroInt } @@ -203,15 +203,15 @@ func (pool *BasicPool) Clone() Pool { } type RangedPool struct { - rx, ry sdk.Int - ps sdk.Int - minPrice, maxPrice sdk.Dec - transX, transY sdk.Dec - xComp, yComp sdk.Dec + rx, ry sdkmath.Int + ps sdkmath.Int + minPrice, maxPrice sdkmath.LegacyDec + transX, transY sdkmath.LegacyDec + xComp, yComp sdkmath.LegacyDec } // NewRangedPool returns a new RangedPool. -func NewRangedPool(rx, ry, ps sdk.Int, minPrice, maxPrice sdk.Dec) *RangedPool { +func NewRangedPool(rx, ry, ps sdkmath.Int, minPrice, maxPrice sdkmath.LegacyDec) *RangedPool { transX, transY := DeriveTranslation(rx, ry, minPrice, maxPrice) return &RangedPool{ rx: rx, @@ -221,14 +221,14 @@ func NewRangedPool(rx, ry, ps sdk.Int, minPrice, maxPrice sdk.Dec) *RangedPool { maxPrice: maxPrice, transX: transX, transY: transY, - xComp: rx.ToDec().Add(transX), - yComp: ry.ToDec().Add(transY), + xComp: rx.ToLegacyDec().Add(transX), + yComp: ry.ToLegacyDec().Add(transY), } } // CreateRangedPool creates new RangedPool from given inputs, while validating // the inputs and using only needed amount of x/y coins(the rest should be refunded). -func CreateRangedPool(x, y sdk.Int, minPrice, maxPrice, initialPrice sdk.Dec) (pool *RangedPool, err error) { +func CreateRangedPool(x, y sdkmath.Int, minPrice, maxPrice, initialPrice sdkmath.LegacyDec) (pool *RangedPool, err error) { if !x.IsPositive() && !y.IsPositive() { return nil, fmt.Errorf("either x or y must be positive") } @@ -237,7 +237,7 @@ func CreateRangedPool(x, y sdk.Int, minPrice, maxPrice, initialPrice sdk.Dec) (p } // P = initialPrice, M = minPrice, L = maxPrice - var ax, ay sdk.Int + var ax, ay sdkmath.Int switch { case initialPrice.Equal(minPrice): // single y asset pool ax = zeroInt @@ -247,7 +247,7 @@ func CreateRangedPool(x, y sdk.Int, minPrice, maxPrice, initialPrice sdk.Dec) (p ay = zeroInt default: // normal pool sqrt := utils.DecApproxSqrt - xDec, yDec := x.ToDec(), y.ToDec() + xDec, yDec := x.ToLegacyDec(), y.ToLegacyDec() sqrtP := sqrt(initialPrice) // sqrt(P) sqrtM := sqrt(minPrice) // sqrt(M) sqrtL := sqrt(maxPrice) // sqrt(L) @@ -265,7 +265,7 @@ func CreateRangedPool(x, y sdk.Int, minPrice, maxPrice, initialPrice sdk.Dec) (p return NewRangedPool(ax, ay, InitialPoolCoinSupply(ax, ay), minPrice, maxPrice), nil } -func ValidateRangedPoolParams(minPrice, maxPrice, initialPrice sdk.Dec) error { +func ValidateRangedPoolParams(minPrice, maxPrice, initialPrice sdkmath.LegacyDec) error { if !initialPrice.IsPositive() { return fmt.Errorf("initial price must be positive: %s", initialPrice) } @@ -294,41 +294,41 @@ func ValidateRangedPoolParams(minPrice, maxPrice, initialPrice sdk.Dec) error { } // Balances returns the balances of the pool. -func (pool *RangedPool) Balances() (rx, ry sdk.Int) { +func (pool *RangedPool) Balances() (rx, ry sdkmath.Int) { return pool.rx, pool.ry } // SetBalances sets RangedPool's balances without recalculating // transX and transY. -func (pool *RangedPool) SetBalances(rx, ry sdk.Int, derive bool) { +func (pool *RangedPool) SetBalances(rx, ry sdkmath.Int, derive bool) { if derive { pool.transX, pool.transY = DeriveTranslation(rx, ry, pool.minPrice, pool.maxPrice) } pool.rx = rx pool.ry = ry - pool.xComp = pool.rx.ToDec().Add(pool.transX) - pool.yComp = pool.ry.ToDec().Add(pool.transY) + pool.xComp = pool.rx.ToLegacyDec().Add(pool.transX) + pool.yComp = pool.ry.ToLegacyDec().Add(pool.transY) } // PoolCoinSupply returns the pool coin supply. -func (pool *RangedPool) PoolCoinSupply() sdk.Int { +func (pool *RangedPool) PoolCoinSupply() sdkmath.Int { return pool.ps } -func (pool *RangedPool) Translation() (transX, transY sdk.Dec) { +func (pool *RangedPool) Translation() (transX, transY sdkmath.LegacyDec) { return pool.transX, pool.transY } -func (pool *RangedPool) MinPrice() sdk.Dec { +func (pool *RangedPool) MinPrice() sdkmath.LegacyDec { return pool.minPrice } -func (pool *RangedPool) MaxPrice() sdk.Dec { +func (pool *RangedPool) MaxPrice() sdkmath.LegacyDec { return pool.maxPrice } // Price returns the pool price. -func (pool *RangedPool) Price() sdk.Dec { +func (pool *RangedPool) Price() sdkmath.LegacyDec { if pool.rx.IsZero() && pool.ry.IsZero() { panic("pool price is not defined for a depleted pool") } @@ -341,14 +341,14 @@ func (pool *RangedPool) IsDepleted() bool { } // HighestBuyPrice returns the highest buy price of the pool. -func (pool *RangedPool) HighestBuyPrice() (price sdk.Dec, found bool) { +func (pool *RangedPool) HighestBuyPrice() (price sdkmath.LegacyDec, found bool) { // The highest buy price is actually a bit lower than pool price, // but it's not important for our matching logic. return pool.Price(), true } // LowestSellPrice returns the lowest sell price of the pool. -func (pool *RangedPool) LowestSellPrice() (price sdk.Dec, found bool) { +func (pool *RangedPool) LowestSellPrice() (price sdkmath.LegacyDec, found bool) { // The lowest sell price is actually a bit higher than the pool price, // but it's not important for our matching logic. return pool.Price(), true @@ -356,7 +356,7 @@ func (pool *RangedPool) LowestSellPrice() (price sdk.Dec, found bool) { // BuyAmountOver returns the amount of buy orders for price greater than // or equal to given price. -func (pool *RangedPool) BuyAmountOver(price sdk.Dec, _ bool) (amt sdk.Int) { +func (pool *RangedPool) BuyAmountOver(price sdkmath.LegacyDec, _ bool) (amt sdkmath.Int) { origPrice := price if price.LT(pool.minPrice) { price = pool.minPrice @@ -368,8 +368,8 @@ func (pool *RangedPool) BuyAmountOver(price sdk.Dec, _ bool) (amt sdk.Int) { dx := pool.xComp.Sub(price.Mul(pool.yComp)) if !dx.IsPositive() { return zeroInt - } else if dx.GT(pool.rx.ToDec()) { - dx = pool.rx.ToDec() + } else if dx.GT(pool.rx.ToLegacyDec()) { + dx = pool.rx.ToLegacyDec() } utils.SafeMath(func() { amt = dx.QuoTruncate(origPrice).TruncateInt() // dy = dx / P @@ -384,7 +384,7 @@ func (pool *RangedPool) BuyAmountOver(price sdk.Dec, _ bool) (amt sdk.Int) { // SellAmountUnder returns the amount of sell orders for price less than // or equal to given price. -func (pool *RangedPool) SellAmountUnder(price sdk.Dec, _ bool) (amt sdk.Int) { +func (pool *RangedPool) SellAmountUnder(price sdkmath.LegacyDec, _ bool) (amt sdkmath.Int) { if price.GT(pool.maxPrice) { price = pool.maxPrice } @@ -405,7 +405,7 @@ func (pool *RangedPool) SellAmountUnder(price sdk.Dec, _ bool) (amt sdk.Int) { // BuyAmountTo returns the amount of buy orders of the pool for price, // where BuyAmountTo is used when the pool price is higher than the highest // price of the order book. -func (pool *RangedPool) BuyAmountTo(price sdk.Dec) (amt sdk.Int) { +func (pool *RangedPool) BuyAmountTo(price sdkmath.LegacyDec) (amt sdkmath.Int) { origPrice := price if price.LT(pool.minPrice) { price = pool.minPrice @@ -417,11 +417,11 @@ func (pool *RangedPool) BuyAmountTo(price sdk.Dec) (amt sdk.Int) { sqrtYComp := utils.DecApproxSqrt(pool.yComp) sqrtPrice := utils.DecApproxSqrt(price) // dx = rx - (sqrt(P * (rx + transX) * (ry + transY)) - transX) - dx := pool.rx.ToDec().Sub(sqrtPrice.Mul(sqrtXComp.Mul(sqrtYComp)).Sub(pool.transX)) + dx := pool.rx.ToLegacyDec().Sub(sqrtPrice.Mul(sqrtXComp.Mul(sqrtYComp)).Sub(pool.transX)) if !dx.IsPositive() { return zeroInt - } else if dx.GT(pool.rx.ToDec()) { - dx = pool.rx.ToDec() + } else if dx.GT(pool.rx.ToLegacyDec()) { + dx = pool.rx.ToLegacyDec() } utils.SafeMath(func() { amt = dx.QuoTruncate(origPrice).TruncateInt() // dy = dx / P @@ -437,7 +437,7 @@ func (pool *RangedPool) BuyAmountTo(price sdk.Dec) (amt sdk.Int) { // SellAmountTo returns the amount of sell orders of the pool for price, // where SellAmountTo is used when the pool price is lower than the lowest // price of the order book. -func (pool *RangedPool) SellAmountTo(price sdk.Dec) (amt sdk.Int) { +func (pool *RangedPool) SellAmountTo(price sdkmath.LegacyDec) (amt sdkmath.Int) { if price.GT(pool.maxPrice) { price = pool.maxPrice } @@ -448,7 +448,7 @@ func (pool *RangedPool) SellAmountTo(price sdk.Dec) (amt sdk.Int) { sqrtYComp := utils.DecApproxSqrt(pool.yComp) sqrtPrice := utils.DecApproxSqrt(price) // dy = ry - (sqrt((x + transX) * (y + transY) / P) - b) - amt = pool.ry.ToDec().Sub(sqrtXComp.Mul(sqrtYComp).QuoRoundUp(sqrtPrice).Sub(pool.transY)).TruncateInt() + amt = pool.ry.ToLegacyDec().Sub(sqrtXComp.Mul(sqrtYComp).QuoRoundUp(sqrtPrice).Sub(pool.transY)).TruncateInt() if amt.GT(pool.ry) { amt = pool.ry } @@ -474,35 +474,35 @@ func (pool *RangedPool) Clone() Pool { // Deposit returns accepted x and y coin amount and minted pool coin amount // when someone deposits x and y coins. -func Deposit(rx, ry, ps, x, y sdk.Int) (ax, ay, pc sdk.Int) { +func Deposit(rx, ry, ps, x, y sdkmath.Int) (ax, ay, pc sdkmath.Int) { // Calculate accepted amount and minting amount. // Note that we take as many coins as possible(by ceiling numbers) // from depositor and mint as little coins as possible. utils.SafeMath(func() { - rx, ry := rx.ToDec(), ry.ToDec() - ps := ps.ToDec() + rx, ry := rx.ToLegacyDec(), ry.ToLegacyDec() + ps := ps.ToLegacyDec() // pc = floor(ps * min(x / rx, y / ry)) - var ratio sdk.Dec + var ratio sdkmath.LegacyDec switch { case rx.IsZero(): - ratio = y.ToDec().QuoTruncate(ry) + ratio = y.ToLegacyDec().QuoTruncate(ry) case ry.IsZero(): - ratio = x.ToDec().QuoTruncate(rx) + ratio = x.ToLegacyDec().QuoTruncate(rx) default: - ratio = sdk.MinDec( - x.ToDec().QuoTruncate(rx), - y.ToDec().QuoTruncate(ry), + ratio = sdkmath.LegacyMinDec( + x.ToLegacyDec().QuoTruncate(rx), + y.ToLegacyDec().QuoTruncate(ry), ) } pc = ps.MulTruncate(ratio).TruncateInt() - mintProportion := pc.ToDec().Quo(ps) // pc / ps + mintProportion := pc.ToLegacyDec().Quo(ps) // pc / ps ax = rx.Mul(mintProportion).Ceil().TruncateInt() // ceil(rx * mintProportion) ay = ry.Mul(mintProportion).Ceil().TruncateInt() // ceil(ry * mintProportion) }, func() { - ax, ay, pc = sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt() + ax, ay, pc = sdkmath.ZeroInt(), sdkmath.ZeroInt(), sdkmath.ZeroInt() }) return @@ -511,7 +511,7 @@ func Deposit(rx, ry, ps, x, y sdk.Int) (ax, ay, pc sdk.Int) { // Withdraw returns withdrawn x and y coin amount when someone withdraws // pc pool coin. // Withdraw also takes care of the fee rate. -func Withdraw(rx, ry, ps, pc sdk.Int, feeRate sdk.Dec) (x, y sdk.Int) { +func Withdraw(rx, ry, ps, pc sdkmath.Int, feeRate sdkmath.LegacyDec) (x, y sdkmath.Int) { if pc.Equal(ps) { // Redeeming the last pool coin - give all remaining rx and ry. x = rx @@ -520,26 +520,26 @@ func Withdraw(rx, ry, ps, pc sdk.Int, feeRate sdk.Dec) (x, y sdk.Int) { } utils.SafeMath(func() { - proportion := pc.ToDec().QuoTruncate(ps.ToDec()) // pc / ps - multiplier := sdk.OneDec().Sub(feeRate) // 1 - feeRate - x = rx.ToDec().MulTruncate(proportion).MulTruncate(multiplier).TruncateInt() // floor(rx * proportion * multiplier) - y = ry.ToDec().MulTruncate(proportion).MulTruncate(multiplier).TruncateInt() // floor(ry * proportion * multiplier) + proportion := pc.ToLegacyDec().QuoTruncate(ps.ToLegacyDec()) // pc / ps + multiplier := sdkmath.LegacyOneDec().Sub(feeRate) // 1 - feeRate + x = rx.ToLegacyDec().MulTruncate(proportion).MulTruncate(multiplier).TruncateInt() // floor(rx * proportion * multiplier) + y = ry.ToLegacyDec().MulTruncate(proportion).MulTruncate(multiplier).TruncateInt() // floor(ry * proportion * multiplier) }, func() { - x, y = sdk.ZeroInt(), sdk.ZeroInt() + x, y = sdkmath.ZeroInt(), sdkmath.ZeroInt() }) return } -func DeriveTranslation(rx, ry sdk.Int, minPrice, maxPrice sdk.Dec) (transX, transY sdk.Dec) { +func DeriveTranslation(rx, ry sdkmath.Int, minPrice, maxPrice sdkmath.LegacyDec) (transX, transY sdkmath.LegacyDec) { sqrt := utils.DecApproxSqrt // M = minPrice, L = maxPrice - rxDec, ryDec := rx.ToDec(), ry.ToDec() + rxDec, ryDec := rx.ToLegacyDec(), ry.ToLegacyDec() sqrtM := sqrt(minPrice) sqrtL := sqrt(maxPrice) - var sqrtP sdk.Dec + var sqrtP sdkmath.LegacyDec switch { case rxDec.IsZero(): // y asset single pool sqrtP = sqrtM @@ -558,7 +558,7 @@ func DeriveTranslation(rx, ry sdk.Int, minPrice, maxPrice sdk.Dec) (transX, tran sqrtP = alpha.Add(sqrt(alpha.Power(2).Add(fourDec))).QuoInt64(2).Mul(sqrtXOverY) } - var sqrtK sdk.Dec + var sqrtK sdkmath.LegacyDec if !sqrtP.Equal(sqrtM) { // sqrtK = sqrt(K) = rx / (sqrt(P) - sqrt(M)) sqrtK = rxDec.Quo(sqrtP.Sub(sqrtM)) @@ -583,13 +583,13 @@ func DeriveTranslation(rx, ry sdk.Int, minPrice, maxPrice sdk.Dec) (transX, tran return } -func PoolOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.Dec, tickPrec int) []Order { +func PoolOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdkmath.LegacyDec, tickPrec int) []Order { return append( PoolBuyOrders(pool, orderer, lowestPrice, highestPrice, tickPrec), PoolSellOrders(pool, orderer, lowestPrice, highestPrice, tickPrec)...) } -func PoolBuyOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.Dec, tickPrec int) (orders []Order) { +func PoolBuyOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdkmath.LegacyDec, tickPrec int) (orders []Order) { defer func() { if r := recover(); r != nil { orders = nil @@ -600,7 +600,7 @@ func PoolBuyOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.Dec return nil } tmpPool := pool.Clone() - placeOrder := func(price sdk.Dec, amt sdk.Int, derive bool) { + placeOrder := func(price sdkmath.LegacyDec, amt sdkmath.Int, derive bool) { orders = append(orders, orderer.Order(Buy, price, amt)) rx, ry := tmpPool.Balances() rx = rx.Sub(price.MulInt(amt).Ceil().TruncateInt()) // quote coin ceiling @@ -613,7 +613,7 @@ func PoolBuyOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.Dec placeOrder(highestPrice, amt, true) } } - tick := PriceToDownTick(sdk.MinDec(highestPrice, tmpPool.Price()), tickPrec) + tick := PriceToDownTick(sdkmath.LegacyMinDec(highestPrice, tmpPool.Price()), tickPrec) for tick.GTE(lowestPrice) { amt := tmpPool.BuyAmountOver(tick, true) if amt.LT(MinCoinAmount) { @@ -630,7 +630,7 @@ func PoolBuyOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.Dec return orders } -func PoolSellOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.Dec, tickPrec int) (orders []Order) { +func PoolSellOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdkmath.LegacyDec, tickPrec int) (orders []Order) { defer func() { if r := recover(); r != nil { orders = nil @@ -641,7 +641,7 @@ func PoolSellOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.De return nil } tmpPool := pool.Clone() - placeOrder := func(price sdk.Dec, amt sdk.Int, derive bool) { + placeOrder := func(price sdkmath.LegacyDec, amt sdkmath.Int, derive bool) { orders = append(orders, orderer.Order(Sell, price, amt)) rx, ry := tmpPool.Balances() rx = rx.Add(price.MulInt(amt).TruncateInt()) // quote coin truncation @@ -654,7 +654,7 @@ func PoolSellOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.De placeOrder(lowestPrice, amt, true) } } - tick := PriceToUpTick(sdk.MaxDec(lowestPrice, tmpPool.Price()), tickPrec) + tick := PriceToUpTick(sdkmath.LegacyMaxDec(lowestPrice, tmpPool.Price()), tickPrec) for tick.LTE(highestPrice) { amt := tmpPool.SellAmountUnder(tick, true) if amt.LT(MinCoinAmount) || tick.MulInt(amt).TruncateInt().IsZero() { @@ -672,11 +672,11 @@ func PoolSellOrders(pool Pool, orderer Orderer, lowestPrice, highestPrice sdk.De } // InitialPoolCoinSupply returns ideal initial pool coin minting amount. -func InitialPoolCoinSupply(x, y sdk.Int) sdk.Int { +func InitialPoolCoinSupply(x, y sdkmath.Int) sdkmath.Int { cx := len(x.BigInt().Text(10)) - 1 // characteristic of x cy := len(y.BigInt().Text(10)) - 1 // characteristic of y c := ((cx + 1) + (cy + 1) + 1) / 2 // ceil(((cx + 1) + (cy + 1)) / 2) res := big.NewInt(10) res.Exp(res, big.NewInt(int64(c)), nil) // 10^c - return sdk.NewIntFromBigInt(res) + return sdkmath.NewIntFromBigInt(res) } diff --git a/x/liquidity/amm/pool_test.go b/x/liquidity/amm/pool_test.go index e6925aa37..5031eb42e 100644 --- a/x/liquidity/amm/pool_test.go +++ b/x/liquidity/amm/pool_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidity/amm" @@ -15,47 +15,47 @@ import ( func TestBasicPool(t *testing.T) { r := rand.New(rand.NewSource(0)) for i := 0; i < 1000; i++ { - rx, ry := sdk.NewInt(1+r.Int63n(100000000)), sdk.NewInt(1+r.Int63n(100000000)) - pool := amm.NewBasicPool(rx, ry, sdk.Int{}) + rx, ry := sdkmath.NewInt(1+r.Int63n(100000000)), sdkmath.NewInt(1+r.Int63n(100000000)) + pool := amm.NewBasicPool(rx, ry, sdkmath.Int{}) highest, found := pool.HighestBuyPrice() require.True(t, found) - require.True(sdk.DecEq(t, pool.Price(), highest)) + require.True(sdkmath.LegacyDecEq(t, pool.Price(), highest)) lowest, found := pool.LowestSellPrice() require.True(t, found) - require.True(sdk.DecEq(t, pool.Price(), lowest)) + require.True(sdkmath.LegacyDecEq(t, pool.Price(), lowest)) } } func TestCreateBasicPool(t *testing.T) { for _, tc := range []struct { name string - rx, ry sdk.Int + rx, ry sdkmath.Int expectedErr string }{ { "both zero amount", - sdk.NewInt(0), sdk.NewInt(0), + sdkmath.NewInt(0), sdkmath.NewInt(0), "cannot create basic pool with zero reserve amount", }, { "zero y amount", - sdk.NewInt(1000000), sdk.NewInt(0), + sdkmath.NewInt(1000000), sdkmath.NewInt(0), "cannot create basic pool with zero reserve amount", }, { "zero x amount", - sdk.NewInt(0), sdk.NewInt(1000000), + sdkmath.NewInt(0), sdkmath.NewInt(1000000), "cannot create basic pool with zero reserve amount", }, { "too low price", - sdk.NewInt(1000000), sdk.NewIntWithDecimal(1, 26), + sdkmath.NewInt(1000000), sdkmath.NewIntWithDecimal(1, 26), "pool price is lower than min price 0.000000000000001000", }, { "too high price", - sdk.NewIntWithDecimal(1, 48), sdk.NewInt(1000000), + sdkmath.NewIntWithDecimal(1, 48), sdkmath.NewInt(1000000), "pool price is greater than max price 100000000000000000000.000000000000000000", }, } { @@ -73,28 +73,28 @@ func TestCreateBasicPool(t *testing.T) { func TestBasicPool_Price(t *testing.T) { for _, tc := range []struct { name string - rx, ry int64 // reserve balance - ps int64 // pool coin supply - p sdk.Dec // expected pool price + rx, ry int64 // reserve balance + ps int64 // pool coin supply + p sdkmath.LegacyDec // expected pool price }{ { name: "normal pool", ps: 10000, rx: 20000, ry: 100, - p: sdk.NewDec(200), + p: sdkmath.LegacyNewDec(200), }, { name: "decimal rounding", ps: 10000, rx: 200, ry: 300, - p: sdk.MustNewDecFromStr("0.666666666666666667"), + p: sdkmath.LegacyMustNewDecFromStr("0.666666666666666667"), }, } { t.Run(tc.name, func(t *testing.T) { - pool := amm.NewBasicPool(sdk.NewInt(tc.rx), sdk.NewInt(tc.ry), sdk.NewInt(tc.ps)) - require.True(sdk.DecEq(t, tc.p, pool.Price())) + pool := amm.NewBasicPool(sdkmath.NewInt(tc.rx), sdkmath.NewInt(tc.ry), sdkmath.NewInt(tc.ps)) + require.True(sdkmath.LegacyDecEq(t, tc.p, pool.Price())) }) } @@ -116,7 +116,7 @@ func TestBasicPool_Price(t *testing.T) { } { t.Run("panics", func(t *testing.T) { require.Panics(t, func() { - pool := amm.NewBasicPool(sdk.NewInt(tc.rx), sdk.NewInt(tc.ry), sdk.NewInt(tc.ps)) + pool := amm.NewBasicPool(sdkmath.NewInt(tc.rx), sdkmath.NewInt(tc.ry), sdkmath.NewInt(tc.ps)) pool.Price() }) }) @@ -167,7 +167,7 @@ func TestBasicPool_IsDepleted(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - pool := amm.NewBasicPool(sdk.NewInt(tc.rx), sdk.NewInt(tc.ry), sdk.NewInt(tc.ps)) + pool := amm.NewBasicPool(sdkmath.NewInt(tc.rx), sdkmath.NewInt(tc.ry), sdkmath.NewInt(tc.ps)) require.Equal(t, tc.isDepleted, pool.IsDepleted()) }) } @@ -272,11 +272,11 @@ func TestBasicPool_Deposit(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - pool := amm.NewBasicPool(sdk.NewInt(tc.rx), sdk.NewInt(tc.ry), sdk.NewInt(tc.ps)) - ax, ay, pc := amm.Deposit(sdk.NewInt(tc.rx), sdk.NewInt(tc.ry), sdk.NewInt(tc.ps), sdk.NewInt(tc.x), sdk.NewInt(tc.y)) - require.True(sdk.IntEq(t, sdk.NewInt(tc.ax), ax)) - require.True(sdk.IntEq(t, sdk.NewInt(tc.ay), ay)) - require.True(sdk.IntEq(t, sdk.NewInt(tc.pc), pc)) + pool := amm.NewBasicPool(sdkmath.NewInt(tc.rx), sdkmath.NewInt(tc.ry), sdkmath.NewInt(tc.ps)) + ax, ay, pc := amm.Deposit(sdkmath.NewInt(tc.rx), sdkmath.NewInt(tc.ry), sdkmath.NewInt(tc.ps), sdkmath.NewInt(tc.x), sdkmath.NewInt(tc.y)) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(tc.ax), ax)) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(tc.ay), ay)) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(tc.pc), pc)) // Additional assertions if !pool.IsDepleted() { require.True(t, (ax.Int64()*tc.ps) >= (pc.Int64()*tc.rx)) // (ax / rx) > (pc / ps) @@ -292,7 +292,7 @@ func TestBasicPool_Withdraw(t *testing.T) { rx, ry int64 // reserve balance ps int64 // pool coin supply pc int64 // redeeming pool coin amount - feeRate sdk.Dec + feeRate sdkmath.LegacyDec x, y int64 // withdrawn coin amount }{ { @@ -301,7 +301,7 @@ func TestBasicPool_Withdraw(t *testing.T) { ry: 100, ps: 10000, pc: 1000, - feeRate: sdk.ZeroDec(), + feeRate: sdkmath.LegacyZeroDec(), x: 200, y: 10, }, @@ -311,7 +311,7 @@ func TestBasicPool_Withdraw(t *testing.T) { ry: 100, ps: 10000, pc: 1000, - feeRate: sdk.MustNewDecFromStr("0.003"), + feeRate: sdkmath.LegacyMustNewDecFromStr("0.003"), x: 199, y: 9, }, @@ -321,7 +321,7 @@ func TestBasicPool_Withdraw(t *testing.T) { ry: 567, ps: 10, pc: 10, - feeRate: sdk.MustNewDecFromStr("0.003"), + feeRate: sdkmath.LegacyMustNewDecFromStr("0.003"), x: 123, y: 567, }, @@ -331,7 +331,7 @@ func TestBasicPool_Withdraw(t *testing.T) { ry: 100, ps: 10000, pc: 99, - feeRate: sdk.ZeroDec(), + feeRate: sdkmath.LegacyZeroDec(), x: 0, y: 0, }, @@ -341,15 +341,15 @@ func TestBasicPool_Withdraw(t *testing.T) { ry: 100, ps: 10000, pc: 99, - feeRate: sdk.ZeroDec(), + feeRate: sdkmath.LegacyZeroDec(), x: 99, y: 0, }, } { t.Run(tc.name, func(t *testing.T) { - x, y := amm.Withdraw(sdk.NewInt(tc.rx), sdk.NewInt(tc.ry), sdk.NewInt(tc.ps), sdk.NewInt(tc.pc), tc.feeRate) - require.True(sdk.IntEq(t, sdk.NewInt(tc.x), x)) - require.True(sdk.IntEq(t, sdk.NewInt(tc.y), y)) + x, y := amm.Withdraw(sdkmath.NewInt(tc.rx), sdkmath.NewInt(tc.ry), sdkmath.NewInt(tc.ps), sdkmath.NewInt(tc.pc), tc.feeRate) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(tc.x), x)) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(tc.y), y)) // Additional assertions require.True(t, (tc.pc*tc.rx) >= (x.Int64()*tc.ps)) require.True(t, (tc.pc*tc.ry) >= (y.Int64()*tc.ps)) @@ -358,81 +358,81 @@ func TestBasicPool_Withdraw(t *testing.T) { } func TestBasicPool_BuyAmountOver(t *testing.T) { - pool := amm.NewBasicPool(sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}) + pool := amm.NewBasicPool(sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}) for _, tc := range []struct { pool *amm.BasicPool - price sdk.Dec - amt sdk.Int + price sdkmath.LegacyDec + amt sdkmath.Int }{ - {pool, utils.ParseDec("1.1"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.0"), sdk.ZeroInt()}, - {pool, utils.ParseDec("0.9"), sdk.NewInt(111111)}, - {pool, utils.ParseDec("0.8"), sdk.NewInt(250000)}, + {pool, utils.ParseDec("1.1"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.0"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("0.9"), sdkmath.NewInt(111111)}, + {pool, utils.ParseDec("0.8"), sdkmath.NewInt(250000)}, } { t.Run("", func(t *testing.T) { amt := tc.pool.BuyAmountOver(tc.price, true) - require.True(sdk.IntEq(t, tc.amt, amt)) + require.True(sdkmath.IntEq(t, tc.amt, amt)) }) } } func TestBasicPool_SellAmountUnder(t *testing.T) { - pool := amm.NewBasicPool(sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}) + pool := amm.NewBasicPool(sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}) for _, tc := range []struct { pool *amm.BasicPool - price sdk.Dec - amt sdk.Int + price sdkmath.LegacyDec + amt sdkmath.Int }{ - {pool, utils.ParseDec("0.9"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.0"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.1"), sdk.NewInt(90909)}, - {pool, utils.ParseDec("1.2"), sdk.NewInt(166666)}, + {pool, utils.ParseDec("0.9"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.0"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.1"), sdkmath.NewInt(90909)}, + {pool, utils.ParseDec("1.2"), sdkmath.NewInt(166666)}, } { t.Run("", func(t *testing.T) { amt := tc.pool.SellAmountUnder(tc.price, true) - require.True(sdk.IntEq(t, tc.amt, amt)) + require.True(sdkmath.IntEq(t, tc.amt, amt)) }) } } func TestBasicPool_BuyAmountTo(t *testing.T) { - pool := amm.NewBasicPool(sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}) + pool := amm.NewBasicPool(sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}) for _, tc := range []struct { pool *amm.BasicPool - price sdk.Dec - amt sdk.Int + price sdkmath.LegacyDec + amt sdkmath.Int }{ - {pool, utils.ParseDec("1.1"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.0"), sdk.ZeroInt()}, - {pool, utils.ParseDec("0.5"), sdk.NewInt(585786)}, - {pool, utils.ParseDec("0.4"), sdk.NewInt(918861)}, + {pool, utils.ParseDec("1.1"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.0"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("0.5"), sdkmath.NewInt(585786)}, + {pool, utils.ParseDec("0.4"), sdkmath.NewInt(918861)}, } { t.Run("", func(t *testing.T) { amt := tc.pool.BuyAmountTo(tc.price) - require.True(sdk.IntEq(t, tc.amt, amt)) + require.True(sdkmath.IntEq(t, tc.amt, amt)) }) } } func TestBasicPool_SellAmountTo(t *testing.T) { - pool := amm.NewBasicPool(sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}) + pool := amm.NewBasicPool(sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}) for _, tc := range []struct { pool *amm.BasicPool - price sdk.Dec - amt sdk.Int + price sdkmath.LegacyDec + amt sdkmath.Int }{ - {pool, utils.ParseDec("0.9"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.0"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.4"), sdk.NewInt(154845)}, - {pool, utils.ParseDec("1.5"), sdk.NewInt(183503)}, + {pool, utils.ParseDec("0.9"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.0"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.4"), sdkmath.NewInt(154845)}, + {pool, utils.ParseDec("1.5"), sdkmath.NewInt(183503)}, } { t.Run("", func(t *testing.T) { amt := tc.pool.SellAmountTo(tc.price) - require.True(sdk.IntEq(t, tc.amt, amt)) + require.True(sdkmath.IntEq(t, tc.amt, amt)) }) } } @@ -440,8 +440,8 @@ func TestBasicPool_SellAmountTo(t *testing.T) { func TestValidateRangedPoolParams(t *testing.T) { for _, tc := range []struct { name string - minPrice, maxPrice sdk.Dec - initialPrice sdk.Dec + minPrice, maxPrice sdkmath.LegacyDec + initialPrice sdkmath.LegacyDec expectedErr string }{ { @@ -464,13 +464,13 @@ func TestValidateRangedPoolParams(t *testing.T) { }, { "too low min price", - sdk.NewDecWithPrec(1, 16), utils.ParseDec("2.0"), + sdkmath.LegacyNewDecWithPrec(1, 16), utils.ParseDec("2.0"), utils.ParseDec("1.0"), "min price must not be lower than 0.000000000000001000", }, { "too high max price", - utils.ParseDec("0.5"), sdk.NewIntWithDecimal(1, 25).ToDec(), + utils.ParseDec("0.5"), sdkmath.NewIntWithDecimal(1, 25).ToLegacyDec(), utils.ParseDec("1.0"), "max price must not be higher than 100000000000000000000.000000000000000000", }, @@ -511,125 +511,125 @@ func TestValidateRangedPoolParams(t *testing.T) { } func TestCreateRangedPool(t *testing.T) { - intApproxEq := func(exp, got sdk.Int) (*testing.T, bool, string, string, string) { - c := exp.Sub(got).Abs().LTE(sdk.OneInt()) + intApproxEq := func(exp, got sdkmath.Int) (*testing.T, bool, string, string, string) { + c := exp.Sub(got).Abs().LTE(sdkmath.OneInt()) if c && !exp.IsZero() { - c = exp.ToDec().Sub(got.ToDec()).Abs().Quo(exp.ToDec()).LTE(sdk.NewDecWithPrec(1, 3)) + c = exp.ToLegacyDec().Sub(got.ToLegacyDec()).Abs().Quo(exp.ToLegacyDec()).LTE(sdkmath.LegacyNewDecWithPrec(1, 3)) } return t, c, "expected:\t%v\ngot:\t\t%v", exp.String(), got.String() } for _, tc := range []struct { name string - x, y sdk.Int - minPrice, maxPrice sdk.Dec - initialPrice sdk.Dec + x, y sdkmath.Int + minPrice, maxPrice sdkmath.LegacyDec + initialPrice sdkmath.LegacyDec expectedErr string - ax, ay sdk.Int + ax, ay sdkmath.Int }{ { "basic case", - sdk.NewInt(1_000000), sdk.NewInt(1_000000), + sdkmath.NewInt(1_000000), sdkmath.NewInt(1_000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), utils.ParseDec("1.0"), "", - sdk.NewInt(1_000000), sdk.NewInt(1_000000), + sdkmath.NewInt(1_000000), sdkmath.NewInt(1_000000), }, { "basic case 2", - sdk.NewInt(500000), sdk.NewInt(1_000000), + sdkmath.NewInt(500000), sdkmath.NewInt(1_000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), utils.ParseDec("1.0"), "", - sdk.NewInt(500000), sdk.NewInt(500000), + sdkmath.NewInt(500000), sdkmath.NewInt(500000), }, { "basic case 3", - sdk.NewInt(1_000000), sdk.NewInt(500000), + sdkmath.NewInt(1_000000), sdkmath.NewInt(500000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), utils.ParseDec("1.0"), "", - sdk.NewInt(500000), sdk.NewInt(500000), + sdkmath.NewInt(500000), sdkmath.NewInt(500000), }, { "invalid pool", - sdk.ZeroInt(), sdk.ZeroInt(), + sdkmath.ZeroInt(), sdkmath.ZeroInt(), utils.ParseDec("1.0"), utils.ParseDec("2.0"), utils.ParseDec("1.0"), "either x or y must be positive", - sdk.Int{}, sdk.Int{}, + sdkmath.Int{}, sdkmath.Int{}, }, { "single asset x pool", - sdk.NewInt(1_000000), sdk.ZeroInt(), + sdkmath.NewInt(1_000000), sdkmath.ZeroInt(), utils.ParseDec("1.0"), utils.ParseDec("2.0"), utils.ParseDec("2.0"), "", - sdk.NewInt(1_000000), sdk.ZeroInt(), + sdkmath.NewInt(1_000000), sdkmath.ZeroInt(), }, { "single asset x pool - refund", - sdk.NewInt(1_000000), sdk.NewInt(1_000000), + sdkmath.NewInt(1_000000), sdkmath.NewInt(1_000000), utils.ParseDec("1.0"), utils.ParseDec("2.0"), utils.ParseDec("2.0"), "", - sdk.NewInt(1_000000), sdk.ZeroInt(), + sdkmath.NewInt(1_000000), sdkmath.ZeroInt(), }, { "single asset y pool", - sdk.ZeroInt(), sdk.NewInt(1_000000), + sdkmath.ZeroInt(), sdkmath.NewInt(1_000000), utils.ParseDec("1.0"), utils.ParseDec("2.0"), utils.ParseDec("1.0"), "", - sdk.ZeroInt(), sdk.NewInt(1_000000), + sdkmath.ZeroInt(), sdkmath.NewInt(1_000000), }, { "single asset y pool - refund", - sdk.NewInt(1_000000), sdk.NewInt(1_000000), + sdkmath.NewInt(1_000000), sdkmath.NewInt(1_000000), utils.ParseDec("1.0"), utils.ParseDec("2.0"), utils.ParseDec("1.0"), "", - sdk.ZeroInt(), sdk.NewInt(1_000000), + sdkmath.ZeroInt(), sdkmath.NewInt(1_000000), }, { "small min price", - sdk.NewInt(1_000000000000000000), sdk.NewInt(1_000000000000000000), - sdk.NewDecWithPrec(1, 15), utils.ParseDec("2.0"), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(1_000000000000000000), + sdkmath.LegacyNewDecWithPrec(1, 15), utils.ParseDec("2.0"), utils.ParseDec("1.0"), "", - sdk.NewInt(1_000000000000000000), sdk.NewInt(292893228075549596), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(292893228075549596), }, { "large max price", - sdk.NewInt(1_000000000000000000), sdk.NewInt(1_000000000000000000), - utils.ParseDec("1.0"), sdk.NewIntWithDecimal(1, 20).ToDec(), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(1_000000000000000000), + utils.ParseDec("1.0"), sdkmath.NewIntWithDecimal(1, 20).ToLegacyDec(), utils.ParseDec("2.0"), "", - sdk.NewInt(585786437709747665), sdk.NewInt(1_000000000000000000), + sdkmath.NewInt(585786437709747665), sdkmath.NewInt(1_000000000000000000), }, { "close min price and max price", - sdk.NewInt(1_000000000000000000), sdk.NewInt(1_000000000000000000), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(1_000000000000000000), utils.ParseDec("1.0"), utils.ParseDec("1.001"), utils.ParseDec("1.0005"), "", - sdk.NewInt(1_000000000000000000), sdk.NewInt(999000936633614182), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(999000936633622179), }, { "small x asset", - sdk.NewInt(9), sdk.NewInt(9_000000000000000000), + sdkmath.NewInt(9), sdkmath.NewInt(9_000000000000000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), utils.ParseDec("0.5000001"), "", - sdk.NewInt(9), sdk.NewInt(89999987), + sdkmath.NewInt(9), sdkmath.NewInt(89999987), }, { "small y asset", - sdk.NewInt(9_000000000000000000), sdk.NewInt(9), + sdkmath.NewInt(9_000000000000000000), sdkmath.NewInt(9), utils.ParseDec("0.5"), utils.ParseDec("2.0"), utils.ParseDec("1.9999999"), "", - sdk.NewInt(359999969), sdk.NewInt(9), + sdkmath.NewInt(359999969), sdkmath.NewInt(9), }, } { t.Run(tc.name, func(t *testing.T) { @@ -650,67 +650,67 @@ func TestCreateRangedPool(t *testing.T) { func TestRangedPool_Deposit(t *testing.T) { for _, tc := range []struct { name string - rx, ry sdk.Int - ps sdk.Int - minPrice, maxPrice sdk.Dec - x, y sdk.Int // depositing x and y coin amount - ax, ay sdk.Int // accepted x and y coin amount - pc sdk.Int // expected minted pool coin amount + rx, ry sdkmath.Int + ps sdkmath.Int + minPrice, maxPrice sdkmath.LegacyDec + x, y sdkmath.Int // depositing x and y coin amount + ax, ay sdkmath.Int // accepted x and y coin amount + pc sdkmath.Int // expected minted pool coin amount }{ { "ideal case", - sdk.NewInt(1_000000000000000000), sdk.NewInt(1_000000000000000000), - sdk.NewInt(1_000000000000), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(1_000000000000000000), + sdkmath.NewInt(1_000000000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), - sdk.NewInt(123456789), sdk.NewInt(123456789), - sdk.NewInt(123000000), sdk.NewInt(123000000), - sdk.NewInt(123), + sdkmath.NewInt(123456789), sdkmath.NewInt(123456789), + sdkmath.NewInt(123000000), sdkmath.NewInt(123000000), + sdkmath.NewInt(123), }, { "single x asset pool", - sdk.NewInt(1_000000000000000000), sdk.NewInt(0), - sdk.NewInt(1_000000000000), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(0), + sdkmath.NewInt(1_000000000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), - sdk.NewInt(123456789), sdk.NewInt(0), - sdk.NewInt(123000000), sdk.NewInt(0), - sdk.NewInt(123), + sdkmath.NewInt(123456789), sdkmath.NewInt(0), + sdkmath.NewInt(123000000), sdkmath.NewInt(0), + sdkmath.NewInt(123), }, { "single y asset pool", - sdk.NewInt(0), sdk.NewInt(1_000000000000000000), - sdk.NewInt(1_000000000000), + sdkmath.NewInt(0), sdkmath.NewInt(1_000000000000000000), + sdkmath.NewInt(1_000000000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), - sdk.NewInt(0), sdk.NewInt(123456789), - sdk.NewInt(0), sdk.NewInt(123000000), - sdk.NewInt(123), + sdkmath.NewInt(0), sdkmath.NewInt(123456789), + sdkmath.NewInt(0), sdkmath.NewInt(123000000), + sdkmath.NewInt(123), }, } { t.Run(tc.name, func(t *testing.T) { pool := amm.NewRangedPool(tc.rx, tc.ry, tc.ps, tc.minPrice, tc.maxPrice) ax, ay, pc := amm.Deposit(tc.rx, tc.ry, tc.ps, tc.x, tc.y) - require.True(sdk.IntEq(t, tc.ax, ax)) - require.True(sdk.IntEq(t, tc.ay, ay)) - require.True(sdk.IntEq(t, tc.pc, pc)) + require.True(sdkmath.IntEq(t, tc.ax, ax)) + require.True(sdkmath.IntEq(t, tc.ay, ay)) + require.True(sdkmath.IntEq(t, tc.pc, pc)) newPool := amm.NewRangedPool(tc.rx.Add(ax), tc.ry.Add(ay), tc.ps.Add(pc), tc.minPrice, tc.maxPrice) - var reserveRatio sdk.Dec + var reserveRatio sdkmath.LegacyDec switch { case tc.rx.IsZero(): - reserveRatio = ay.ToDec().Quo(tc.ry.ToDec()) + reserveRatio = ay.ToLegacyDec().Quo(tc.ry.ToLegacyDec()) case tc.ry.IsZero(): - reserveRatio = ax.ToDec().Quo(tc.rx.ToDec()) + reserveRatio = ax.ToLegacyDec().Quo(tc.rx.ToLegacyDec()) default: - reserveRatio = ax.ToDec().Quo(tc.rx.ToDec()) - require.True(t, utils.DecApproxEqual(reserveRatio, ay.ToDec().Quo(tc.ry.ToDec()))) + reserveRatio = ax.ToLegacyDec().Quo(tc.rx.ToLegacyDec()) + require.True(t, utils.DecApproxEqual(reserveRatio, ay.ToLegacyDec().Quo(tc.ry.ToLegacyDec()))) } // check ax/ay == rx/ry if !tc.rx.IsZero() && !tc.ry.IsZero() { - require.True(t, utils.DecApproxEqual(ax.ToDec().Quo(ay.ToDec()), tc.rx.ToDec().Quo(tc.ry.ToDec()))) + require.True(t, utils.DecApproxEqual(ax.ToLegacyDec().Quo(ay.ToLegacyDec()), tc.rx.ToLegacyDec().Quo(tc.ry.ToLegacyDec()))) } // check ax/rx == ay/ry == pc/ps - require.True(t, utils.DecApproxEqual(reserveRatio, pc.ToDec().Quo(tc.ps.ToDec()))) + require.True(t, utils.DecApproxEqual(reserveRatio, pc.ToLegacyDec().Quo(tc.ps.ToLegacyDec()))) // check pool price before == pool price after require.True(t, utils.DecApproxEqual(pool.Price(), newPool.Price())) @@ -719,8 +719,8 @@ func TestRangedPool_Deposit(t *testing.T) { transXPrime, transYPrime := newPool.Translation() // alpha = reserveRatio // check transX' == transX * (1+alpha), transY' == transY * (1+alpha) - require.True(t, utils.DecApproxEqual(reserveRatio.Add(sdk.OneDec()), transXPrime.Quo(transX))) - require.True(t, utils.DecApproxEqual(reserveRatio.Add(sdk.OneDec()), transYPrime.Quo(transY))) + require.True(t, utils.DecApproxEqual(reserveRatio.Add(sdkmath.LegacyOneDec()), transXPrime.Quo(transX))) + require.True(t, utils.DecApproxEqual(reserveRatio.Add(sdkmath.LegacyOneDec()), transYPrime.Quo(transY))) }) } } @@ -728,62 +728,62 @@ func TestRangedPool_Deposit(t *testing.T) { func TestRangedPool_Withdraw(t *testing.T) { for _, tc := range []struct { name string - rx, ry sdk.Int - ps sdk.Int - minPrice, maxPrice sdk.Dec - pc sdk.Int // redeeming pool coin amount - x, y sdk.Int // withdrawn x and y coin amount + rx, ry sdkmath.Int + ps sdkmath.Int + minPrice, maxPrice sdkmath.LegacyDec + pc sdkmath.Int // redeeming pool coin amount + x, y sdkmath.Int // withdrawn x and y coin amount }{ { "ideal case", - sdk.NewInt(1_000000000000000000), sdk.NewInt(1_000000000000000000), - sdk.NewInt(1_000000000000), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(1_000000000000000000), + sdkmath.NewInt(1_000000000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), - sdk.NewInt(123), - sdk.NewInt(123000000), sdk.NewInt(123000000), + sdkmath.NewInt(123), + sdkmath.NewInt(123000000), sdkmath.NewInt(123000000), }, { "single x asset pool", - sdk.NewInt(1_000000000000000000), sdk.NewInt(0), - sdk.NewInt(1_000000000000), + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(0), + sdkmath.NewInt(1_000000000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), - sdk.NewInt(123), - sdk.NewInt(123000000), sdk.NewInt(0), + sdkmath.NewInt(123), + sdkmath.NewInt(123000000), sdkmath.NewInt(0), }, { "single y asset pool", - sdk.NewInt(0), sdk.NewInt(1_000000000000000000), - sdk.NewInt(1_000000000000), + sdkmath.NewInt(0), sdkmath.NewInt(1_000000000000000000), + sdkmath.NewInt(1_000000000000), utils.ParseDec("0.5"), utils.ParseDec("2.0"), - sdk.NewInt(123), - sdk.NewInt(0), sdk.NewInt(123000000), + sdkmath.NewInt(123), + sdkmath.NewInt(0), sdkmath.NewInt(123000000), }, } { t.Run(tc.name, func(t *testing.T) { pool := amm.NewRangedPool(tc.rx, tc.ry, tc.ps, tc.minPrice, tc.maxPrice) - x, y := amm.Withdraw(tc.rx, tc.ry, tc.ps, tc.pc, sdk.ZeroDec()) - require.True(sdk.IntEq(t, tc.x, x)) - require.True(sdk.IntEq(t, tc.y, y)) + x, y := amm.Withdraw(tc.rx, tc.ry, tc.ps, tc.pc, sdkmath.LegacyZeroDec()) + require.True(sdkmath.IntEq(t, tc.x, x)) + require.True(sdkmath.IntEq(t, tc.y, y)) newPool := amm.NewRangedPool(tc.rx.Sub(x), tc.ry.Sub(y), tc.ps.Sub(tc.pc), tc.minPrice, tc.maxPrice) - var reserveRatio sdk.Dec + var reserveRatio sdkmath.LegacyDec switch { case tc.rx.IsZero(): - reserveRatio = y.ToDec().Quo(tc.ry.ToDec()) + reserveRatio = y.ToLegacyDec().Quo(tc.ry.ToLegacyDec()) case tc.ry.IsZero(): - reserveRatio = x.ToDec().Quo(tc.rx.ToDec()) + reserveRatio = x.ToLegacyDec().Quo(tc.rx.ToLegacyDec()) default: - reserveRatio = x.ToDec().Quo(tc.rx.ToDec()) - require.True(t, utils.DecApproxEqual(reserveRatio, y.ToDec().Quo(tc.ry.ToDec()))) + reserveRatio = x.ToLegacyDec().Quo(tc.rx.ToLegacyDec()) + require.True(t, utils.DecApproxEqual(reserveRatio, y.ToLegacyDec().Quo(tc.ry.ToLegacyDec()))) } // check x/y == rx/ry if !tc.rx.IsZero() && !tc.ry.IsZero() { - require.True(t, utils.DecApproxEqual(x.ToDec().Quo(y.ToDec()), tc.rx.ToDec().Quo(tc.ry.ToDec()))) + require.True(t, utils.DecApproxEqual(x.ToLegacyDec().Quo(y.ToLegacyDec()), tc.rx.ToLegacyDec().Quo(tc.ry.ToLegacyDec()))) } // check x/rx == y/ry == pc/ps - require.True(t, utils.DecApproxEqual(reserveRatio, tc.pc.ToDec().Quo(tc.ps.ToDec()))) + require.True(t, utils.DecApproxEqual(reserveRatio, tc.pc.ToLegacyDec().Quo(tc.ps.ToLegacyDec()))) // check pool price before == pool price after require.True(t, utils.DecApproxEqual(pool.Price(), newPool.Price())) @@ -792,104 +792,104 @@ func TestRangedPool_Withdraw(t *testing.T) { transXPrime, transYPrime := newPool.Translation() // alpha = reserveRatio // check transX' == transX * (1+alpha), transY' == transY * (1+alpha) - require.True(t, utils.DecApproxEqual(reserveRatio.Add(sdk.OneDec()), transXPrime.Quo(transX))) - require.True(t, utils.DecApproxEqual(reserveRatio.Add(sdk.OneDec()), transYPrime.Quo(transY))) + require.True(t, utils.DecApproxEqual(reserveRatio.Add(sdkmath.LegacyOneDec()), transXPrime.Quo(transX))) + require.True(t, utils.DecApproxEqual(reserveRatio.Add(sdkmath.LegacyOneDec()), transYPrime.Quo(transY))) }) } } func TestRangedPool_BuyAmountOver(t *testing.T) { pool := amm.NewRangedPool( - sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}, + sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}, utils.ParseDec("0.5"), utils.ParseDec("2.0")) for _, tc := range []struct { pool *amm.RangedPool - price sdk.Dec - amt sdk.Int + price sdkmath.LegacyDec + amt sdkmath.Int }{ - {pool, utils.ParseDec("1.1"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.0"), sdk.ZeroInt()}, - {pool, utils.ParseDec("0.9"), sdk.NewInt(379357)}, - {pool, utils.ParseDec("0.8"), sdk.NewInt(853553)}, + {pool, utils.ParseDec("1.1"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.0"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("0.9"), sdkmath.NewInt(379357)}, + {pool, utils.ParseDec("0.8"), sdkmath.NewInt(853553)}, } { t.Run("", func(t *testing.T) { amt := tc.pool.BuyAmountOver(tc.price, true) - require.True(sdk.IntEq(t, tc.amt, amt)) + require.True(sdkmath.IntEq(t, tc.amt, amt)) }) } } func TestRangedPool_SellAmountUnder(t *testing.T) { pool := amm.NewRangedPool( - sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}, + sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}, utils.ParseDec("0.5"), utils.ParseDec("2.0")) for _, tc := range []struct { pool *amm.RangedPool - price sdk.Dec - amt sdk.Int + price sdkmath.LegacyDec + amt sdkmath.Int }{ - {pool, utils.ParseDec("0.9"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.0"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.1"), sdk.NewInt(310383)}, - {pool, utils.ParseDec("1.2"), sdk.NewInt(569035)}, + {pool, utils.ParseDec("0.9"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.0"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.1"), sdkmath.NewInt(310383)}, + {pool, utils.ParseDec("1.2"), sdkmath.NewInt(569035)}, } { t.Run("", func(t *testing.T) { amt := tc.pool.SellAmountUnder(tc.price, true) - require.True(sdk.IntEq(t, tc.amt, amt)) + require.True(sdkmath.IntEq(t, tc.amt, amt)) }) } } func TestRangedPool_BuyAmountTo(t *testing.T) { pool := amm.NewRangedPool( - sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}, + sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}, utils.ParseDec("0.5"), utils.ParseDec("2.0")) for _, tc := range []struct { pool *amm.RangedPool - price sdk.Dec - amt sdk.Int + price sdkmath.LegacyDec + amt sdkmath.Int }{ - {pool, utils.ParseDec("1.1"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.0"), sdk.ZeroInt()}, - {pool, utils.ParseDec("0.8"), sdk.NewInt(450560)}, - {pool, utils.ParseDec("0.7"), sdk.NewInt(796682)}, + {pool, utils.ParseDec("1.1"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.0"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("0.8"), sdkmath.NewInt(450560)}, + {pool, utils.ParseDec("0.7"), sdkmath.NewInt(796682)}, { amm.NewRangedPool( - sdk.NewInt(957322), sdk.NewInt(3351038710333311), sdk.Int{}, + sdkmath.NewInt(957322), sdkmath.NewInt(3351038710333311), sdkmath.Int{}, utils.ParseDec("0.9"), utils.ParseDec("1.1"), ), utils.ParseDec("0.899580000000000000"), - sdk.NewInt(1064187), + sdkmath.NewInt(1064187), }, } { t.Run("", func(t *testing.T) { amt := tc.pool.BuyAmountTo(tc.price) - require.True(sdk.IntEq(t, tc.amt, amt)) + require.True(sdkmath.IntEq(t, tc.amt, amt)) }) } } func TestRangedPool_SellAmountTo(t *testing.T) { pool := amm.NewRangedPool( - sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}, + sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}, utils.ParseDec("0.5"), utils.ParseDec("2.0")) for _, tc := range []struct { pool *amm.RangedPool - price sdk.Dec - amt sdk.Int + price sdkmath.LegacyDec + amt sdkmath.Int }{ - {pool, utils.ParseDec("0.9"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.0"), sdk.ZeroInt()}, - {pool, utils.ParseDec("1.4"), sdk.NewInt(528676)}, - {pool, utils.ParseDec("1.5"), sdk.NewInt(626519)}, + {pool, utils.ParseDec("0.9"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.0"), sdkmath.ZeroInt()}, + {pool, utils.ParseDec("1.4"), sdkmath.NewInt(528676)}, + {pool, utils.ParseDec("1.5"), sdkmath.NewInt(626519)}, } { t.Run("", func(t *testing.T) { amt := tc.pool.SellAmountTo(tc.price) - require.True(sdk.IntEq(t, tc.amt, amt)) + require.True(sdkmath.IntEq(t, tc.amt, amt)) }) } } @@ -900,17 +900,17 @@ func TestRangedPool_exhaust(t *testing.T) { }{ { amm.NewRangedPool( - sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.Int{}, + sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.Int{}, utils.ParseDec("0.5"), utils.ParseDec("2.0")), }, { amm.NewRangedPool( - sdk.NewInt(1_000000000000000000), sdk.NewInt(9_000000000000000000), sdk.Int{}, + sdkmath.NewInt(1_000000000000000000), sdkmath.NewInt(9_000000000000000000), sdkmath.Int{}, utils.ParseDec("0.1001"), utils.ParseDec("10.05")), }, { amm.NewRangedPool( - sdk.NewInt(123456789), sdk.NewInt(987654321), sdk.Int{}, + sdkmath.NewInt(123456789), sdkmath.NewInt(987654321), sdkmath.Int{}, utils.ParseDec("0.05"), utils.ParseDec("20.1")), }, } { @@ -921,14 +921,14 @@ func TestRangedPool_exhaust(t *testing.T) { orders := amm.PoolSellOrders(tc.pool, amm.DefaultOrderer, minPrice, maxPrice, 4) amt := amm.TotalAmount(orders) require.True(t, amt.LTE(ry)) - require.True(t, amt.GTE(ry.ToDec().Mul(utils.ParseDec("0.99")).TruncateInt())) + require.True(t, amt.GTE(ry.ToLegacyDec().Mul(utils.ParseDec("0.99")).TruncateInt())) orders = amm.PoolBuyOrders(tc.pool, amm.DefaultOrderer, minPrice, maxPrice, 4) - x := sdk.ZeroInt() + x := sdkmath.ZeroInt() for _, order := range orders { x = x.Add(order.GetPrice().MulInt(order.GetAmount()).TruncateInt()) } require.True(t, x.LTE(rx)) - require.True(t, x.GTE(rx.ToDec().Mul(utils.ParseDec("0.99")).TruncateInt())) + require.True(t, x.GTE(rx.ToLegacyDec().Mul(utils.ParseDec("0.99")).TruncateInt())) }) } } @@ -937,8 +937,8 @@ func TestRangedPool_SwapPriceOutOfRange(t *testing.T) { r := rand.New(rand.NewSource(0)) for i := 0; i < 1000; i++ { - rx := utils.RandomInt(r, sdk.NewInt(1_000000), sdk.NewInt(1000_00000)) - ry := utils.RandomInt(r, sdk.NewInt(1_000000), sdk.NewInt(1000_00000)) + rx := utils.RandomInt(r, sdkmath.NewInt(1_000000), sdkmath.NewInt(1000_00000)) + ry := utils.RandomInt(r, sdkmath.NewInt(1_000000), sdkmath.NewInt(1000_00000)) minPrice := utils.RandomDec(r, utils.ParseDec("0.001"), utils.ParseDec("1")) maxPrice := utils.RandomDec(r, minPrice.Mul(utils.ParseDec("1.01")), utils.ParseDec("1000")) initialPrice := utils.RandomDec(r, minPrice, maxPrice) @@ -948,12 +948,12 @@ func TestRangedPool_SwapPriceOutOfRange(t *testing.T) { rx, ry = pool.Balances() // Price lower than min price - p := utils.RandomDec(r, sdk.NewDecWithPrec(1, 5), minPrice.Mul(utils.ParseDec("0.99"))) + p := utils.RandomDec(r, sdkmath.LegacyNewDecWithPrec(1, 5), minPrice.Mul(utils.ParseDec("0.99"))) amt := pool.BuyAmountTo(p) nextRx := rx.Sub(p.MulInt(amt).Ceil().TruncateInt()) nextRy := ry.Add(amt) - require.True(t, nextRx.LTE(sdk.OneInt())) - nextPool := amm.NewRangedPool(nextRx, nextRy, sdk.Int{}, minPrice, maxPrice) + require.True(t, nextRx.LTE(sdkmath.OneInt())) + nextPool := amm.NewRangedPool(nextRx, nextRy, sdkmath.Int{}, minPrice, maxPrice) require.True(t, utils.DecApproxEqual(minPrice, nextPool.Price())) // Price higher than min price @@ -961,49 +961,49 @@ func TestRangedPool_SwapPriceOutOfRange(t *testing.T) { amt = pool.SellAmountTo(p) nextRx = rx.Add(p.MulInt(amt).TruncateInt()) nextRy = ry.Sub(amt) - require.True(t, nextRy.LTE(sdk.OneInt())) - nextPool = amm.NewRangedPool(nextRx, nextRy, sdk.Int{}, minPrice, maxPrice) + require.True(t, nextRy.LTE(sdkmath.OneInt())) + nextPool = amm.NewRangedPool(nextRx, nextRy, sdkmath.Int{}, minPrice, maxPrice) require.True(t, utils.DecApproxEqual(maxPrice, nextPool.Price())) } } func TestInitialPoolCoinSupply(t *testing.T) { for _, tc := range []struct { - x, y sdk.Int - ps sdk.Int + x, y sdkmath.Int + ps sdkmath.Int }{ - {sdk.NewInt(1000000), sdk.NewInt(1000000), sdk.NewInt(10000000)}, - {sdk.NewInt(1000000), sdk.NewInt(10000000), sdk.NewInt(100000000)}, - {sdk.NewInt(1000000), sdk.NewInt(100000000), sdk.NewInt(100000000)}, - {sdk.NewInt(10000000), sdk.NewInt(100000000), sdk.NewInt(1000000000)}, - {sdk.NewInt(999999), sdk.NewInt(9999999), sdk.NewInt(10000000)}, + {sdkmath.NewInt(1000000), sdkmath.NewInt(1000000), sdkmath.NewInt(10000000)}, + {sdkmath.NewInt(1000000), sdkmath.NewInt(10000000), sdkmath.NewInt(100000000)}, + {sdkmath.NewInt(1000000), sdkmath.NewInt(100000000), sdkmath.NewInt(100000000)}, + {sdkmath.NewInt(10000000), sdkmath.NewInt(100000000), sdkmath.NewInt(1000000000)}, + {sdkmath.NewInt(999999), sdkmath.NewInt(9999999), sdkmath.NewInt(10000000)}, } { t.Run("", func(t *testing.T) { - require.True(sdk.IntEq(t, tc.ps, amm.InitialPoolCoinSupply(tc.x, tc.y))) + require.True(sdkmath.IntEq(t, tc.ps, amm.InitialPoolCoinSupply(tc.x, tc.y))) }) } } func TestBasicPool_BuyAmountOverOverflow(t *testing.T) { - n, _ := sdk.NewIntFromString("10000000000000000000000000000000000000000000") - pool := amm.NewBasicPool(n, sdk.NewInt(1000), sdk.Int{}) + n, _ := sdkmath.NewIntFromString("10000000000000000000000000000000000000000000") + pool := amm.NewBasicPool(n, sdkmath.NewInt(1000), sdkmath.Int{}) amt := pool.BuyAmountOver(defTickPrec.LowestTick(), true) - require.True(sdk.IntEq(t, amm.MaxCoinAmount, amt)) + require.True(sdkmath.IntEq(t, amm.MaxCoinAmount, amt)) } func TestBasicPoolOrders(t *testing.T) { - pool := amm.NewBasicPool(sdk.NewInt(862431695563), sdk.NewInt(37852851767), sdk.Int{}) + pool := amm.NewBasicPool(sdkmath.NewInt(862431695563), sdkmath.NewInt(37852851767), sdkmath.Int{}) poolPrice := pool.Price() - lowestPrice := poolPrice.Mul(sdk.NewDecWithPrec(9, 1)) - highestPrice := poolPrice.Mul(sdk.NewDecWithPrec(11, 1)) + lowestPrice := poolPrice.Mul(sdkmath.LegacyNewDecWithPrec(9, 1)) + highestPrice := poolPrice.Mul(sdkmath.LegacyNewDecWithPrec(11, 1)) require.Len(t, amm.PoolOrders(pool, amm.DefaultOrderer, lowestPrice, highestPrice, 4), 375) } func BenchmarkBasicPoolOrders(b *testing.B) { - pool := amm.NewBasicPool(sdk.NewInt(862431695563), sdk.NewInt(37852851767), sdk.Int{}) + pool := amm.NewBasicPool(sdkmath.NewInt(862431695563), sdkmath.NewInt(37852851767), sdkmath.Int{}) poolPrice := pool.Price() - lowestPrice := poolPrice.Mul(sdk.NewDecWithPrec(9, 1)) - highestPrice := poolPrice.Mul(sdk.NewDecWithPrec(11, 1)) + lowestPrice := poolPrice.Mul(sdkmath.LegacyNewDecWithPrec(9, 1)) + highestPrice := poolPrice.Mul(sdkmath.LegacyNewDecWithPrec(11, 1)) b.ResetTimer() for i := 0; i < b.N; i++ { amm.PoolOrders(pool, amm.DefaultOrderer, lowestPrice, highestPrice, 4) diff --git a/x/liquidity/amm/tick.go b/x/liquidity/amm/tick.go index db5d53d0a..faf6a0d70 100644 --- a/x/liquidity/amm/tick.go +++ b/x/liquidity/amm/tick.go @@ -5,59 +5,59 @@ import ( "math/big" "math/rand" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" ) // TickPrecision represents a tick precision. type TickPrecision int -func (prec TickPrecision) PriceToDownTick(price sdk.Dec) sdk.Dec { +func (prec TickPrecision) PriceToDownTick(price sdkmath.LegacyDec) sdkmath.LegacyDec { return PriceToDownTick(price, int(prec)) } -func (prec TickPrecision) PriceToUpTick(price sdk.Dec) sdk.Dec { +func (prec TickPrecision) PriceToUpTick(price sdkmath.LegacyDec) sdkmath.LegacyDec { return PriceToUpTick(price, int(prec)) } -func (prec TickPrecision) UpTick(price sdk.Dec) sdk.Dec { +func (prec TickPrecision) UpTick(price sdkmath.LegacyDec) sdkmath.LegacyDec { return UpTick(price, int(prec)) } -func (prec TickPrecision) DownTick(price sdk.Dec) sdk.Dec { +func (prec TickPrecision) DownTick(price sdkmath.LegacyDec) sdkmath.LegacyDec { return DownTick(price, int(prec)) } -func (prec TickPrecision) HighestTick() sdk.Dec { +func (prec TickPrecision) HighestTick() sdkmath.LegacyDec { return HighestTick(int(prec)) } -func (prec TickPrecision) LowestTick() sdk.Dec { +func (prec TickPrecision) LowestTick() sdkmath.LegacyDec { return LowestTick(int(prec)) } -func (prec TickPrecision) TickToIndex(tick sdk.Dec) int { +func (prec TickPrecision) TickToIndex(tick sdkmath.LegacyDec) int { return TickToIndex(tick, int(prec)) } -func (prec TickPrecision) TickFromIndex(i int) sdk.Dec { +func (prec TickPrecision) TickFromIndex(i int) sdkmath.LegacyDec { return TickFromIndex(i, int(prec)) } -func (prec TickPrecision) RoundPrice(price sdk.Dec) sdk.Dec { +func (prec TickPrecision) RoundPrice(price sdkmath.LegacyDec) sdkmath.LegacyDec { return RoundPrice(price, int(prec)) } -func (prec TickPrecision) TickGap(price sdk.Dec) sdk.Dec { +func (prec TickPrecision) TickGap(price sdkmath.LegacyDec) sdkmath.LegacyDec { return TickGap(price, int(prec)) } -func (prec TickPrecision) RandomTick(r *rand.Rand, minPrice, maxPrice sdk.Dec) sdk.Dec { +func (prec TickPrecision) RandomTick(r *rand.Rand, minPrice, maxPrice sdkmath.LegacyDec) sdkmath.LegacyDec { return RandomTick(r, minPrice, maxPrice, int(prec)) } // char returns the characteristic(integral part) of // log10(x * pow(10, sdk.Precision)). -func char(x sdk.Dec) int { +func char(x sdkmath.LegacyDec) int { if x.IsZero() { panic("cannot calculate log10 for 0") } @@ -65,14 +65,14 @@ func char(x sdk.Dec) int { } // pow10 returns pow(10, n - sdk.Precision). -func pow10(n int) sdk.Dec { +func pow10(n int) sdkmath.LegacyDec { x := big.NewInt(10) x.Exp(x, big.NewInt(int64(n)), nil) - return sdk.NewDecFromBigIntWithPrec(x, sdk.Precision) + return sdkmath.LegacyNewDecFromBigIntWithPrec(x, sdkmath.LegacyPrecision) } // isPow10 returns whether x is a power of 10 or not. -func isPow10(x sdk.Dec) bool { +func isPow10(x sdkmath.LegacyDec) bool { b := x.BigInt() if b.Sign() <= 0 { return false @@ -93,7 +93,7 @@ func isPow10(x sdk.Dec) bool { } // PriceToDownTick returns the highest price tick under(or equal to) the price. -func PriceToDownTick(price sdk.Dec, prec int) sdk.Dec { +func PriceToDownTick(price sdkmath.LegacyDec, prec int) sdkmath.LegacyDec { b := price.BigInt() l := char(price) d := int64(l - prec) @@ -102,12 +102,12 @@ func PriceToDownTick(price sdk.Dec, prec int) sdk.Dec { p.Exp(p, big.NewInt(d), nil) b.Quo(b, p).Mul(b, p) } - return sdk.NewDecFromBigIntWithPrec(b, sdk.Precision) + return sdkmath.LegacyNewDecFromBigIntWithPrec(b, sdkmath.LegacyPrecision) } // PriceToUpTick returns the lowest price tick greater or equal than // the price. -func PriceToUpTick(price sdk.Dec, prec int) sdk.Dec { +func PriceToUpTick(price sdkmath.LegacyDec, prec int) sdkmath.LegacyDec { tick := PriceToDownTick(price, prec) if !tick.Equal(price) { return UpTick(tick, prec) @@ -116,7 +116,7 @@ func PriceToUpTick(price sdk.Dec, prec int) sdk.Dec { } // UpTick returns the next lowest price tick above the price. -func UpTick(price sdk.Dec, prec int) sdk.Dec { +func UpTick(price sdkmath.LegacyDec, prec int) sdkmath.LegacyDec { tick := PriceToDownTick(price, prec) if tick.Equal(price) { l := char(price) @@ -128,11 +128,11 @@ func UpTick(price sdk.Dec, prec int) sdk.Dec { // DownTick returns the next highest price tick under the price. // DownTick doesn't check if the price is the lowest price tick. -func DownTick(price sdk.Dec, prec int) sdk.Dec { +func DownTick(price sdkmath.LegacyDec, prec int) sdkmath.LegacyDec { tick := PriceToDownTick(price, prec) if tick.Equal(price) { l := char(price) - var d sdk.Dec + var d sdkmath.LegacyDec if isPow10(price) { d = pow10(l - prec - 1) } else { @@ -144,21 +144,21 @@ func DownTick(price sdk.Dec, prec int) sdk.Dec { } // HighestTick returns the highest possible price tick. -func HighestTick(prec int) sdk.Dec { +func HighestTick(prec int) sdkmath.LegacyDec { i := big.NewInt(2) // Maximum 315 bits possible, but take slightly less value for safety. i.Exp(i, big.NewInt(300), nil).Sub(i, big.NewInt(1)) - return PriceToDownTick(sdk.NewDecFromBigIntWithPrec(i, sdk.Precision), prec) + return PriceToDownTick(sdkmath.LegacyNewDecFromBigIntWithPrec(i, sdkmath.LegacyPrecision), prec) } // LowestTick returns the lowest possible price tick. -func LowestTick(prec int) sdk.Dec { - return sdk.NewDecWithPrec(1, int64(sdk.Precision-prec)) +func LowestTick(prec int) sdkmath.LegacyDec { + return sdkmath.LegacyNewDecWithPrec(1, int64(sdkmath.LegacyPrecision-prec)) } // TickToIndex returns a tick index for given price. // Tick index 0 means the lowest possible price fit in ticks. -func TickToIndex(price sdk.Dec, prec int) int { +func TickToIndex(price sdkmath.LegacyDec, prec int) int { b := price.BigInt() l := len(b.Text(10)) - 1 d := int64(l - prec) @@ -174,7 +174,7 @@ func TickToIndex(price sdk.Dec, prec int) int { // TickFromIndex returns a price for given tick index. // See TickToIndex for more details about tick indices. -func TickFromIndex(i, prec int) sdk.Dec { +func TickFromIndex(i, prec int) sdkmath.LegacyDec { p := int(math.Pow10(prec)) l := i/(9*p) + prec t := big.NewInt(int64(p + i%(p*9))) @@ -183,7 +183,7 @@ func TickFromIndex(i, prec int) sdk.Dec { m.Exp(m, big.NewInt(int64(l-prec)), nil) t.Mul(t, m) } - return sdk.NewDecFromBigIntWithPrec(t, sdk.Precision) + return sdkmath.LegacyNewDecFromBigIntWithPrec(t, sdkmath.LegacyPrecision) } // RoundTickIndex returns rounded tick index using banker's rounding. @@ -192,7 +192,7 @@ func RoundTickIndex(i int) int { } // RoundPrice returns rounded price using banker's rounding. -func RoundPrice(price sdk.Dec, prec int) sdk.Dec { +func RoundPrice(price sdkmath.LegacyDec, prec int) sdkmath.LegacyDec { tick := PriceToDownTick(price, prec) if price.Equal(tick) { return price @@ -201,7 +201,7 @@ func RoundPrice(price sdk.Dec, prec int) sdk.Dec { } // TickGap returns tick gap at given price. -func TickGap(price sdk.Dec, prec int) sdk.Dec { +func TickGap(price sdkmath.LegacyDec, prec int) sdkmath.LegacyDec { tick := PriceToDownTick(price, prec) l := char(tick) return pow10(l - prec) @@ -210,7 +210,7 @@ func TickGap(price sdk.Dec, prec int) sdk.Dec { // RandomTick returns a random tick within range [minPrice, maxPrice]. // If prices are not on ticks, then prices are adjusted to the nearest // ticks. -func RandomTick(r *rand.Rand, minPrice, maxPrice sdk.Dec, prec int) sdk.Dec { +func RandomTick(r *rand.Rand, minPrice, maxPrice sdkmath.LegacyDec, prec int) sdkmath.LegacyDec { minPrice = PriceToUpTick(minPrice, prec) maxPrice = PriceToDownTick(maxPrice, prec) minPriceIdx := TickToIndex(minPrice, prec) diff --git a/x/liquidity/amm/tick_internal_test.go b/x/liquidity/amm/tick_internal_test.go index 349b4814a..4c5bbdd17 100644 --- a/x/liquidity/amm/tick_internal_test.go +++ b/x/liquidity/amm/tick_internal_test.go @@ -5,32 +5,32 @@ import ( "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" ) func Test_char(t *testing.T) { require.Panics(t, func() { - char(sdk.ZeroDec()) + char(sdkmath.LegacyZeroDec()) }) for _, tc := range []struct { - x sdk.Dec + x sdkmath.LegacyDec expected int }{ - {sdk.MustNewDecFromStr("999.99999999999999999"), 20}, - {sdk.MustNewDecFromStr("100"), 20}, - {sdk.MustNewDecFromStr("99.999999999999999999"), 19}, - {sdk.MustNewDecFromStr("10"), 19}, - {sdk.MustNewDecFromStr("9.999999999999999999"), 18}, - {sdk.MustNewDecFromStr("1"), 18}, - {sdk.MustNewDecFromStr("0.999999999999999999"), 17}, - {sdk.MustNewDecFromStr("0.1"), 17}, - {sdk.MustNewDecFromStr("0.099999999999999999"), 16}, - {sdk.MustNewDecFromStr("0.01"), 16}, - {sdk.MustNewDecFromStr("0.000000000000000009"), 0}, - {sdk.MustNewDecFromStr("0.000000000000000001"), 0}, + {sdkmath.LegacyMustNewDecFromStr("999.99999999999999999"), 20}, + {sdkmath.LegacyMustNewDecFromStr("100"), 20}, + {sdkmath.LegacyMustNewDecFromStr("99.999999999999999999"), 19}, + {sdkmath.LegacyMustNewDecFromStr("10"), 19}, + {sdkmath.LegacyMustNewDecFromStr("9.999999999999999999"), 18}, + {sdkmath.LegacyMustNewDecFromStr("1"), 18}, + {sdkmath.LegacyMustNewDecFromStr("0.999999999999999999"), 17}, + {sdkmath.LegacyMustNewDecFromStr("0.1"), 17}, + {sdkmath.LegacyMustNewDecFromStr("0.099999999999999999"), 16}, + {sdkmath.LegacyMustNewDecFromStr("0.01"), 16}, + {sdkmath.LegacyMustNewDecFromStr("0.000000000000000009"), 0}, + {sdkmath.LegacyMustNewDecFromStr("0.000000000000000001"), 0}, } { t.Run("", func(t *testing.T) { require.Equal(t, tc.expected, char(tc.x)) @@ -41,23 +41,23 @@ func Test_char(t *testing.T) { func Test_pow10(t *testing.T) { for _, tc := range []struct { power int - expected sdk.Dec + expected sdkmath.LegacyDec }{ - {18, sdk.NewDec(1)}, - {19, sdk.NewDec(10)}, - {20, sdk.NewDec(100)}, - {17, sdk.NewDecWithPrec(1, 1)}, - {16, sdk.NewDecWithPrec(1, 2)}, + {18, sdkmath.LegacyNewDec(1)}, + {19, sdkmath.LegacyNewDec(10)}, + {20, sdkmath.LegacyNewDec(100)}, + {17, sdkmath.LegacyNewDecWithPrec(1, 1)}, + {16, sdkmath.LegacyNewDecWithPrec(1, 2)}, } { t.Run("", func(t *testing.T) { - require.True(sdk.DecEq(t, tc.expected, pow10(tc.power))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, pow10(tc.power))) }) } } func Test_isPow10(t *testing.T) { for _, tc := range []struct { - x sdk.Dec + x sdkmath.LegacyDec expected bool }{ {utils.ParseDec("100"), true}, diff --git a/x/liquidity/amm/tick_test.go b/x/liquidity/amm/tick_test.go index 7c77b218a..cecc8b47b 100644 --- a/x/liquidity/amm/tick_test.go +++ b/x/liquidity/amm/tick_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidity/amm" @@ -16,8 +16,8 @@ const defTickPrec = amm.TickPrecision(3) func TestPriceToTick(t *testing.T) { for _, tc := range []struct { - price sdk.Dec - expected sdk.Dec + price sdkmath.LegacyDec + expected sdkmath.LegacyDec }{ {utils.ParseDec("0.000000000000099999"), utils.ParseDec("0.00000000000009999")}, {utils.ParseDec("1.999999999999999999"), utils.ParseDec("1.999")}, @@ -27,7 +27,7 @@ func TestPriceToTick(t *testing.T) { {utils.ParseDec("10019"), utils.ParseDec("10010")}, {utils.ParseDec("1000100005"), utils.ParseDec("1000000000")}, } { - require.True(sdk.DecEq(t, tc.expected, amm.PriceToDownTick(tc.price, 3))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, amm.PriceToDownTick(tc.price, 3))) } } @@ -35,21 +35,21 @@ func TestTick(t *testing.T) { for _, tc := range []struct { i int prec int - expected sdk.Dec + expected sdkmath.LegacyDec }{ - {0, 3, sdk.NewDecWithPrec(1, int64(sdk.Precision-defTickPrec))}, + {0, 3, sdkmath.LegacyNewDecWithPrec(1, int64(sdkmath.LegacyPrecision-defTickPrec))}, {1, 3, utils.ParseDec("0.000000000000001001")}, {8999, 3, utils.ParseDec("0.000000000000009999")}, {9000, 3, utils.ParseDec("0.000000000000010000")}, {9001, 3, utils.ParseDec("0.000000000000010010")}, {17999, 3, utils.ParseDec("0.000000000000099990")}, {18000, 3, utils.ParseDec("0.000000000000100000")}, - {135000, 3, sdk.NewDec(1)}, + {135000, 3, sdkmath.LegacyNewDec(1)}, {135001, 3, utils.ParseDec("1.001")}, } { t.Run("", func(t *testing.T) { res := amm.TickFromIndex(tc.i, tc.prec) - require.True(sdk.DecEq(t, tc.expected, res)) + require.True(sdkmath.LegacyDecEq(t, tc.expected, res)) require.Equal(t, tc.i, amm.TickToIndex(res, tc.prec)) }) } @@ -57,9 +57,9 @@ func TestTick(t *testing.T) { func TestUpTick(t *testing.T) { for _, tc := range []struct { - price sdk.Dec + price sdkmath.LegacyDec prec int - expected sdk.Dec + expected sdkmath.LegacyDec }{ {utils.ParseDec("1000000000000000000"), 3, utils.ParseDec("1001000000000000000")}, {utils.ParseDec("1000"), 3, utils.ParseDec("1001")}, @@ -75,16 +75,16 @@ func TestUpTick(t *testing.T) { {utils.ParseDec("1000.9"), 3, utils.ParseDec("1001")}, } { t.Run("", func(t *testing.T) { - require.True(sdk.DecEq(t, tc.expected, amm.UpTick(tc.price, tc.prec))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, amm.UpTick(tc.price, tc.prec))) }) } } func TestDownTick(t *testing.T) { for _, tc := range []struct { - price sdk.Dec + price sdkmath.LegacyDec prec int - expected sdk.Dec + expected sdkmath.LegacyDec }{ {utils.ParseDec("1000000000000000000"), 3, utils.ParseDec("999900000000000000")}, {utils.ParseDec("10010"), 3, utils.ParseDec("10000")}, @@ -100,7 +100,7 @@ func TestDownTick(t *testing.T) { {utils.ParseDec("1000.9"), 3, utils.ParseDec("1000")}, } { t.Run("", func(t *testing.T) { - require.True(sdk.DecEq(t, tc.expected, amm.DownTick(tc.price, tc.prec))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, amm.DownTick(tc.price, tc.prec))) }) } } @@ -118,7 +118,7 @@ func TestHighestTick(t *testing.T) { i, ok := new(big.Int).SetString(tc.expected, 10) require.True(t, ok) tick := amm.HighestTick(tc.prec) - require.True(sdk.DecEq(t, sdk.NewDecFromBigInt(i), tick)) + require.True(sdkmath.LegacyDecEq(t, sdkmath.LegacyNewDecFromBigInt(i), tick)) }) } } @@ -126,22 +126,22 @@ func TestHighestTick(t *testing.T) { func TestLowestTick(t *testing.T) { for _, tc := range []struct { prec int - expected sdk.Dec + expected sdkmath.LegacyDec }{ - {0, sdk.NewDecWithPrec(1, 18)}, - {3, sdk.NewDecWithPrec(1, 15)}, + {0, sdkmath.LegacyNewDecWithPrec(1, 18)}, + {3, sdkmath.LegacyNewDecWithPrec(1, 15)}, } { t.Run("", func(t *testing.T) { - require.True(sdk.DecEq(t, tc.expected, amm.LowestTick(tc.prec))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, amm.LowestTick(tc.prec))) }) } } func TestPriceToUpTick(t *testing.T) { for _, tc := range []struct { - price sdk.Dec + price sdkmath.LegacyDec prec int - expected sdk.Dec + expected sdkmath.LegacyDec }{ {utils.ParseDec("1.0015"), 3, utils.ParseDec("1.002")}, {utils.ParseDec("100"), 3, utils.ParseDec("100")}, @@ -149,7 +149,7 @@ func TestPriceToUpTick(t *testing.T) { {utils.ParseDec("100.099"), 3, utils.ParseDec("100.1")}, } { t.Run("", func(t *testing.T) { - require.True(sdk.DecEq(t, tc.expected, amm.PriceToUpTick(tc.price, tc.prec))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, amm.PriceToUpTick(tc.price, tc.prec))) }) } } @@ -179,9 +179,9 @@ func TestRoundTickIndex(t *testing.T) { func TestRoundPrice(t *testing.T) { for _, tc := range []struct { - price sdk.Dec + price sdkmath.LegacyDec prec int - expected sdk.Dec + expected sdkmath.LegacyDec }{ {utils.ParseDec("0.000000000000001000"), 3, utils.ParseDec("0.000000000000001000")}, {utils.ParseDec("0.000000000000010000"), 3, utils.ParseDec("0.000000000000010000")}, @@ -196,16 +196,16 @@ func TestRoundPrice(t *testing.T) { {utils.ParseDec("1.0035"), 3, utils.ParseDec("1.004")}, } { t.Run("", func(t *testing.T) { - require.True(sdk.DecEq(t, tc.expected, amm.RoundPrice(tc.price, tc.prec))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, amm.RoundPrice(tc.price, tc.prec))) }) } } func TestTickGap(t *testing.T) { for _, tc := range []struct { - price sdk.Dec + price sdkmath.LegacyDec tickPrec int - expected sdk.Dec + expected sdkmath.LegacyDec }{ {utils.ParseDec("1.0"), 3, utils.ParseDec("0.001")}, {utils.ParseDec("1234"), 3, utils.ParseDec("1")}, @@ -215,7 +215,7 @@ func TestTickGap(t *testing.T) { {utils.ParseDec("0.00000000009"), 3, utils.ParseDec("0.00000000000001")}, } { t.Run("", func(t *testing.T) { - require.True(sdk.DecEq(t, tc.expected, amm.TickGap(tc.price, tc.tickPrec))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, amm.TickGap(tc.price, tc.tickPrec))) }) } } diff --git a/x/liquidity/amm/util.go b/x/liquidity/amm/util.go index a01221e1a..958308903 100644 --- a/x/liquidity/amm/util.go +++ b/x/liquidity/amm/util.go @@ -4,20 +4,20 @@ import ( "fmt" "sort" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" ) var ( - zeroInt = sdk.ZeroInt() - oneDec = sdk.OneDec() - fourDec = sdk.NewDec(4) + zeroInt = sdkmath.ZeroInt() + oneDec = sdkmath.LegacyOneDec() + fourDec = sdkmath.LegacyNewDec(4) ) // OfferCoinAmount returns the minimum offer coin amount for // given order direction, price and order amount. -func OfferCoinAmount(dir OrderDirection, price sdk.Dec, amt sdk.Int) sdk.Int { +func OfferCoinAmount(dir OrderDirection, price sdkmath.LegacyDec, amt sdkmath.Int) sdkmath.Int { switch dir { case Buy: return price.MulInt(amt).Ceil().TruncateInt() @@ -30,13 +30,13 @@ func OfferCoinAmount(dir OrderDirection, price sdk.Dec, amt sdk.Int) sdk.Int { // MatchableAmount returns matchable amount of an order considering // remaining offer coin and price. -func MatchableAmount(order Order, price sdk.Dec) (matchableAmt sdk.Int) { +func MatchableAmount(order Order, price sdkmath.LegacyDec) (matchableAmt sdkmath.Int) { switch order.GetDirection() { case Buy: remainingOfferCoinAmt := order.GetOfferCoinAmount().Sub(order.GetPaidOfferCoinAmount()) - matchableAmt = sdk.MinInt( + matchableAmt = sdkmath.MinInt( order.GetOpenAmount(), - remainingOfferCoinAmt.ToDec().QuoTruncate(price).TruncateInt(), + sdkmath.LegacyNewDec(remainingOfferCoinAmt.Int64()).QuoTruncate(price).TruncateInt(), ) case Sell: matchableAmt = order.GetOpenAmount() @@ -48,8 +48,8 @@ func MatchableAmount(order Order, price sdk.Dec) (matchableAmt sdk.Int) { } // TotalAmount returns total amount of orders. -func TotalAmount(orders []Order) sdk.Int { - amt := sdk.ZeroInt() +func TotalAmount(orders []Order) sdkmath.Int { + amt := sdkmath.ZeroInt() for _, order := range orders { amt = amt.Add(order.GetAmount()) } @@ -57,8 +57,8 @@ func TotalAmount(orders []Order) sdk.Int { } // TotalMatchableAmount returns total matchable amount of orders. -func TotalMatchableAmount(orders []Order, price sdk.Dec) (amt sdk.Int) { - amt = sdk.ZeroInt() +func TotalMatchableAmount(orders []Order, price sdkmath.LegacyDec) (amt sdkmath.Int) { + amt = sdkmath.ZeroInt() for _, order := range orders { amt = amt.Add(MatchableAmount(order, price)) } @@ -127,7 +127,7 @@ func findFirstTrueCondition(start, end int, f func(i int) bool) (i int, found bo } // inv returns the inverse of x. -func inv(x sdk.Dec) (r sdk.Dec) { +func inv(x sdkmath.LegacyDec) (r sdkmath.LegacyDec) { r = oneDec.Quo(x) return } @@ -145,9 +145,9 @@ var ( b4 = utils.ParseDec("0.005") ) -func poolOrderPriceGapRatio(poolPrice, currentPrice sdk.Dec) (r sdk.Dec) { +func poolOrderPriceGapRatio(poolPrice, currentPrice sdkmath.LegacyDec) (r sdkmath.LegacyDec) { if poolPrice.IsZero() { - poolPrice = sdk.NewDecWithPrec(1, sdk.Precision) // lowest possible sdk.Dec + poolPrice = sdkmath.LegacyNewDecWithPrec(1, sdkmath.LegacyPrecision) // lowest possible sdkmath.LegacyDec } x := currentPrice.Sub(poolPrice).Abs().Quo(poolPrice) switch { diff --git a/x/liquidity/amm/util_internal_test.go b/x/liquidity/amm/util_internal_test.go index de93523de..1cf5efe1f 100644 --- a/x/liquidity/amm/util_internal_test.go +++ b/x/liquidity/amm/util_internal_test.go @@ -3,7 +3,7 @@ package amm import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" utils "github.com/comdex-official/comdex/types" @@ -33,9 +33,9 @@ func Test_findFirstTrueCondition(t *testing.T) { func Test_poolOrderPriceGapRatio(t *testing.T) { for _, tc := range []struct { - poolPrice sdk.Dec - currentPrice sdk.Dec - expected sdk.Dec + poolPrice sdkmath.LegacyDec + currentPrice sdkmath.LegacyDec + expected sdkmath.LegacyDec }{ {utils.ParseDec("1"), utils.ParseDec("1"), utils.ParseDec("0.00003")}, {utils.ParseDec("1"), utils.ParseDec("1.005"), utils.ParseDec("0.000065")}, @@ -51,7 +51,7 @@ func Test_poolOrderPriceGapRatio(t *testing.T) { {utils.ParseDec("1"), utils.ParseDec("0.1"), utils.ParseDec("0.005")}, } { t.Run("", func(t *testing.T) { - require.True(sdk.DecEq(t, tc.expected, poolOrderPriceGapRatio(tc.poolPrice, tc.currentPrice))) + require.True(sdkmath.LegacyDecEq(t, tc.expected, poolOrderPriceGapRatio(tc.poolPrice, tc.currentPrice))) }) } } diff --git a/x/liquidity/amm/util_test.go b/x/liquidity/amm/util_test.go index 8afa7c566..7db293d76 100644 --- a/x/liquidity/amm/util_test.go +++ b/x/liquidity/amm/util_test.go @@ -3,7 +3,7 @@ package amm_test import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" utils "github.com/comdex-official/comdex/types" @@ -11,21 +11,21 @@ import ( ) func TestMatchableAmount(t *testing.T) { - order1 := newOrder(amm.Buy, utils.ParseDec("1.0"), sdk.NewInt(10000)) + order1 := newOrder(amm.Buy, utils.ParseDec("1.0"), sdkmath.NewInt(10000)) for _, tc := range []struct { order amm.Order - price sdk.Dec - expected sdk.Int + price sdkmath.LegacyDec + expected sdkmath.Int }{ - {order1, utils.ParseDec("1"), sdk.NewInt(10000)}, - {order1, utils.ParseDec("0.01"), sdk.NewInt(10000)}, - {order1, utils.ParseDec("100"), sdk.NewInt(100)}, - {order1, utils.ParseDec("100.1"), sdk.NewInt(99)}, - {order1, utils.ParseDec("9999"), sdk.NewInt(1)}, - {order1, utils.ParseDec("10001"), sdk.NewInt(0)}, + {order1, utils.ParseDec("1"), sdkmath.NewInt(10000)}, + {order1, utils.ParseDec("0.01"), sdkmath.NewInt(10000)}, + {order1, utils.ParseDec("100"), sdkmath.NewInt(100)}, + {order1, utils.ParseDec("100.1"), sdkmath.NewInt(99)}, + {order1, utils.ParseDec("9999"), sdkmath.NewInt(1)}, + {order1, utils.ParseDec("10001"), sdkmath.NewInt(0)}, } { t.Run("", func(t *testing.T) { - require.True(sdk.IntEq(t, tc.expected, amm.MatchableAmount(tc.order, tc.price))) + require.True(sdkmath.IntEq(t, tc.expected, amm.MatchableAmount(tc.order, tc.price))) }) } } @@ -34,7 +34,7 @@ type batchIdOrderer struct { batchId uint64 } -func (orderer *batchIdOrderer) Order(dir amm.OrderDirection, price sdk.Dec, amt sdk.Int) amm.Order { +func (orderer *batchIdOrderer) Order(dir amm.OrderDirection, price sdkmath.LegacyDec, amt sdkmath.Int) amm.Order { return &batchIdOrder{newOrder(dir, price, amt), orderer.batchId} } @@ -49,25 +49,25 @@ func (order *batchIdOrder) GetBatchID() uint64 { func TestGroupOrdersByBatchId(t *testing.T) { price := utils.ParseDec("1.0") - newOrder := func(amt sdk.Int, batchId uint64) amm.Order { + newOrder := func(amt sdkmath.Int, batchId uint64) amm.Order { return (&batchIdOrderer{batchId}).Order(amm.Buy, price, amt) } orders := []amm.Order{ - newOrder(sdk.NewInt(32000), 0), - newOrder(sdk.NewInt(8000), 4), - newOrder(sdk.NewInt(1000), 1), - newOrder(sdk.NewInt(16000), 4), - newOrder(sdk.NewInt(4000), 2), - newOrder(sdk.NewInt(2000), 1), - newOrder(sdk.NewInt(64000), 0), + newOrder(sdkmath.NewInt(32000), 0), + newOrder(sdkmath.NewInt(8000), 4), + newOrder(sdkmath.NewInt(1000), 1), + newOrder(sdkmath.NewInt(16000), 4), + newOrder(sdkmath.NewInt(4000), 2), + newOrder(sdkmath.NewInt(2000), 1), + newOrder(sdkmath.NewInt(64000), 0), } groups := amm.GroupOrdersByBatchID(orders) require.EqualValues(t, 1, groups[0].BatchID) - require.True(sdk.IntEq(t, sdk.NewInt(3000), amm.TotalAmount(groups[0].Orders))) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(3000), amm.TotalAmount(groups[0].Orders))) require.EqualValues(t, 2, groups[1].BatchID) - require.True(sdk.IntEq(t, sdk.NewInt(4000), amm.TotalAmount(groups[1].Orders))) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(4000), amm.TotalAmount(groups[1].Orders))) require.EqualValues(t, 4, groups[2].BatchID) - require.True(sdk.IntEq(t, sdk.NewInt(24000), amm.TotalAmount(groups[2].Orders))) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(24000), amm.TotalAmount(groups[2].Orders))) require.EqualValues(t, 0, groups[3].BatchID) - require.True(sdk.IntEq(t, sdk.NewInt(96000), amm.TotalAmount(groups[3].Orders))) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(96000), amm.TotalAmount(groups[3].Orders))) } diff --git a/x/liquidity/amm/view.go b/x/liquidity/amm/view.go index 92b238585..a333c7624 100644 --- a/x/liquidity/amm/view.go +++ b/x/liquidity/amm/view.go @@ -3,7 +3,7 @@ package amm import ( "sort" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" ) var ( @@ -13,10 +13,10 @@ var ( ) type OrderView interface { - HighestBuyPrice() (sdk.Dec, bool) - LowestSellPrice() (sdk.Dec, bool) - BuyAmountOver(price sdk.Dec, inclusive bool) sdk.Int - SellAmountUnder(price sdk.Dec, inclusive bool) sdk.Int + HighestBuyPrice() (sdkmath.LegacyDec, bool) + LowestSellPrice() (sdkmath.LegacyDec, bool) + BuyAmountOver(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int + SellAmountUnder(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int } type OrderBookView struct { @@ -29,9 +29,9 @@ func (ob *OrderBook) MakeView() *OrderBookView { sellAmtAccSums: make([]amtAccSum, len(ob.sells.ticks)), } for i, tick := range ob.buys.ticks { - var prevSum sdk.Int + var prevSum sdkmath.Int if i == 0 { - prevSum = sdk.ZeroInt() + prevSum = sdkmath.ZeroInt() } else { prevSum = view.buyAmtAccSums[i-1].sum } @@ -41,9 +41,9 @@ func (ob *OrderBook) MakeView() *OrderBookView { } } for i, tick := range ob.sells.ticks { - var prevSum sdk.Int + var prevSum sdkmath.Int if i == 0 { - prevSum = sdk.ZeroInt() + prevSum = sdkmath.ZeroInt() } else { prevSum = view.sellAmtAccSums[i-1].sum } @@ -70,12 +70,12 @@ func (view *OrderBookView) Match() { if buyIdx == len(view.buyAmtAccSums) && sellIdx == len(view.sellAmtAccSums) { return } - matchAmt := sdk.ZeroInt() + matchAmt := sdkmath.ZeroInt() if buyIdx > 0 { matchAmt = view.buyAmtAccSums[buyIdx-1].sum } if sellIdx > 0 { - matchAmt = sdk.MaxInt(matchAmt, view.sellAmtAccSums[sellIdx-1].sum) + matchAmt = sdkmath.MaxInt(matchAmt, view.sellAmtAccSums[sellIdx-1].sum) } for i, accSum := range view.buyAmtAccSums { if i < buyIdx { @@ -93,33 +93,33 @@ func (view *OrderBookView) Match() { } } -func (view *OrderBookView) HighestBuyPrice() (sdk.Dec, bool) { +func (view *OrderBookView) HighestBuyPrice() (sdkmath.LegacyDec, bool) { if len(view.buyAmtAccSums) == 0 { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } i := sort.Search(len(view.buyAmtAccSums), func(i int) bool { return view.buyAmtAccSums[i].sum.IsPositive() }) if i >= len(view.buyAmtAccSums) { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } return view.buyAmtAccSums[i].price, true } -func (view *OrderBookView) LowestSellPrice() (sdk.Dec, bool) { +func (view *OrderBookView) LowestSellPrice() (sdkmath.LegacyDec, bool) { if len(view.sellAmtAccSums) == 0 { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } i := sort.Search(len(view.sellAmtAccSums), func(i int) bool { return view.sellAmtAccSums[i].sum.IsPositive() }) if i >= len(view.sellAmtAccSums) { - return sdk.Dec{}, false + return sdkmath.LegacyDec{}, false } return view.sellAmtAccSums[i].price, true } -func (view *OrderBookView) BuyAmountOver(price sdk.Dec, inclusive bool) sdk.Int { +func (view *OrderBookView) BuyAmountOver(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int { i := sort.Search(len(view.buyAmtAccSums), func(i int) bool { if inclusive { return view.buyAmtAccSums[i].price.LT(price) @@ -127,12 +127,12 @@ func (view *OrderBookView) BuyAmountOver(price sdk.Dec, inclusive bool) sdk.Int return view.buyAmtAccSums[i].price.LTE(price) }) if i == 0 { - return sdk.ZeroInt() + return sdkmath.ZeroInt() } return view.buyAmtAccSums[i-1].sum } -func (view *OrderBookView) BuyAmountUnder(price sdk.Dec, inclusive bool) sdk.Int { +func (view *OrderBookView) BuyAmountUnder(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int { i := sort.Search(len(view.buyAmtAccSums), func(i int) bool { if inclusive { return view.buyAmtAccSums[i].price.LTE(price) @@ -145,7 +145,7 @@ func (view *OrderBookView) BuyAmountUnder(price sdk.Dec, inclusive bool) sdk.Int return view.buyAmtAccSums[len(view.buyAmtAccSums)-1].sum.Sub(view.buyAmtAccSums[i-1].sum) } -func (view *OrderBookView) SellAmountUnder(price sdk.Dec, inclusive bool) sdk.Int { +func (view *OrderBookView) SellAmountUnder(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int { i := sort.Search(len(view.sellAmtAccSums), func(i int) bool { if inclusive { return view.sellAmtAccSums[i].price.GT(price) @@ -153,12 +153,12 @@ func (view *OrderBookView) SellAmountUnder(price sdk.Dec, inclusive bool) sdk.In return view.sellAmtAccSums[i].price.GTE(price) }) if i == 0 { - return sdk.ZeroInt() + return sdkmath.ZeroInt() } return view.sellAmtAccSums[i-1].sum } -func (view *OrderBookView) SellAmountOver(price sdk.Dec, inclusive bool) sdk.Int { +func (view *OrderBookView) SellAmountOver(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int { i := sort.Search(len(view.sellAmtAccSums), func(i int) bool { if inclusive { return view.sellAmtAccSums[i].price.GTE(price) @@ -172,13 +172,13 @@ func (view *OrderBookView) SellAmountOver(price sdk.Dec, inclusive bool) sdk.Int } type amtAccSum struct { - price sdk.Dec - sum sdk.Int + price sdkmath.LegacyDec + sum sdkmath.Int } type MultipleOrderViews []OrderView -func (views MultipleOrderViews) HighestBuyPrice() (price sdk.Dec, found bool) { +func (views MultipleOrderViews) HighestBuyPrice() (price sdkmath.LegacyDec, found bool) { for _, view := range views { p, f := view.HighestBuyPrice() if f && (price.IsNil() || p.GT(price)) { @@ -189,7 +189,7 @@ func (views MultipleOrderViews) HighestBuyPrice() (price sdk.Dec, found bool) { return } -func (views MultipleOrderViews) LowestSellPrice() (price sdk.Dec, found bool) { +func (views MultipleOrderViews) LowestSellPrice() (price sdkmath.LegacyDec, found bool) { for _, view := range views { p, f := view.LowestSellPrice() if f && (price.IsNil() || p.LT(price)) { @@ -200,16 +200,16 @@ func (views MultipleOrderViews) LowestSellPrice() (price sdk.Dec, found bool) { return } -func (views MultipleOrderViews) BuyAmountOver(price sdk.Dec, inclusive bool) sdk.Int { - amt := sdk.ZeroInt() +func (views MultipleOrderViews) BuyAmountOver(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int { + amt := sdkmath.ZeroInt() for _, view := range views { amt = amt.Add(view.BuyAmountOver(price, inclusive)) } return amt } -func (views MultipleOrderViews) SellAmountUnder(price sdk.Dec, inclusive bool) sdk.Int { - amt := sdk.ZeroInt() +func (views MultipleOrderViews) SellAmountUnder(price sdkmath.LegacyDec, inclusive bool) sdkmath.Int { + amt := sdkmath.ZeroInt() for _, view := range views { amt = amt.Add(view.SellAmountUnder(price, inclusive)) } diff --git a/x/liquidity/amm/view_test.go b/x/liquidity/amm/view_test.go index b351218e7..b58605035 100644 --- a/x/liquidity/amm/view_test.go +++ b/x/liquidity/amm/view_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" utils "github.com/comdex-official/comdex/types" @@ -20,11 +20,11 @@ func TestOrderBookView(t *testing.T) { // Add 10 random orders for each buy and sell direction for j := 0; j < 10; j++ { price := utils.RandomDec(r, utils.ParseDec("0.5"), utils.ParseDec("2.0")) - amt := utils.RandomInt(r, sdk.NewInt(1000), sdk.NewInt(10000)) + amt := utils.RandomInt(r, sdkmath.NewInt(1000), sdkmath.NewInt(10000)) ob.AddOrder(newOrder(amm.Buy, price, amt)) price = utils.RandomDec(r, utils.ParseDec("0.5"), utils.ParseDec("2.0")) - amt = utils.RandomInt(r, sdk.NewInt(1000), sdk.NewInt(10000)) + amt = utils.RandomInt(r, sdkmath.NewInt(1000), sdkmath.NewInt(10000)) ob.AddOrder(newOrder(amm.Sell, price, amt)) } @@ -37,89 +37,89 @@ func TestOrderBookView(t *testing.T) { price := utils.RandomDec(r, utils.ParseDec("0.4"), utils.ParseDec("2.1")) // buy amount over (inclusive) - expected := sdk.ZeroInt() + expected := sdkmath.ZeroInt() for _, order := range orders { if order.GetDirection() == amm.Buy && order.GetPrice().GTE(price) { expected = expected.Add(order.GetAmount()) } } - require.True(sdk.IntEq(t, expected, ov.BuyAmountOver(price, true))) + require.True(sdkmath.IntEq(t, expected, ov.BuyAmountOver(price, true))) // buy amount over (exclusive) - expected = sdk.ZeroInt() + expected = sdkmath.ZeroInt() for _, order := range orders { if order.GetDirection() == amm.Buy && order.GetPrice().GT(price) { expected = expected.Add(order.GetAmount()) } } - require.True(sdk.IntEq(t, expected, ov.BuyAmountOver(price, false))) + require.True(sdkmath.IntEq(t, expected, ov.BuyAmountOver(price, false))) // buy amount under (inclusive) - expected = sdk.ZeroInt() + expected = sdkmath.ZeroInt() for _, order := range orders { if order.GetDirection() == amm.Buy && order.GetPrice().LTE(price) { expected = expected.Add(order.GetAmount()) } } - require.True(sdk.IntEq(t, expected, ov.BuyAmountUnder(price, true))) + require.True(sdkmath.IntEq(t, expected, ov.BuyAmountUnder(price, true))) // buy amount under (exclusive) - expected = sdk.ZeroInt() + expected = sdkmath.ZeroInt() for _, order := range orders { if order.GetDirection() == amm.Buy && order.GetPrice().LT(price) { expected = expected.Add(order.GetAmount()) } } - require.True(sdk.IntEq(t, expected, ov.BuyAmountUnder(price, false))) + require.True(sdkmath.IntEq(t, expected, ov.BuyAmountUnder(price, false))) // sell amount under (inclusive) - expected = sdk.ZeroInt() + expected = sdkmath.ZeroInt() for _, order := range orders { if order.GetDirection() == amm.Sell && order.GetPrice().LTE(price) { expected = expected.Add(order.GetAmount()) } } - require.True(sdk.IntEq(t, expected, ov.SellAmountUnder(price, true))) + require.True(sdkmath.IntEq(t, expected, ov.SellAmountUnder(price, true))) // sell amount under (exclusive) - expected = sdk.ZeroInt() + expected = sdkmath.ZeroInt() for _, order := range orders { if order.GetDirection() == amm.Sell && order.GetPrice().LT(price) { expected = expected.Add(order.GetAmount()) } } - require.True(sdk.IntEq(t, expected, ov.SellAmountUnder(price, false))) + require.True(sdkmath.IntEq(t, expected, ov.SellAmountUnder(price, false))) // sell amount over (inclusive) - expected = sdk.ZeroInt() + expected = sdkmath.ZeroInt() for _, order := range orders { if order.GetDirection() == amm.Sell && order.GetPrice().GTE(price) { expected = expected.Add(order.GetAmount()) } } - require.True(sdk.IntEq(t, expected, ov.SellAmountOver(price, true))) + require.True(sdkmath.IntEq(t, expected, ov.SellAmountOver(price, true))) // sell amount over (exclusive) - expected = sdk.ZeroInt() + expected = sdkmath.ZeroInt() for _, order := range orders { if order.GetDirection() == amm.Sell && order.GetPrice().GT(price) { expected = expected.Add(order.GetAmount()) } } - require.True(sdk.IntEq(t, expected, ov.SellAmountOver(price, false))) + require.True(sdkmath.IntEq(t, expected, ov.SellAmountOver(price, false))) } } } func TestOrderBookView_NoMatch(t *testing.T) { ob := amm.NewOrderBook( - newOrder(amm.Sell, utils.ParseDec("1.1"), sdk.NewInt(10000)), - newOrder(amm.Buy, utils.ParseDec("1.0"), sdk.NewInt(10000)), + newOrder(amm.Sell, utils.ParseDec("1.1"), sdkmath.NewInt(10000)), + newOrder(amm.Buy, utils.ParseDec("1.0"), sdkmath.NewInt(10000)), ) ov := ob.MakeView() ov.Match() - require.True(sdk.IntEq(t, sdk.NewInt(10000), ov.BuyAmountOver(utils.ParseDec("1.0"), true))) - require.True(sdk.IntEq(t, sdk.NewInt(10000), ov.SellAmountUnder(utils.ParseDec("1.1"), true))) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(10000), ov.BuyAmountOver(utils.ParseDec("1.0"), true))) + require.True(sdkmath.IntEq(t, sdkmath.NewInt(10000), ov.SellAmountUnder(utils.ParseDec("1.1"), true))) } diff --git a/x/liquidity/client/cli/tx.go b/x/liquidity/client/cli/tx.go index c8f795910..3a0361f69 100644 --- a/x/liquidity/client/cli/tx.go +++ b/x/liquidity/client/cli/tx.go @@ -13,7 +13,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/comdex-official/comdex/x/liquidity/types" ) diff --git a/x/liquidity/client/proposal_handler.go b/x/liquidity/client/proposal_handler.go index ef39aa91f..52e693ca1 100644 --- a/x/liquidity/client/proposal_handler.go +++ b/x/liquidity/client/proposal_handler.go @@ -4,10 +4,9 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/comdex-official/comdex/x/liquidity/client/cli" - "github.com/comdex-official/comdex/x/liquidity/client/rest" ) var LiquidityProposalHandler = []govclient.ProposalHandler{ - govclient.NewProposalHandler(cli.NewCmdUpdateGenericParamsProposal, rest.UpdateGenericParamsProposalRESTHandler), - govclient.NewProposalHandler(cli.NewCmdCreateNewLiquidityPairProposal, rest.CreateNewLiquidityPairProposalRESTHandler), + govclient.NewProposalHandler(cli.NewCmdUpdateGenericParamsProposal), + govclient.NewProposalHandler(cli.NewCmdCreateNewLiquidityPairProposal), } diff --git a/x/liquidity/client/rest/tx.go b/x/liquidity/client/rest/tx.go deleted file mode 100644 index 6f95d7232..000000000 --- a/x/liquidity/client/rest/tx.go +++ /dev/null @@ -1,121 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/comdex-official/comdex/x/liquidity/types" -) - -type UpdateGenericParamsRequest struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - AppID uint64 `json:"app_id" yaml:"app_id"` - Keys []string `json:"keys" yaml:"keys"` - Values []string `json:"values" yaml:"values"` -} - -type CreateNewLiquidityPairRequest struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - AppID uint64 `json:"app_id" yaml:"app_id"` - BaseCoinDenom string `json:"base_coin_denom" yaml:"base_coin_denom"` - QuoteCoinDenom string `json:"quote_coin_denom" yaml:"quote_coin_denom"` -} - -func UpdateGenericParamsProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "liquidity-param-change", - Handler: UpdateGenericParamsRESTHandler(clientCtx), - } -} - -func CreateNewLiquidityPairProposalRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "create-liquidity-pair", - Handler: CreateNewLiquidityPairRESTHandler(clientCtx), - } -} - -func UpdateGenericParamsRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req UpdateGenericParamsRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(req.BaseReq.From) - if rest.CheckBadRequestError(w, err) { - return - } - - content := types.NewUpdateGenericParamsProposal( - req.Title, - req.Description, - req.AppID, - req.Keys, - req.Values, - ) - msg, err := govtypes.NewMsgSubmitProposal(content, req.Deposit, fromAddr) - if rest.CheckBadRequestError(w, err) { - return - } - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg) - } -} - -func CreateNewLiquidityPairRESTHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req CreateNewLiquidityPairRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(req.BaseReq.From) - if rest.CheckBadRequestError(w, err) { - return - } - - content := types.NewCreateLiquidityPairProposal( - req.Title, - req.Description, - fromAddr, - req.AppID, - req.BaseCoinDenom, - req.QuoteCoinDenom, - ) - msg, err := govtypes.NewMsgSubmitProposal(content, req.Deposit, fromAddr) - if rest.CheckBadRequestError(w, err) { - return - } - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg) - } -} diff --git a/x/liquidity/client/testutil/cli_test.go b/x/liquidity/client/testutil/cli_test.go index 2ec6f646e..4a4679b44 100644 --- a/x/liquidity/client/testutil/cli_test.go +++ b/x/liquidity/client/testutil/cli_test.go @@ -1,11 +1,5 @@ package testutil -import ( - "testing" - - "github.com/stretchr/testify/suite" -) - -func TestLiquidityIntegrationTestSuite(t *testing.T) { - suite.Run(t, new(LiquidityIntegrationTestSuite)) -} +// func TestLiquidityIntegrationTestSuite(t *testing.T) { +// suite.Run(t, new(LiquidityIntegrationTestSuite)) +// } diff --git a/x/liquidity/client/testutil/helpers.go b/x/liquidity/client/testutil/helpers.go index 5e2b194a1..e9bb13b80 100644 --- a/x/liquidity/client/testutil/helpers.go +++ b/x/liquidity/client/testutil/helpers.go @@ -18,7 +18,7 @@ import ( var commonArgs = []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 10)).String()), } diff --git a/x/liquidity/client/testutil/suite.go b/x/liquidity/client/testutil/suite.go index 60be2a98e..db6526e71 100644 --- a/x/liquidity/client/testutil/suite.go +++ b/x/liquidity/client/testutil/suite.go @@ -10,15 +10,16 @@ import ( liquidityKeeper "github.com/comdex-official/comdex/x/liquidity/keeper" "github.com/comdex-official/comdex/x/liquidity/types" + "github.com/comdex-official/comdex/testutil/network" "github.com/cosmos/cosmos-sdk/baseapp" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" - store "github.com/cosmos/cosmos-sdk/store/types" - "github.com/cosmos/cosmos-sdk/testutil/network" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" + networkI "github.com/cosmos/cosmos-sdk/testutil/network" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ) type LiquidityIntegrationTestSuite struct { @@ -32,13 +33,13 @@ type LiquidityIntegrationTestSuite struct { msgServer types.MsgServer } -func NewAppConstructor() network.AppConstructor { - return func(val network.Validator) servertypes.Application { +func NewAppConstructor() networkI.AppConstructor { + return func(val networkI.ValidatorI) servertypes.Application { return chain.New( - val.Ctx.Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), val.Ctx.Config.RootDir, 0, - chain.MakeEncodingConfig(), simapp.EmptyAppOptions{}, chain.GetWasmEnabledProposals(), chain.EmptyWasmOpts, - baseapp.SetPruning(store.NewPruningOptionsFromString(val.AppConfig.Pruning)), - baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), + val.GetCtx().Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), val.GetCtx().Config.RootDir, 0, + chain.MakeEncodingConfig(), simtestutil.EmptyAppOptions{}, chain.GetWasmEnabledProposals(), chain.EmptyWasmOpts, + baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), + baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices), ) } } @@ -50,7 +51,7 @@ func (s *LiquidityIntegrationTestSuite) SetupSuite() { s.T().Skip("skipping test in unit-tests mode.") } - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.msgServer = liquidityKeeper.NewMsgServerImpl(s.app.LiquidityKeeper) diff --git a/x/liquidity/handler.go b/x/liquidity/handler.go index 3dad0c9ef..92bbefab2 100644 --- a/x/liquidity/handler.go +++ b/x/liquidity/handler.go @@ -3,7 +3,7 @@ package liquidity import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/pkg/errors" "github.com/comdex-official/comdex/x/liquidity/keeper" diff --git a/x/liquidity/handler_test.go b/x/liquidity/handler_test.go index 51c1a205c..15ae335e5 100644 --- a/x/liquidity/handler_test.go +++ b/x/liquidity/handler_test.go @@ -12,15 +12,15 @@ import ( "github.com/comdex-official/comdex/x/liquidity" "github.com/comdex-official/comdex/x/liquidity/keeper" "github.com/comdex-official/comdex/x/liquidity/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) func TestInvalidMsg(t *testing.T) { - app := app.Setup(false) + app := app.Setup(t, false) app.LiquidityKeeper = keeper.NewKeeper( app.AppCodec(), diff --git a/x/liquidity/keeper/batch_test.go b/x/liquidity/keeper/batch_test.go index 66b6b6003..dc5262984 100644 --- a/x/liquidity/keeper/batch_test.go +++ b/x/liquidity/keeper/batch_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "time" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidity" @@ -23,7 +23,7 @@ func (s *KeeperTestSuite) TestOrderExpiration() { pair := s.CreateNewLiquidityPair(appID1, creator, asset1.Denom, asset2.Denom) s.ctx = s.ctx.WithBlockTime(utils.ParseTime("2022-03-01T12:00:00Z")) - order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdk.NewInt(10000), 10*time.Second) + order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdkmath.NewInt(10000), 10*time.Second) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) s.ctx = s.ctx.WithBlockTime(utils.ParseTime("2022-03-01T12:00:06Z")) @@ -31,7 +31,7 @@ func (s *KeeperTestSuite) TestOrderExpiration() { order, found := s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) s.Require().True(found) // The order is not yet deleted. // A buy order comes in. - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(5000), 0) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(5000), 0) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) s.ctx = s.ctx.WithBlockTime(utils.ParseTime("2022-03-01T12:00:12Z")) @@ -41,11 +41,11 @@ func (s *KeeperTestSuite) TestOrderExpiration() { s.Require().Equal(types.OrderStatusPartiallyMatched, order.Status) // Another buy order comes in, but this time the first order has been expired, // so there is no match. - s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(5000), 0) + s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(5000), 0) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) order, _ = s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) s.Require().Equal(types.OrderStatusExpired, order.Status) - s.Require().True(sdk.NewInt(5000).Equal(order.OpenAmount)) + s.Require().True(sdkmath.NewInt(5000).Equal(order.OpenAmount)) liquidity.BeginBlocker(s.ctx, s.keeper, s.app.AssetKeeper) _, found = s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) diff --git a/x/liquidity/keeper/genesis_test.go b/x/liquidity/keeper/genesis_test.go index 9faaf7c1c..2bcb13734 100644 --- a/x/liquidity/keeper/genesis_test.go +++ b/x/liquidity/keeper/genesis_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "time" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" utils "github.com/comdex-official/comdex/types" @@ -41,12 +42,12 @@ func (s *KeeperTestSuite) TestImportExportGenesis() { s.Farm(appID1, pool.Id, s.addr(4), "4440000pool1-1") - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(10000), 0) s.nextBlock() depositReq := s.Deposit(appID1, pool.Id, s.addr(3), "1000000denom1,1000000denom2") withdrawReq := s.Withdraw(appID1, pool.Id, s.addr(1), poolCoin) - order := s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdk.NewInt(10000), 0) + order := s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdkmath.NewInt(10000), 0) pair, _ = k.GetPair(ctx, pair.AppId, pair.Id) pool, _ = k.GetPool(ctx, pool.AppId, pool.Id) @@ -137,8 +138,8 @@ func (s *KeeperTestSuite) TestIndexesAfterImport() { withdrawReq1 := s.Withdraw(appID1, pool1.Id, s.addr(4), utils.ParseCoin("1000000pool1-1")) withdrawReq2 := s.Withdraw(appID1, pool2.Id, s.addr(5), utils.ParseCoin("1000000pool1-2")) - order1 := s.LimitOrder(appID1, s.addr(6), pair1.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(10000), time.Minute) - order2 := s.LimitOrder(appID1, s.addr(7), pair2.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdk.NewInt(10000), time.Minute) + order1 := s.LimitOrder(appID1, s.addr(6), pair1.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(10000), time.Minute) + order2 := s.LimitOrder(appID1, s.addr(7), pair2.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdkmath.NewInt(10000), time.Minute) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) diff --git a/x/liquidity/keeper/grpc_query.go b/x/liquidity/keeper/grpc_query.go index 12ca604ac..527923a7d 100644 --- a/x/liquidity/keeper/grpc_query.go +++ b/x/liquidity/keeper/grpc_query.go @@ -7,6 +7,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -592,7 +593,7 @@ func (k Querier) Farmer(c context.Context, req *types.QueryFarmerRequest) (*type queuedFarmer, qfound := k.GetQueuedFarmer(ctx, req.AppId, req.PoolId, farmer) if !afound && !qfound { - return &types.QueryFarmerResponse{ActivePoolCoin: sdk.NewCoin(pool.PoolCoinDenom, sdk.NewInt(0)), QueuedPoolCoin: []types.QueuedPoolCoin{}}, nil + return &types.QueryFarmerResponse{ActivePoolCoin: sdk.NewCoin(pool.PoolCoinDenom, sdkmath.NewInt(0)), QueuedPoolCoin: []types.QueuedPoolCoin{}}, nil } availableLiquidityGauges := k.rewardsKeeper.GetAllGaugesByGaugeTypeID(ctx, rewardstypes.LiquidityGaugeTypeID) @@ -608,7 +609,7 @@ func (k Querier) Farmer(c context.Context, req *types.QueryFarmerRequest) (*type } } - activePoolCoin := sdk.NewCoin(pool.PoolCoinDenom, sdk.NewInt(0)) + activePoolCoin := sdk.NewCoin(pool.PoolCoinDenom, sdkmath.NewInt(0)) if afound { activePoolCoin.Amount = activePoolCoin.Amount.Add(activeFarmer.FarmedPoolCoin.Amount) } @@ -736,13 +737,13 @@ func (k Querier) TotalActiveAndQueuedPoolCoin(c context.Context, req *types.Quer pools := k.GetAllPools(ctx, req.AppId) for _, pool := range pools { - totalActiveCoin := sdk.NewCoin(pool.PoolCoinDenom, sdk.ZeroInt()) + totalActiveCoin := sdk.NewCoin(pool.PoolCoinDenom, sdkmath.ZeroInt()) allActiveFarmers := k.GetAllActiveFarmers(ctx, req.AppId, pool.Id) for _, afarmer := range allActiveFarmers { totalActiveCoin = totalActiveCoin.Add(afarmer.FarmedPoolCoin) } - totalQueuedCoin := sdk.NewCoin(pool.PoolCoinDenom, sdk.ZeroInt()) + totalQueuedCoin := sdk.NewCoin(pool.PoolCoinDenom, sdkmath.ZeroInt()) allQueuedFarmers := k.GetAllQueuedFarmers(ctx, req.AppId, pool.Id) for _, qfarmer := range allQueuedFarmers { for _, qCoin := range qfarmer.QueudCoins { @@ -841,7 +842,7 @@ func (k Querier) OrderBooks(c context.Context, req *types.QueryOrderBooksRequest return false, nil } rx, ry := k.getPoolBalances(ctx, pool, pair) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) ob.AddOrder(amm.PoolOrders(ammPool, amm.DefaultOrderer, lowestPrice, highestPrice, int(tickPrec))...) return false, nil }) diff --git a/x/liquidity/keeper/keeper.go b/x/liquidity/keeper/keeper.go index 3ae9853d9..eace2dfda 100644 --- a/x/liquidity/keeper/keeper.go +++ b/x/liquidity/keeper/keeper.go @@ -3,19 +3,20 @@ package keeper import ( "fmt" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/tendermint/tendermint/libs/log" "github.com/comdex-official/comdex/x/liquidity/expected" "github.com/comdex-official/comdex/x/liquidity/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) // Keeper of the liquidity store. type Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey + storeKey storetypes.StoreKey paramSpace paramstypes.Subspace accountKeeper expected.AccountKeeper @@ -30,7 +31,7 @@ type Keeper struct { // NewKeeper creates a new liquidity Keeper instance. func NewKeeper( cdc codec.BinaryCodec, - storeKey sdk.StoreKey, + storeKey storetypes.StoreKey, paramSpace paramstypes.Subspace, accountKeeper expected.AccountKeeper, bankKeeper expected.BankKeeper, diff --git a/x/liquidity/keeper/keeper_test.go b/x/liquidity/keeper/keeper_test.go index 2fa2f4053..2cc25dd0b 100644 --- a/x/liquidity/keeper/keeper_test.go +++ b/x/liquidity/keeper/keeper_test.go @@ -8,8 +8,9 @@ import ( "github.com/stretchr/testify/suite" + sdkmath "cosmossdk.io/math" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" assettypes "github.com/comdex-official/comdex/x/asset/types" @@ -37,7 +38,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.keeper = s.app.LiquidityKeeper s.querier = keeper.Querier{Keeper: s.keeper} @@ -79,12 +80,12 @@ func (s *KeeperTestSuite) fundAddr(addr sdk.AccAddress, amt sdk.Coins) { s.Require().NoError(err) } -func newInt(i int64) sdk.Int { - return sdk.NewInt(i) +func newInt(i int64) sdkmath.Int { + return sdkmath.NewInt(i) } -func newDec(i int64) sdk.Dec { - return sdk.NewDec(i) +func newDec(i int64) sdkmath.LegacyDec { + return sdkmath.LegacyNewDec(i) } func coinEq(exp, got sdk.Coin) (bool, string, string, string) { @@ -95,11 +96,11 @@ func coinsEq(exp, got sdk.Coins) (bool, string, string, string) { return exp.IsEqual(got), "expected:\t%v\ngot:\t\t%v", exp.String(), got.String() } -func intEq(exp, got sdk.Int) (bool, string, string, string) { +func intEq(exp, got sdkmath.Int) (bool, string, string, string) { return exp.Equal(got), "expected:\t%v\ngot:\t\t%v", exp.String(), got.String() } -func decEq(exp, got sdk.Dec) (bool, string, string, string) { +func decEq(exp, got sdkmath.LegacyDec) (bool, string, string, string) { return exp.Equal(got), "expected:\t%v\ngot:\t\t%v", exp.String(), got.String() } @@ -107,7 +108,7 @@ func (s *KeeperTestSuite) CreateNewApp(appName string) uint64 { err := s.app.AssetKeeper.AddAppRecords(s.ctx, assettypes.AppData{ Name: strings.ToLower(appName), ShortName: strings.ToLower(appName), - MinGovDeposit: sdk.NewInt(0), + MinGovDeposit: sdkmath.NewInt(0), GovTimeInSeconds: 0, GenesisToken: []assettypes.MintGenesisToken{}, }) @@ -132,7 +133,7 @@ func (s *KeeperTestSuite) CreateNewAsset(name, denom string, price uint64) asset err := s.app.AssetKeeper.AddAssetRecords(s.ctx, assettypes.Asset{ Name: name, Denom: denom, - Decimals: sdk.NewInt(1000000), + Decimals: sdkmath.NewInt(1000000), IsOnChain: true, IsOraclePriceRequired: true, }) @@ -193,7 +194,7 @@ func (s *KeeperTestSuite) CreateNewLiquidityPool(appID, pairID uint64, creator s return pool } -func (s *KeeperTestSuite) CreateNewLiquidityRangedPool(appID, pairID uint64, creator sdk.AccAddress, depositCoins string, minPrice, maxPrice, initialPrice sdk.Dec) types.Pool { +func (s *KeeperTestSuite) CreateNewLiquidityRangedPool(appID, pairID uint64, creator sdk.AccAddress, depositCoins string, minPrice, maxPrice, initialPrice sdkmath.LegacyDec) types.Pool { params, err := s.keeper.GetGenericParams(s.ctx, appID) s.Require().NoError(err) @@ -235,8 +236,8 @@ func (s *KeeperTestSuite) LimitOrder( orderer sdk.AccAddress, pairId uint64, dir types.OrderDirection, - price sdk.Dec, - amt sdk.Int, + price sdkmath.LegacyDec, + amt sdkmath.Int, orderLifespan time.Duration, ) types.Order { s.T().Helper() @@ -258,7 +259,7 @@ func (s *KeeperTestSuite) LimitOrder( params, err := s.keeper.GetGenericParams(s.ctx, appID) s.Require().NoError(err) - offerCoin = offerCoin.Add(sdk.NewCoin(offerCoin.Denom, offerCoin.Amount.ToDec().Mul(params.SwapFeeRate).RoundInt())) + offerCoin = offerCoin.Add(sdk.NewCoin(offerCoin.Denom, sdkmath.LegacyNewDec(offerCoin.Amount.Int64()).Mul(params.SwapFeeRate).RoundInt())) s.fundAddr(orderer, sdk.NewCoins(offerCoin)) msg := types.NewMsgLimitOrder( @@ -275,7 +276,7 @@ func (s *KeeperTestSuite) MarketOrder( orderer sdk.AccAddress, pairId uint64, dir types.OrderDirection, - amt sdk.Int, + amt sdkmath.Int, orderLifespan time.Duration, ) types.Order { s.T().Helper() @@ -289,7 +290,7 @@ func (s *KeeperTestSuite) MarketOrder( var demandCoinDenom string switch dir { case types.OrderDirectionBuy: - maxPrice := lastPrice.Mul(sdk.OneDec().Add(params.MaxPriceLimitRatio)) + maxPrice := lastPrice.Mul(sdkmath.LegacyOneDec().Add(params.MaxPriceLimitRatio)) offerCoin = sdk.NewCoin(pair.QuoteCoinDenom, amm.OfferCoinAmount(amm.Buy, maxPrice, amt)) demandCoinDenom = pair.BaseCoinDenom case types.OrderDirectionSell: @@ -297,7 +298,7 @@ func (s *KeeperTestSuite) MarketOrder( demandCoinDenom = pair.QuoteCoinDenom } - offerCoin = offerCoin.Add(sdk.NewCoin(offerCoin.Denom, offerCoin.Amount.ToDec().Mul(params.SwapFeeRate).RoundInt())) + offerCoin = offerCoin.Add(sdk.NewCoin(offerCoin.Denom, sdkmath.LegacyNewDec(offerCoin.Amount.Int64()).Mul(params.SwapFeeRate).RoundInt())) s.fundAddr(orderer, sdk.NewCoins(offerCoin)) msg := types.NewMsgMarketOrder( @@ -311,8 +312,8 @@ func (s *KeeperTestSuite) MarketOrder( func (s *KeeperTestSuite) MarketMakingOrder( orderer sdk.AccAddress, appID, pairId uint64, - maxSellPrice, minSellPrice sdk.Dec, sellAmt sdk.Int, - maxBuyPrice, minBuyPrice sdk.Dec, buyAmt sdk.Int, + maxSellPrice, minSellPrice sdkmath.LegacyDec, sellAmt sdkmath.Int, + maxBuyPrice, minBuyPrice sdkmath.LegacyDec, buyAmt sdkmath.Int, orderLifespan time.Duration, fund bool) []types.Order { s.T().Helper() params, err := s.keeper.GetGenericParams(s.ctx, appID) diff --git a/x/liquidity/keeper/pair_test.go b/x/liquidity/keeper/pair_test.go index abaa11884..f6d62594f 100644 --- a/x/liquidity/keeper/pair_test.go +++ b/x/liquidity/keeper/pair_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + sdkmath "cosmossdk.io/math" "github.com/comdex-official/comdex/x/liquidity/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -73,7 +74,7 @@ func (s *KeeperTestSuite) TestCreatePair() { Msg: *types.NewMsgCreatePair( appID1, addr1, asset1.Denom, asset2.Denom, ), - ExpErr: sdkerrors.Wrap(sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "0ucmdx is smaller than 2000000000ucmdx"), "insufficient pair creation fee"), + ExpErr: sdkerrors.Wrap(sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "spendable balance is smaller than 2000000000ucmdx"), "insufficient pair creation fee"), ExpResp: &types.Pair{}, QueryResponseIndex: 0, QueryResponse: nil, @@ -233,7 +234,7 @@ func (s *KeeperTestSuite) TestCreatePair() { params, err := s.keeper.GetGenericParams(s.ctx, tc.Msg.AppId) s.Require().NoError(err) collectedPairCreationFee := s.getBalances(sdk.MustAccAddressFromBech32(params.FeeCollectorAddress)) - s.Require().True(sdk.NewCoins(sdk.NewCoin(params.PairCreationFee[0].Denom, params.PairCreationFee[0].Amount.Mul(sdk.NewInt(int64(tc.QueryResponseIndex+1))))).IsEqual(collectedPairCreationFee)) + s.Require().True(sdk.NewCoins(sdk.NewCoin(params.PairCreationFee[0].Denom, params.PairCreationFee[0].Amount.Mul(sdkmath.NewInt(int64(tc.QueryResponseIndex+1))))).IsEqual(collectedPairCreationFee)) pairs := s.keeper.GetAllPairs(s.ctx, tc.Msg.AppId) s.Require().Len(pairs, int(tc.QueryResponseIndex)+1) diff --git a/x/liquidity/keeper/pool.go b/x/liquidity/keeper/pool.go index 0c484b324..4a985efb2 100644 --- a/x/liquidity/keeper/pool.go +++ b/x/liquidity/keeper/pool.go @@ -4,6 +4,7 @@ import ( "fmt" "strconv" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -59,7 +60,7 @@ func (k Keeper) getPoolBalances(ctx sdk.Context, pool types.Pool, pair types.Pai } // GetPoolCoinSupply returns total pool coin supply of the pool. -func (k Keeper) GetPoolCoinSupply(ctx sdk.Context, pool types.Pool) sdk.Int { +func (k Keeper) GetPoolCoinSupply(ctx sdk.Context, pool types.Pool) sdkmath.Int { return k.bankKeeper.GetSupply(ctx, pool.PoolCoinDenom).Amount } @@ -160,7 +161,7 @@ func (k Keeper) CreatePool(ctx sdk.Context, msg *types.MsgCreatePool) (types.Poo // Mint and send pool coin to the creator. // Minting pool coin amount is calculated based on two coins' amount. // Minimum minting amount is params.MinInitialPoolCoinSupply. - ps := sdk.MaxInt( + ps := sdkmath.MaxInt( ammPool.PoolCoinSupply(), params.MinInitialPoolCoinSupply, ) @@ -178,7 +179,7 @@ func (k Keeper) CreatePool(ctx sdk.Context, msg *types.MsgCreatePool) (types.Poo ctx.BlockTime(), rewardstypes.LiquidityGaugeTypeID, types.DefaultSwapFeeDistributionDuration, - sdk.NewCoin(params.SwapFeeDistrDenom, sdk.NewInt(0)), + sdk.NewCoin(params.SwapFeeDistrDenom, sdkmath.NewInt(0)), 1, ) newGauge.Kind = &rewardstypes.MsgCreateGauge_LiquidityMetaData{ @@ -312,7 +313,7 @@ func (k Keeper) CreateRangedPool(ctx sdk.Context, msg *types.MsgCreateRangedPool // Mint and send pool coin to the creator. // Minimum minting amount is params.MinInitialPoolCoinSupply. - ps := sdk.MaxInt(ammPool.PoolCoinSupply(), params.MinInitialPoolCoinSupply) + ps := sdkmath.MaxInt(ammPool.PoolCoinSupply(), params.MinInitialPoolCoinSupply) poolCoin := sdk.NewCoin(pool.PoolCoinDenom, ps) if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(poolCoin)); err != nil { return types.Pool{}, err @@ -327,7 +328,7 @@ func (k Keeper) CreateRangedPool(ctx sdk.Context, msg *types.MsgCreateRangedPool ctx.BlockTime(), rewardstypes.LiquidityGaugeTypeID, types.DefaultSwapFeeDistributionDuration, - sdk.NewCoin(params.SwapFeeDistrDenom, sdk.NewInt(0)), + sdk.NewCoin(params.SwapFeeDistrDenom, sdkmath.NewInt(0)), 1, ) newGauge.Kind = &rewardstypes.MsgCreateGauge_LiquidityMetaData{ @@ -548,7 +549,7 @@ func (k Keeper) FinishDepositRequest(ctx sdk.Context, req types.DepositRequest, return nil } - refundingCoins := req.DepositCoins.Sub(req.AcceptedCoins) + refundingCoins := req.DepositCoins.Sub(req.AcceptedCoins...) if !refundingCoins.IsZero() { if err := k.bankKeeper.SendCoins(ctx, types.GlobalEscrowAddress, req.GetDepositor(), refundingCoins); err != nil { return err @@ -708,7 +709,7 @@ func (k Keeper) TransferFundsForSwapFeeDistribution(ctx sdk.Context, appID, requ return sdk.Coin{}, types.ErrOraclePricesNotFound } // moduleAddr := k.accountKeeper.GetModuleAddress(types.ModuleName) - poolLiquidityMap := make(map[uint64]sdk.Dec) + poolLiquidityMap := make(map[uint64]sdkmath.LegacyDec) for _, pool := range allPoolsForPair { if pool.Disabled { continue @@ -723,32 +724,32 @@ func (k Keeper) TransferFundsForSwapFeeDistribution(ctx sdk.Context, appID, requ baseValue, _ := k.CalcAssetPrice(ctx, baseAsset.Id, ry.Amount) totalValue := quoteValue.Add(baseValue) if !totalValue.IsPositive() { - return sdk.NewCoin(params.SwapFeeDistrDenom, sdk.ZeroInt()), nil + return sdk.NewCoin(params.SwapFeeDistrDenom, sdkmath.ZeroInt()), nil } poolLiquidityMap[pool.Id] = totalValue } - totalLiquidity := sdk.ZeroDec() + totalLiquidity := sdkmath.LegacyZeroDec() for _, pLiquidity := range poolLiquidityMap { totalLiquidity = totalLiquidity.Add(pLiquidity) } requestedPoolShare := poolLiquidityMap[requestedPoolID].Quo(totalLiquidity) - eligibleSwapFeeAmount := requestedPoolShare.Mul(availableBalance.Amount.ToDec()) + eligibleSwapFeeAmount := requestedPoolShare.Mul(sdkmath.LegacyNewDec(availableBalance.Amount.Int64())) availableBalance.Amount = eligibleSwapFeeAmount.RoundInt() } - burnAmount := availableBalance.Amount.ToDec().MulTruncate(params.SwapFeeBurnRate).TruncateInt() + burnAmount := sdkmath.LegacyNewDec(availableBalance.Amount.Int64()).MulTruncate(params.SwapFeeBurnRate).TruncateInt() burnCoin := sdk.NewCoin(availableBalance.Denom, burnAmount) if burnCoin.Amount.IsPositive() { err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, pair.GetSwapFeeCollectorAddress(), types.ModuleName, sdk.NewCoins(burnCoin)) if err != nil { - return sdk.NewCoin(params.SwapFeeDistrDenom, sdk.ZeroInt()), err + return sdk.NewCoin(params.SwapFeeDistrDenom, sdkmath.ZeroInt()), err } err = k.bankKeeper.BurnCoins(ctx, types.ModuleName, sdk.NewCoins(burnCoin)) if err != nil { - return sdk.NewCoin(params.SwapFeeDistrDenom, sdk.ZeroInt()), err + return sdk.NewCoin(params.SwapFeeDistrDenom, sdkmath.ZeroInt()), err } } @@ -757,19 +758,19 @@ func (k Keeper) TransferFundsForSwapFeeDistribution(ctx sdk.Context, appID, requ if availableBalance.IsPositive() { err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, pair.GetSwapFeeCollectorAddress(), rewardstypes.ModuleName, sdk.NewCoins(availableBalance)) if err != nil { - return sdk.NewCoin(params.SwapFeeDistrDenom, sdk.ZeroInt()), err + return sdk.NewCoin(params.SwapFeeDistrDenom, sdkmath.ZeroInt()), err } } else { // negative amount handalling - availableBalance.Amount = sdk.NewInt(0) + availableBalance.Amount = sdkmath.NewInt(0) } return availableBalance, nil } -func (k Keeper) WasmMsgAddEmissionPoolRewards(ctx sdk.Context, appID, cswapAppID uint64, amount sdk.Int, pool []uint64, votingRatio []sdk.Int) error { +func (k Keeper) WasmMsgAddEmissionPoolRewards(ctx sdk.Context, appID, cswapAppID uint64, amount sdkmath.Int, pool []uint64, votingRatio []sdkmath.Int) error { var assetID uint64 - totalVote := sdk.ZeroInt() + totalVote := sdkmath.ZeroInt() app, _ := k.assetKeeper.GetApp(ctx, appID) govToken := app.GenesisToken for _, v := range govToken { @@ -778,7 +779,7 @@ func (k Keeper) WasmMsgAddEmissionPoolRewards(ctx sdk.Context, appID, cswapAppID } } asset, _ := k.assetKeeper.GetAsset(ctx, assetID) - if amount.GT(sdk.ZeroInt()) { + if amount.GT(sdkmath.ZeroInt()) { err := k.bankKeeper.MintCoins(ctx, tokenminttypes.ModuleName, sdk.NewCoins(sdk.NewCoin(asset.Denom, amount))) if err != nil { return err @@ -793,18 +794,18 @@ func (k Keeper) WasmMsgAddEmissionPoolRewards(ctx sdk.Context, appID, cswapAppID moduleAddr := k.accountKeeper.GetModuleAddress(types.ModuleName) farmedCoins := k.bankKeeper.GetBalance(ctx, moduleAddr, pool.PoolCoinDenom) individualVote := votingRatio[j] - votingR := individualVote.ToDec().Quo(totalVote.ToDec()) - shareByPool := votingR.Mul(amount.ToDec()) + votingR := sdkmath.LegacyNewDec(individualVote.Int64()).Quo(sdkmath.LegacyNewDec(totalVote.Int64())) + shareByPool := votingR.Mul(sdkmath.LegacyNewDec(amount.Int64())) if farmedCoins.IsZero() { continue } - perUserShareByAmtDec := shareByPool.Quo(farmedCoins.Amount.ToDec()) + perUserShareByAmtDec := shareByPool.Quo(sdkmath.LegacyNewDec(farmedCoins.Amount.Int64())) allActiveFarmer := k.GetAllActiveFarmers(ctx, cswapAppID, extP) for _, farmerDetail := range allActiveFarmer { - amt := sdk.NewDecFromInt(farmerDetail.FarmedPoolCoin.Amount).Mul(perUserShareByAmtDec) + amt := sdkmath.LegacyNewDecFromInt(farmerDetail.FarmedPoolCoin.Amount).Mul(perUserShareByAmtDec) addr, _ := sdk.AccAddressFromBech32(farmerDetail.Farmer) - if amt.GT(sdk.NewDec(0)) { + if amt.GT(sdkmath.LegacyNewDec(0)) { err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, tokenminttypes.ModuleName, addr, sdk.NewCoins(sdk.NewCoin(asset.Denom, amt.TruncateInt()))) if err != nil { return err diff --git a/x/liquidity/keeper/pool_test.go b/x/liquidity/keeper/pool_test.go index 36494ef90..c51335b0b 100644 --- a/x/liquidity/keeper/pool_test.go +++ b/x/liquidity/keeper/pool_test.go @@ -5,6 +5,8 @@ import ( "github.com/comdex-official/comdex/x/liquidity" "github.com/comdex-official/comdex/x/liquidity/amm" "github.com/comdex-official/comdex/x/liquidity/types" + + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" _ "github.com/stretchr/testify/suite" @@ -27,7 +29,7 @@ func (s *KeeperTestSuite) TestCreatePool() { params, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) - s.fundAddr(addr1, sdk.NewCoins(sdk.NewCoin(dummyPair2.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(dummyPair2.QuoteCoinDenom, sdk.NewInt(1000000000000)))) + s.fundAddr(addr1, sdk.NewCoins(sdk.NewCoin(dummyPair2.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(dummyPair2.QuoteCoinDenom, sdkmath.NewInt(1000000000000)))) testCases := []struct { Name string @@ -41,7 +43,7 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error app id invalid", Msg: *types.NewMsgCreatePool( - 69, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), + 69, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidAppID, "app id %d not found", 69), ExpResp: &types.Pool{}, @@ -52,7 +54,7 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error pair id invalid", Msg: *types.NewMsgCreatePool( - appID1, addr1, 12, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), + appID1, addr1, 12, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), ), ExpErr: sdkerrors.Wrapf(sdkerrors.ErrNotFound, "pair %d not found", 12), ExpResp: &types.Pool{}, @@ -63,7 +65,7 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error invalid deposit coin denom 1", Msg: *types.NewMsgCreatePool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdk.NewInt(1000000000000)), sdk.NewCoin("fakedenom2", sdk.NewInt(1000000000000))), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdkmath.NewInt(1000000000000)), sdk.NewCoin("fakedenom2", sdkmath.NewInt(1000000000000))), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom %s is not in the pair", "fakedenom1"), ExpResp: &types.Pool{}, @@ -74,7 +76,7 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error invalid deposit coin denom 2", Msg: *types.NewMsgCreatePool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin("fakedenom2", sdk.NewInt(1000000000000))), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin("fakedenom2", sdkmath.NewInt(1000000000000))), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom %s is not in the pair", "fakedenom2"), ExpResp: &types.Pool{}, @@ -85,7 +87,7 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error invalid deposit coin denom 3", Msg: *types.NewMsgCreatePool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom %s is not in the pair", "fakedenom1"), ExpResp: &types.Pool{}, @@ -96,9 +98,9 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error smaller than minimum deposit amount 1", Msg: *types.NewMsgCreatePool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1))), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1)))), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1))), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1)))), ), - ExpErr: sdkerrors.Wrapf(types.ErrInsufficientDepositAmount, "%s is smaller than %s", sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1))), sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount)), + ExpErr: sdkerrors.Wrapf(types.ErrInsufficientDepositAmount, "%s is smaller than %s", sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1))), sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount)), ExpResp: &types.Pool{}, QueryResponseIndex: 0, QueryResponse: nil, @@ -107,9 +109,9 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error smaller than minimum deposit amount 2", Msg: *types.NewMsgCreatePool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1)))), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1)))), ), - ExpErr: sdkerrors.Wrapf(types.ErrInsufficientDepositAmount, "%s is smaller than %s", sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1))), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount)), + ExpErr: sdkerrors.Wrapf(types.ErrInsufficientDepositAmount, "%s is smaller than %s", sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1))), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount)), ExpResp: &types.Pool{}, QueryResponseIndex: 0, QueryResponse: nil, @@ -120,9 +122,9 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error insufficient deposit coins", Msg: *types.NewMsgCreatePool( - appID1, addr1, dummyPair1.Id, sdk.NewCoins(sdk.NewCoin(dummyPair1.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(dummyPair1.QuoteCoinDenom, sdk.NewInt(1000000000000))), + appID1, addr1, dummyPair1.Id, sdk.NewCoins(sdk.NewCoin(dummyPair1.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(dummyPair1.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), ), - ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "0%s is smaller than 1000000000000%s", dummyPair1.QuoteCoinDenom, dummyPair1.QuoteCoinDenom), + ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "spendable balance is smaller than 1000000000000%s", dummyPair1.QuoteCoinDenom), ExpResp: &types.Pool{}, QueryResponseIndex: 0, QueryResponse: nil, @@ -133,9 +135,9 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "error insufficient pool creation fees", Msg: *types.NewMsgCreatePool( - appID1, addr1, dummyPair2.Id, sdk.NewCoins(sdk.NewCoin(dummyPair2.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(dummyPair2.QuoteCoinDenom, sdk.NewInt(1000000000000))), + appID1, addr1, dummyPair2.Id, sdk.NewCoins(sdk.NewCoin(dummyPair2.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(dummyPair2.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), ), - ExpErr: sdkerrors.Wrap(sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "0%s is smaller than %s", params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].String()), "insufficient pool creation fee"), + ExpErr: sdkerrors.Wrap(sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "spendable balance is smaller than %s", params.PoolCreationFee[0].String()), "insufficient pool creation fee"), ExpResp: &types.Pool{}, QueryResponseIndex: 0, QueryResponse: nil, @@ -144,7 +146,7 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "success valid case app1 pair1", Msg: *types.NewMsgCreatePool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), ), ExpErr: nil, ExpResp: &types.Pool{ @@ -172,12 +174,12 @@ func (s *KeeperTestSuite) TestCreatePool() { Type: types.PoolTypeBasic, Creator: addr1.String(), }, - AvailableBalance: sdk.NewCoins(sdk.NewCoin("pool1-3", amm.InitialPoolCoinSupply(sdk.NewInt(1000000000000), sdk.NewInt(1000000000000)))), + AvailableBalance: sdk.NewCoins(sdk.NewCoin("pool1-3", amm.InitialPoolCoinSupply(sdkmath.NewInt(1000000000000), sdkmath.NewInt(1000000000000)))), }, { Name: "error pool already exists", Msg: *types.NewMsgCreatePool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), ), ExpErr: types.ErrPoolAlreadyExists, ExpResp: &types.Pool{}, @@ -188,7 +190,7 @@ func (s *KeeperTestSuite) TestCreatePool() { { Name: "success valid case app2 pair1", Msg: *types.NewMsgCreatePool( - appID2, addr1, app2pair.Id, sdk.NewCoins(sdk.NewCoin(app2pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app2pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), + appID2, addr1, app2pair.Id, sdk.NewCoins(sdk.NewCoin(app2pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app2pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), ), ExpErr: nil, ExpResp: &types.Pool{ @@ -216,7 +218,7 @@ func (s *KeeperTestSuite) TestCreatePool() { Type: types.PoolTypeBasic, Creator: addr1.String(), }, - AvailableBalance: sdk.NewCoins(sdk.NewCoin("pool1-3", amm.InitialPoolCoinSupply(sdk.NewInt(1000000000000), sdk.NewInt(1000000000000))), sdk.NewCoin("pool2-1", amm.InitialPoolCoinSupply(sdk.NewInt(1000000000000), sdk.NewInt(1000000000000)))), + AvailableBalance: sdk.NewCoins(sdk.NewCoin("pool1-3", amm.InitialPoolCoinSupply(sdkmath.NewInt(1000000000000), sdkmath.NewInt(1000000000000))), sdk.NewCoin("pool2-1", amm.InitialPoolCoinSupply(sdkmath.NewInt(1000000000000), sdkmath.NewInt(1000000000000)))), }, } @@ -247,13 +249,13 @@ func (s *KeeperTestSuite) TestCreatePool() { params, err := s.keeper.GetGenericParams(s.ctx, tc.Msg.AppId) s.Require().NoError(err) - expectedPairCreationFeesCollected := sdk.NewCoin(params.PairCreationFee[0].Denom, params.PairCreationFee[0].Amount.Mul(sdk.NewInt(int64(len(s.keeper.GetAllPairs(s.ctx, tc.Msg.AppId)))))) + expectedPairCreationFeesCollected := sdk.NewCoin(params.PairCreationFee[0].Denom, params.PairCreationFee[0].Amount.Mul(sdkmath.NewInt(int64(len(s.keeper.GetAllPairs(s.ctx, tc.Msg.AppId)))))) expectedPoolCreationFeesCollected := sdk.Coin{} if tc.Msg.AppId == appID1 { - expectedPoolCreationFeesCollected = sdk.NewCoin(params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].Amount.Mul(sdk.NewInt(int64(tc.QueryResponseIndex-1)))) + expectedPoolCreationFeesCollected = sdk.NewCoin(params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].Amount.Mul(sdkmath.NewInt(int64(tc.QueryResponseIndex-1)))) } else { - expectedPoolCreationFeesCollected = sdk.NewCoin(params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].Amount.Mul(sdk.NewInt(int64(tc.QueryResponseIndex+1)))) + expectedPoolCreationFeesCollected = sdk.NewCoin(params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].Amount.Mul(sdkmath.NewInt(int64(tc.QueryResponseIndex+1)))) } collectedPairPoolCreationFee := s.getBalances(sdk.MustAccAddressFromBech32(params.FeeCollectorAddress)) @@ -377,8 +379,8 @@ func (s *KeeperTestSuite) TestDeposit() { app2Pool := s.CreateNewLiquidityPool(appID2, app2Pair.Id, addr1, "1000000000000uasset1,1000000000000uasset2") addr1AvailableBalance := sdk.NewCoins( - sdk.NewCoin(app1Pool.PoolCoinDenom, amm.InitialPoolCoinSupply(sdk.NewInt(1000000000000), sdk.NewInt(1000000000000))), - sdk.NewCoin(app2Pool.PoolCoinDenom, amm.InitialPoolCoinSupply(sdk.NewInt(1000000000000), sdk.NewInt(1000000000000))), + sdk.NewCoin(app1Pool.PoolCoinDenom, amm.InitialPoolCoinSupply(sdkmath.NewInt(1000000000000), sdkmath.NewInt(1000000000000))), + sdk.NewCoin(app2Pool.PoolCoinDenom, amm.InitialPoolCoinSupply(sdkmath.NewInt(1000000000000), sdkmath.NewInt(1000000000000))), ) testCases := []struct { @@ -393,7 +395,7 @@ func (s *KeeperTestSuite) TestDeposit() { { Name: "error app id invalid", Msg: *types.NewMsgDeposit( - 69, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdk.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdk.NewInt(100000000))), + 69, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdkmath.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdkmath.NewInt(100000000))), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidAppID, "app id %d not found", 69), ExpResp: &types.DepositRequest{}, @@ -404,7 +406,7 @@ func (s *KeeperTestSuite) TestDeposit() { { Name: "error pool id invalid", Msg: *types.NewMsgDeposit( - appID1, addr1, 69, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdk.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdk.NewInt(100000000))), + appID1, addr1, 69, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdkmath.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdkmath.NewInt(100000000))), ), ExpErr: sdkerrors.Wrapf(sdkerrors.ErrNotFound, "pool %d not found", 69), ExpResp: &types.DepositRequest{}, @@ -415,7 +417,7 @@ func (s *KeeperTestSuite) TestDeposit() { { Name: "error invalid deposit coin 1", Msg: *types.NewMsgDeposit( - appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdk.NewInt(100000000)), sdk.NewCoin("fakedenom2", sdk.NewInt(100000000))), + appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdkmath.NewInt(100000000)), sdk.NewCoin("fakedenom2", sdkmath.NewInt(100000000))), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom fakedenom1 is not in the pair"), ExpResp: &types.DepositRequest{}, @@ -426,7 +428,7 @@ func (s *KeeperTestSuite) TestDeposit() { { Name: "error invalid deposit coin 2", Msg: *types.NewMsgDeposit( - appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdk.NewInt(100000000)), sdk.NewCoin("fakedenom2", sdk.NewInt(100000000))), + appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdkmath.NewInt(100000000)), sdk.NewCoin("fakedenom2", sdkmath.NewInt(100000000))), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom fakedenom2 is not in the pair"), ExpResp: &types.DepositRequest{}, @@ -437,7 +439,7 @@ func (s *KeeperTestSuite) TestDeposit() { { Name: "error invalid deposit coin 3", Msg: *types.NewMsgDeposit( - appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdk.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdk.NewInt(100000000))), + appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdkmath.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdkmath.NewInt(100000000))), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom fakedenom1 is not in the pair"), ExpResp: &types.DepositRequest{}, @@ -448,9 +450,9 @@ func (s *KeeperTestSuite) TestDeposit() { { Name: "error insufficeint deposit coins", Msg: *types.NewMsgDeposit( - appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdk.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdk.NewInt(100000000))), + appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdkmath.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdkmath.NewInt(100000000))), ), - ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "0%s is smaller than 100000000%s", app1Pair.BaseCoinDenom, app1Pair.BaseCoinDenom), + ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "spendable balance is smaller than 100000000%s", app1Pair.BaseCoinDenom), ExpResp: &types.DepositRequest{}, QueryResponseIndex: 0, QueryResponse: nil, @@ -459,7 +461,7 @@ func (s *KeeperTestSuite) TestDeposit() { { Name: "success valid case 1 app1 pool1", Msg: *types.NewMsgDeposit( - appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdk.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdk.NewInt(100000000))), + appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdkmath.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdkmath.NewInt(100000000))), ), ExpErr: nil, ExpResp: &types.DepositRequest{ @@ -467,20 +469,20 @@ func (s *KeeperTestSuite) TestDeposit() { PoolId: 1, MsgHeight: 0, Depositor: addr1.String(), - DepositCoins: sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdk.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdk.NewInt(100000000))), + DepositCoins: sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdkmath.NewInt(100000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdkmath.NewInt(100000000))), AcceptedCoins: nil, - MintedPoolCoin: sdk.NewCoin(app1Pool.PoolCoinDenom, sdk.NewInt(0)), + MintedPoolCoin: sdk.NewCoin(app1Pool.PoolCoinDenom, sdkmath.NewInt(0)), Status: types.RequestStatusNotExecuted, AppId: appID1, }, QueryResponseIndex: 0, QueryResponse: nil, - AvailableBalance: addr1AvailableBalance.Add(sdk.NewCoin(app1Pool.PoolCoinDenom, sdk.NewInt(1000000000))), + AvailableBalance: addr1AvailableBalance.Add(sdk.NewCoin(app1Pool.PoolCoinDenom, sdkmath.NewInt(1000000000))), }, { Name: "success valid case 2 app1 pool1", Msg: *types.NewMsgDeposit( - appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdk.NewInt(300000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdk.NewInt(300000000))), + appID1, addr1, app1Pool.Id, sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdkmath.NewInt(300000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdkmath.NewInt(300000000))), ), ExpErr: nil, ExpResp: &types.DepositRequest{ @@ -488,20 +490,20 @@ func (s *KeeperTestSuite) TestDeposit() { PoolId: 1, MsgHeight: 0, Depositor: addr1.String(), - DepositCoins: sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdk.NewInt(300000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdk.NewInt(300000000))), + DepositCoins: sdk.NewCoins(sdk.NewCoin(app1Pair.BaseCoinDenom, sdkmath.NewInt(300000000)), sdk.NewCoin(app1Pair.QuoteCoinDenom, sdkmath.NewInt(300000000))), AcceptedCoins: nil, - MintedPoolCoin: sdk.NewCoin(app1Pool.PoolCoinDenom, sdk.NewInt(0)), + MintedPoolCoin: sdk.NewCoin(app1Pool.PoolCoinDenom, sdkmath.NewInt(0)), Status: types.RequestStatusNotExecuted, AppId: appID1, }, QueryResponseIndex: 0, QueryResponse: nil, - AvailableBalance: addr1AvailableBalance.Add(sdk.NewCoin(app1Pool.PoolCoinDenom, sdk.NewInt(3999999999))), + AvailableBalance: addr1AvailableBalance.Add(sdk.NewCoin(app1Pool.PoolCoinDenom, sdkmath.NewInt(3999999999))), }, { Name: "success valid case 3 app2 pool1", Msg: *types.NewMsgDeposit( - appID2, addr1, app2Pool.Id, sdk.NewCoins(sdk.NewCoin(app2Pair.BaseCoinDenom, sdk.NewInt(100000000)), sdk.NewCoin(app2Pair.QuoteCoinDenom, sdk.NewInt(100000000))), + appID2, addr1, app2Pool.Id, sdk.NewCoins(sdk.NewCoin(app2Pair.BaseCoinDenom, sdkmath.NewInt(100000000)), sdk.NewCoin(app2Pair.QuoteCoinDenom, sdkmath.NewInt(100000000))), ), ExpErr: nil, ExpResp: &types.DepositRequest{ @@ -509,20 +511,20 @@ func (s *KeeperTestSuite) TestDeposit() { PoolId: 1, MsgHeight: 0, Depositor: addr1.String(), - DepositCoins: sdk.NewCoins(sdk.NewCoin(app2Pair.BaseCoinDenom, sdk.NewInt(100000000)), sdk.NewCoin(app2Pair.QuoteCoinDenom, sdk.NewInt(100000000))), + DepositCoins: sdk.NewCoins(sdk.NewCoin(app2Pair.BaseCoinDenom, sdkmath.NewInt(100000000)), sdk.NewCoin(app2Pair.QuoteCoinDenom, sdkmath.NewInt(100000000))), AcceptedCoins: nil, - MintedPoolCoin: sdk.NewCoin(app2Pool.PoolCoinDenom, sdk.NewInt(0)), + MintedPoolCoin: sdk.NewCoin(app2Pool.PoolCoinDenom, sdkmath.NewInt(0)), Status: types.RequestStatusNotExecuted, AppId: appID2, }, QueryResponseIndex: 0, QueryResponse: nil, - AvailableBalance: addr1AvailableBalance.Add(sdk.NewCoin(app1Pool.PoolCoinDenom, sdk.NewInt(3999999999))).Add(sdk.NewCoin(app2Pool.PoolCoinDenom, sdk.NewInt(1000000000))), + AvailableBalance: addr1AvailableBalance.Add(sdk.NewCoin(app1Pool.PoolCoinDenom, sdkmath.NewInt(3999999999))).Add(sdk.NewCoin(app2Pool.PoolCoinDenom, sdkmath.NewInt(1000000000))), }, { Name: "success valid case 4 app2 pool1", Msg: *types.NewMsgDeposit( - appID2, addr1, app2Pool.Id, sdk.NewCoins(sdk.NewCoin(app2Pair.BaseCoinDenom, sdk.NewInt(700000000)), sdk.NewCoin(app2Pair.QuoteCoinDenom, sdk.NewInt(700000000))), + appID2, addr1, app2Pool.Id, sdk.NewCoins(sdk.NewCoin(app2Pair.BaseCoinDenom, sdkmath.NewInt(700000000)), sdk.NewCoin(app2Pair.QuoteCoinDenom, sdkmath.NewInt(700000000))), ), ExpErr: nil, ExpResp: &types.DepositRequest{ @@ -530,15 +532,15 @@ func (s *KeeperTestSuite) TestDeposit() { PoolId: 1, MsgHeight: 0, Depositor: addr1.String(), - DepositCoins: sdk.NewCoins(sdk.NewCoin(app2Pair.BaseCoinDenom, sdk.NewInt(700000000)), sdk.NewCoin(app2Pair.QuoteCoinDenom, sdk.NewInt(700000000))), + DepositCoins: sdk.NewCoins(sdk.NewCoin(app2Pair.BaseCoinDenom, sdkmath.NewInt(700000000)), sdk.NewCoin(app2Pair.QuoteCoinDenom, sdkmath.NewInt(700000000))), AcceptedCoins: nil, - MintedPoolCoin: sdk.NewCoin(app2Pool.PoolCoinDenom, sdk.NewInt(0)), + MintedPoolCoin: sdk.NewCoin(app2Pool.PoolCoinDenom, sdkmath.NewInt(0)), Status: types.RequestStatusNotExecuted, AppId: appID2, }, QueryResponseIndex: 0, QueryResponse: nil, - AvailableBalance: addr1AvailableBalance.Add(sdk.NewCoin(app1Pool.PoolCoinDenom, sdk.NewInt(3999999999))).Add(sdk.NewCoin(app2Pool.PoolCoinDenom, sdk.NewInt(7999999999))), + AvailableBalance: addr1AvailableBalance.Add(sdk.NewCoin(app1Pool.PoolCoinDenom, sdkmath.NewInt(3999999999))).Add(sdk.NewCoin(app2Pool.PoolCoinDenom, sdkmath.NewInt(7999999999))), }, } @@ -734,7 +736,7 @@ func (s *KeeperTestSuite) TestWithdraw() { Msg: *types.NewMsgWithdraw( appID1, addr1, pool.Id, availablePoolBalance.Add(sdk.NewCoin(availablePoolBalance.Denom, availablePoolBalance.Amount.Add(newInt(1000)))), ), - ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "%s is smaller than %s", availablePoolBalance.String(), availablePoolBalance.Add(sdk.NewCoin(availablePoolBalance.Denom, availablePoolBalance.Amount.Add(newInt(1000)))).String()), + ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "spendable balance %s is smaller than %s", availablePoolBalance.String(), availablePoolBalance.Add(sdk.NewCoin(availablePoolBalance.Denom, availablePoolBalance.Amount.Add(newInt(1000)))).String()), ExpResp: &types.WithdrawRequest{}, AvailableBalance: sdk.NewCoins(), }, @@ -940,8 +942,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { Name: "error app id invalid", Msg: *types.NewMsgCreateRangedPool( 69, addr1, app1pair.Id, - sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidAppID, "app id %d not found", 69), ExpResp: &types.Pool{}, @@ -953,8 +955,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { Name: "error pair id invalid", Msg: *types.NewMsgCreateRangedPool( appID1, addr1, 12, - sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: sdkerrors.Wrapf(sdkerrors.ErrNotFound, "pair %d not found", 12), ExpResp: &types.Pool{}, @@ -966,8 +968,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { Name: "error invalid deposit coin denom 1", Msg: *types.NewMsgCreateRangedPool( appID1, addr1, app1pair.Id, - sdk.NewCoins(sdk.NewCoin("fakedenom1", sdk.NewInt(1000000000000)), sdk.NewCoin("fakedenom2", sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + sdk.NewCoins(sdk.NewCoin("fakedenom1", sdkmath.NewInt(1000000000000)), sdk.NewCoin("fakedenom2", sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom %s is not in the pair", "fakedenom1"), ExpResp: &types.Pool{}, @@ -978,8 +980,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "error invalid deposit coin denom 2", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin("fakedenom2", sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin("fakedenom2", sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom %s is not in the pair", "fakedenom2"), ExpResp: &types.Pool{}, @@ -990,8 +992,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "error invalid deposit coin denom 3", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin("fakedenom1", sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: sdkerrors.Wrapf(types.ErrInvalidCoinDenom, "coin denom %s is not in the pair", "fakedenom1"), ExpResp: &types.Pool{}, @@ -1002,8 +1004,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "error smaller than minimum deposit amount 1", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1))), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1)))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1))), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1)))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: types.ErrInsufficientDepositAmount, ExpResp: &types.Pool{}, @@ -1014,8 +1016,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "error smaller than minimum deposit amount 2", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1)))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1)))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: types.ErrInsufficientDepositAmount, ExpResp: &types.Pool{}, @@ -1026,8 +1028,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "error initial price lower than min price", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1)))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("0.98"), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1)))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("0.98"), ), ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "initial price must not be lower than min price"), ExpResp: &types.Pool{}, @@ -1038,8 +1040,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "error initial price higher than max price", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdk.NewInt(1)))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1.05"), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, params.MinInitialDepositAmount), sdk.NewCoin(app1pair.QuoteCoinDenom, params.MinInitialDepositAmount.Sub(sdkmath.NewInt(1)))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1.05"), ), ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "initial price must not be higher than max price"), ExpResp: &types.Pool{}, @@ -1052,10 +1054,10 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "error insufficient deposit coins", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, dummyPair1.Id, sdk.NewCoins(sdk.NewCoin(dummyPair1.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(dummyPair1.QuoteCoinDenom, sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + appID1, addr1, dummyPair1.Id, sdk.NewCoins(sdk.NewCoin(dummyPair1.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(dummyPair1.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), - ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "0%s is smaller than 1000000000000%s", dummyPair1.QuoteCoinDenom, dummyPair1.QuoteCoinDenom), + ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "spendable balance is smaller than 1000000000000%s", dummyPair1.QuoteCoinDenom), ExpResp: &types.Pool{}, QueryResponseIndex: 0, QueryResponse: nil, @@ -1066,10 +1068,10 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "error insufficient pool creation fees", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, dummyPair2.Id, sdk.NewCoins(sdk.NewCoin(dummyPair2.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(dummyPair2.QuoteCoinDenom, sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + appID1, addr1, dummyPair2.Id, sdk.NewCoins(sdk.NewCoin(dummyPair2.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(dummyPair2.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), - ExpErr: sdkerrors.Wrap(sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "0%s is smaller than %s", params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].String()), "insufficient pool creation fee"), + ExpErr: sdkerrors.Wrap(sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "spendable balance is smaller than %s", params.PoolCreationFee[0].String()), "insufficient pool creation fee"), ExpResp: &types.Pool{}, QueryResponseIndex: 0, QueryResponse: nil, @@ -1078,8 +1080,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { { Name: "success valid case app1 pair1 pool1", Msg: *types.NewMsgCreateRangedPool( - appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + appID1, addr1, app1pair.Id, sdk.NewCoins(sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app1pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: nil, ExpResp: &types.Pool{ @@ -1108,16 +1110,16 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { Creator: addr1.String(), }, AvailableBalance: sdk.NewCoins( - sdk.NewCoin("pool1-3", amm.InitialPoolCoinSupply(sdk.NewInt(1000000000000), sdk.NewInt(1000000000000))), - sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(9925681617)), + sdk.NewCoin("pool1-3", amm.InitialPoolCoinSupply(sdkmath.NewInt(1000000000000), sdkmath.NewInt(1000000000000))), + sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(9925681617)), ), }, { Name: "success valid case app2 pair1", Msg: *types.NewMsgCreateRangedPool( appID2, addr1, app2pair.Id, - sdk.NewCoins(sdk.NewCoin(app2pair.BaseCoinDenom, sdk.NewInt(1000000000000)), sdk.NewCoin(app2pair.QuoteCoinDenom, sdk.NewInt(1000000000000))), - sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1"), + sdk.NewCoins(sdk.NewCoin(app2pair.BaseCoinDenom, sdkmath.NewInt(1000000000000)), sdk.NewCoin(app2pair.QuoteCoinDenom, sdkmath.NewInt(1000000000000))), + sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1"), ), ExpErr: nil, ExpResp: &types.Pool{ @@ -1146,8 +1148,8 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { Creator: addr1.String(), }, AvailableBalance: sdk.NewCoins( - sdk.NewCoin("pool2-1", amm.InitialPoolCoinSupply(sdk.NewInt(1000000000000), sdk.NewInt(1000000000000))), - sdk.NewCoin(app1pair.BaseCoinDenom, sdk.NewInt(9925681617)), + sdk.NewCoin("pool2-1", amm.InitialPoolCoinSupply(sdkmath.NewInt(1000000000000), sdkmath.NewInt(1000000000000))), + sdk.NewCoin(app1pair.BaseCoinDenom, sdkmath.NewInt(9925681617)), ), }, } @@ -1186,13 +1188,13 @@ func (s *KeeperTestSuite) TestCreateRangedPool() { params, err := s.keeper.GetGenericParams(s.ctx, tc.Msg.AppId) s.Require().NoError(err) - expectedPairCreationFeesCollected := sdk.NewCoin(params.PairCreationFee[0].Denom, params.PairCreationFee[0].Amount.Mul(sdk.NewInt(int64(len(s.keeper.GetAllPairs(s.ctx, tc.Msg.AppId)))))) + expectedPairCreationFeesCollected := sdk.NewCoin(params.PairCreationFee[0].Denom, params.PairCreationFee[0].Amount.Mul(sdkmath.NewInt(int64(len(s.keeper.GetAllPairs(s.ctx, tc.Msg.AppId)))))) expectedPoolCreationFeesCollected := sdk.Coin{} if tc.Msg.AppId == appID1 { - expectedPoolCreationFeesCollected = sdk.NewCoin(params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].Amount.Mul(sdk.NewInt(int64(tc.QueryResponseIndex-1)))) + expectedPoolCreationFeesCollected = sdk.NewCoin(params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].Amount.Mul(sdkmath.NewInt(int64(tc.QueryResponseIndex-1)))) } else { - expectedPoolCreationFeesCollected = sdk.NewCoin(params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].Amount.Mul(sdk.NewInt(int64(tc.QueryResponseIndex+1)))) + expectedPoolCreationFeesCollected = sdk.NewCoin(params.PoolCreationFee[0].Denom, params.PoolCreationFee[0].Amount.Mul(sdkmath.NewInt(int64(tc.QueryResponseIndex+1)))) } collectedPairPoolCreationFee := s.getBalances(sdk.MustAccAddressFromBech32(params.FeeCollectorAddress)) @@ -1247,26 +1249,26 @@ func (s *KeeperTestSuite) Test1MaximumRangePoolInPair() { pair := s.CreateNewLiquidityPair(appID1, addr1, asset1.Denom, asset2.Denom) // maximum 20 pool can be created in each pair - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) params, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) @@ -1275,7 +1277,7 @@ func (s *KeeperTestSuite) Test1MaximumRangePoolInPair() { s.fundAddr(addr1, params.PoolCreationFee) s.fundAddr(addr1, parsedDepositCoins) - msg := types.NewMsgCreateRangedPool(appID1, addr1, pair.Id, parsedDepositCoins, sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) + msg := types.NewMsgCreateRangedPool(appID1, addr1, pair.Id, parsedDepositCoins, sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) _, err = s.keeper.CreateRangedPool(s.ctx, msg) s.Require().EqualError(types.ErrTooManyPools, err.Error()) } @@ -1289,25 +1291,25 @@ func (s *KeeperTestSuite) Test2MaximumRangePoolInPair() { pair := s.CreateNewLiquidityPair(appID1, addr1, asset1.Denom, asset2.Denom) // maximum 20 pool can be created in each pair - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) _ = s.CreateNewLiquidityPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2") @@ -1318,7 +1320,7 @@ func (s *KeeperTestSuite) Test2MaximumRangePoolInPair() { s.fundAddr(addr1, params.PoolCreationFee) s.fundAddr(addr1, parsedDepositCoins) - msg := types.NewMsgCreateRangedPool(appID1, addr1, pair.Id, parsedDepositCoins, sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) + msg := types.NewMsgCreateRangedPool(appID1, addr1, pair.Id, parsedDepositCoins, sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) _, err = s.keeper.CreateRangedPool(s.ctx, msg) s.Require().EqualError(types.ErrTooManyPools, err.Error()) } @@ -1332,26 +1334,26 @@ func (s *KeeperTestSuite) Test3MaximumRangePoolInPair() { pair := s.CreateNewLiquidityPair(appID1, addr1, asset1.Denom, asset2.Denom) // maximum 20 pool can be created in each pair - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000000uasset1,1000000uasset2", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) params, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) @@ -1375,20 +1377,20 @@ func (s *KeeperTestSuite) TestRangedPoolDepositWithdraw() { pool := s.CreateNewLiquidityRangedPool(appID1, pair.Id, s.addr(1), "1000000denom1,1000000denom2", utils.ParseDec("0.5"), utils.ParseDec("2.0"), utils.ParseDec("1.0")) rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) s.Require().True(utils.DecApproxEqual(ammPool.Price(), utils.ParseDec("1.0"))) s.Deposit(appID1, pool.Id, s.addr(2), "400000denom1,1000000denom2") liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) rx, ry = s.keeper.GetPoolBalances(s.ctx, pool) - ammPool = pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool = pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) s.Require().True(utils.DecApproxEqual(ammPool.Price(), utils.ParseDec("1.0"))) poolCoin := s.getBalance(s.addr(2), pool.PoolCoinDenom) s.Withdraw(appID1, pool.Id, s.addr(2), poolCoin.SubAmount(poolCoin.Amount.QuoRaw(3))) // withdraw 2/3 pool coin liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) rx, ry = s.keeper.GetPoolBalances(s.ctx, pool) - ammPool = pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool = pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) s.Require().True(utils.DecApproxEqual(ammPool.Price(), utils.ParseDec("1.0"))) } @@ -1402,8 +1404,8 @@ func (s *KeeperTestSuite) TestRangedPoolDepositWithdraw_single_side() { pool := s.CreateNewLiquidityRangedPool(appID1, pair.Id, s.addr(1), "1000000denom1", utils.ParseDec("0.5"), utils.ParseDec("2.0"), utils.ParseDec("0.5")) rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - s.Require().True(intEq(sdk.ZeroInt(), rx.Amount)) - s.Require().True(intEq(sdk.NewInt(1000000), ry.Amount)) + s.Require().True(intEq(sdkmath.ZeroInt(), rx.Amount)) + s.Require().True(intEq(sdkmath.NewInt(1000000), ry.Amount)) ps := s.keeper.GetPoolCoinSupply(s.ctx, pool) s.Deposit(appID1, pool.Id, s.addr(2), "50000denom1") @@ -1412,8 +1414,8 @@ func (s *KeeperTestSuite) TestRangedPoolDepositWithdraw_single_side() { pc := s.getBalance(s.addr(2), pool.PoolCoinDenom) rx, ry = s.keeper.GetPoolBalances(s.ctx, pool) - s.Require().True(intEq(sdk.ZeroInt(), rx.Amount)) - s.Require().True(intEq(sdk.NewInt(1050000), ry.Amount)) + s.Require().True(intEq(sdkmath.ZeroInt(), rx.Amount)) + s.Require().True(intEq(sdkmath.NewInt(1050000), ry.Amount)) s.Require().True(intEq(ps.QuoRaw(20), pc.Amount)) balanceBefore := s.getBalance(s.addr(2), "denom1") @@ -1421,13 +1423,13 @@ func (s *KeeperTestSuite) TestRangedPoolDepositWithdraw_single_side() { s.nextBlock() balanceAfter := s.getBalance(s.addr(2), "denom1") - s.Require().True(balanceAfter.Sub(balanceBefore).Amount.Sub(sdk.NewInt(50000)).LTE(sdk.OneInt())) + s.Require().True(balanceAfter.Sub(balanceBefore).Amount.Sub(sdkmath.NewInt(50000)).LTE(sdkmath.OneInt())) s.Deposit(appID1, pool.Id, s.addr(3), "1000000denom1,1000000denom2") s.nextBlock() - s.Require().True(intEq(sdk.ZeroInt(), s.getBalance(s.addr(3), "denom1").Amount)) - s.Require().True(intEq(sdk.NewInt(1000000), s.getBalance(s.addr(3), "denom2").Amount)) + s.Require().True(intEq(sdkmath.ZeroInt(), s.getBalance(s.addr(3), "denom1").Amount)) + s.Require().True(intEq(sdkmath.NewInt(1000000), s.getBalance(s.addr(3), "denom2").Amount)) } func (s *KeeperTestSuite) TestRangedPoolDepositWithdraw_single_side2() { @@ -1440,8 +1442,8 @@ func (s *KeeperTestSuite) TestRangedPoolDepositWithdraw_single_side2() { pool := s.CreateNewLiquidityRangedPool(appID1, pair.Id, s.addr(1), "1000000denom2", utils.ParseDec("0.5"), utils.ParseDec("2.0"), utils.ParseDec("2.0")) rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - s.Require().True(intEq(sdk.NewInt(1000000), rx.Amount)) - s.Require().True(intEq(sdk.ZeroInt(), ry.Amount)) + s.Require().True(intEq(sdkmath.NewInt(1000000), rx.Amount)) + s.Require().True(intEq(sdkmath.ZeroInt(), ry.Amount)) ps := s.keeper.GetPoolCoinSupply(s.ctx, pool) s.Deposit(appID1, pool.Id, s.addr(2), "50000denom2") @@ -1450,8 +1452,8 @@ func (s *KeeperTestSuite) TestRangedPoolDepositWithdraw_single_side2() { pc := s.getBalance(s.addr(2), pool.PoolCoinDenom) rx, ry = s.keeper.GetPoolBalances(s.ctx, pool) - s.Require().True(intEq(sdk.NewInt(1050000), rx.Amount)) - s.Require().True(intEq(sdk.ZeroInt(), ry.Amount)) + s.Require().True(intEq(sdkmath.NewInt(1050000), rx.Amount)) + s.Require().True(intEq(sdkmath.ZeroInt(), ry.Amount)) s.Require().True(intEq(ps.QuoRaw(20), pc.Amount)) balanceBefore := s.getBalance(s.addr(2), "denom2") @@ -1459,13 +1461,13 @@ func (s *KeeperTestSuite) TestRangedPoolDepositWithdraw_single_side2() { s.nextBlock() balanceAfter := s.getBalance(s.addr(2), "denom2") - s.Require().True(balanceAfter.Sub(balanceBefore).Amount.Sub(sdk.NewInt(50000)).LTE(sdk.OneInt())) + s.Require().True(balanceAfter.Sub(balanceBefore).Amount.Sub(sdkmath.NewInt(50000)).LTE(sdkmath.OneInt())) s.Deposit(appID1, pool.Id, s.addr(3), "1000000denom1,1000000denom2") s.nextBlock() - s.Require().True(intEq(sdk.ZeroInt(), s.getBalance(s.addr(3), "denom2").Amount)) - s.Require().True(intEq(sdk.NewInt(1000000), s.getBalance(s.addr(3), "denom1").Amount)) + s.Require().True(intEq(sdkmath.ZeroInt(), s.getBalance(s.addr(3), "denom2").Amount)) + s.Require().True(intEq(sdkmath.NewInt(1000000), s.getBalance(s.addr(3), "denom1").Amount)) } func (s *KeeperTestSuite) TestTransferFundsForSwapFeeDistribution_OnlyBasicPool() { @@ -1480,13 +1482,13 @@ func (s *KeeperTestSuite) TestTransferFundsForSwapFeeDistribution_OnlyBasicPool( s.keeper.SetPair(s.ctx, pair) p1 := s.CreateNewLiquidityPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor") - s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdk.NewInt(30_000000), 0) - s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdk.NewInt(54_000000), 0) - s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdk.NewInt(17_000000), 0) + s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(30_000000), 0) + s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(54_000000), 0) + s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(17_000000), 0) - s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdk.NewInt(12_000000), 0) - s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdk.NewInt(19_000000), 0) - s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdk.NewInt(23_000000), 0) + s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(12_000000), 0) + s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(19_000000), 0) + s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(23_000000), 0) params, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) @@ -1515,15 +1517,15 @@ func (s *KeeperTestSuite) TestTransferFundsForSwapFeeDistribution_OnlyRangedPool pair := s.CreateNewLiquidityPair(appID1, addr1, asset1.Denom, asset2.Denom) pair.LastPrice = utils.ParseDecP("1.01") s.keeper.SetPair(s.ctx, pair) - p1 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) + p1 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) - s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdk.NewInt(30_000000), 0) - s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdk.NewInt(54_000000), 0) - s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdk.NewInt(17_000000), 0) + s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(30_000000), 0) + s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(54_000000), 0) + s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(17_000000), 0) - s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdk.NewInt(12_000000), 0) - s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdk.NewInt(19_000000), 0) - s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdk.NewInt(23_000000), 0) + s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(12_000000), 0) + s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(19_000000), 0) + s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(23_000000), 0) params, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) @@ -1554,17 +1556,17 @@ func (s *KeeperTestSuite) TestTransferFundsForSwapFeeDistribution_MultiplePools( s.keeper.SetPair(s.ctx, pair) p1 := s.CreateNewLiquidityPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor") // the given deposit amount is not the actuall deposit amout, it will be decided by the protocal based on the min,max and initial prices of ranged pools - p2 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - p3 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdk.MustNewDecFromStr("0.90"), sdk.MustNewDecFromStr("1.1"), sdk.MustNewDecFromStr("1")) - p4 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1")) + p2 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + p3 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdkmath.LegacyMustNewDecFromStr("0.90"), sdkmath.LegacyMustNewDecFromStr("1.1"), sdkmath.LegacyMustNewDecFromStr("1")) + p4 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1")) - s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdk.NewInt(30_000000), 0) - s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdk.NewInt(54_000000), 0) - s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdk.NewInt(17_000000), 0) + s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(30_000000), 0) + s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(54_000000), 0) + s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(17_000000), 0) - s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdk.NewInt(12_000000), 0) - s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdk.NewInt(19_000000), 0) - s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdk.NewInt(23_000000), 0) + s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(12_000000), 0) + s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(19_000000), 0) + s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(23_000000), 0) params, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) @@ -1603,15 +1605,15 @@ func (s *KeeperTestSuite) TestTransferFundsForSwapFeeDistribution_WithBurnRate() pair := s.CreateNewLiquidityPair(appID1, addr1, asset1.Denom, asset2.Denom) pair.LastPrice = utils.ParseDecP("1.01") s.keeper.SetPair(s.ctx, pair) - p1 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) + p1 := s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) - s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdk.NewInt(30_000000), 0) - s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdk.NewInt(54_000000), 0) - s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdk.NewInt(17_000000), 0) + s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(30_000000), 0) + s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(54_000000), 0) + s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(17_000000), 0) - s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdk.NewInt(12_000000), 0) - s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdk.NewInt(19_000000), 0) - s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdk.NewInt(23_000000), 0) + s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(12_000000), 0) + s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(19_000000), 0) + s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(23_000000), 0) params, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) @@ -1623,7 +1625,7 @@ func (s *KeeperTestSuite) TestTransferFundsForSwapFeeDistribution_WithBurnRate() accumulatedSwapFee := s.getBalances(pair.GetSwapFeeCollectorAddress()) s.Require().True(coinsEq(utils.ParseCoins("162000ucmdx,306613uharbor"), accumulatedSwapFee)) - params.SwapFeeBurnRate = sdk.MustNewDecFromStr("0.5") + params.SwapFeeBurnRate = sdkmath.LegacyMustNewDecFromStr("0.5") s.keeper.SetGenericParams(s.ctx, params) receivedSwapFunds, err := s.keeper.TransferFundsForSwapFeeDistribution(s.ctx, appID1, p1.Id) diff --git a/x/liquidity/keeper/rewards.go b/x/liquidity/keeper/rewards.go index 623f9d603..8d297ef05 100644 --- a/x/liquidity/keeper/rewards.go +++ b/x/liquidity/keeper/rewards.go @@ -5,6 +5,7 @@ import ( "strconv" "time" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -15,18 +16,18 @@ import ( rewardstypes "github.com/comdex-official/comdex/x/rewards/types" ) -func (k Keeper) CalcAssetPrice(ctx sdk.Context, id uint64, amt sdk.Int) (price sdk.Dec, err error) { +func (k Keeper) CalcAssetPrice(ctx sdk.Context, id uint64, amt sdkmath.Int) (price sdkmath.LegacyDec, err error) { asset, found := k.assetKeeper.GetAsset(ctx, id) if !found { - return sdk.ZeroDec(), assettypes.ErrorAssetDoesNotExist + return sdkmath.LegacyZeroDec(), assettypes.ErrorAssetDoesNotExist } twa, found := k.marketKeeper.GetTwa(ctx, id) if found && twa.Twa > 0 { - numerator := sdk.NewDecFromInt(amt).Mul(sdk.NewDecFromInt(sdk.NewIntFromUint64(twa.Twa))) - denominator := sdk.NewDecFromInt(asset.Decimals) + numerator := sdkmath.LegacyNewDecFromInt(amt).Mul(sdkmath.LegacyNewDecFromInt(sdkmath.NewIntFromUint64(twa.Twa))) + denominator := sdkmath.LegacyNewDecFromInt(asset.Decimals) return numerator.Quo(denominator), nil } - return sdk.ZeroDec(), markettypes.ErrorPriceNotActive + return sdkmath.LegacyZeroDec(), markettypes.ErrorPriceNotActive } func (k Keeper) GetPoolTokenDesrializerKit(ctx sdk.Context, appID, poolID uint64) (types.PoolTokenDeserializerKit, error) { @@ -57,11 +58,11 @@ func (k Keeper) GetPoolTokenDesrializerKit(ctx sdk.Context, appID, poolID uint64 return deserializerKit, nil } -func (k Keeper) CalculateXYFromPoolCoin(ctx sdk.Context, deserializerKit types.PoolTokenDeserializerKit, poolCoin sdk.Coin) (sdk.Int, sdk.Int, error) { +func (k Keeper) CalculateXYFromPoolCoin(ctx sdk.Context, deserializerKit types.PoolTokenDeserializerKit, poolCoin sdk.Coin) (sdkmath.Int, sdkmath.Int, error) { // amm.Withdraw implemets the actual logic for pool token ratio calculation - x, y := amm.Withdraw(deserializerKit.QuoteCoinPoolBalance.Amount, deserializerKit.BaseCoinPoolBalance.Amount, deserializerKit.PoolCoinSupply, poolCoin.Amount, sdk.ZeroDec()) + x, y := amm.Withdraw(deserializerKit.QuoteCoinPoolBalance.Amount, deserializerKit.BaseCoinPoolBalance.Amount, deserializerKit.PoolCoinSupply, poolCoin.Amount, sdkmath.LegacyZeroDec()) if x.IsZero() && y.IsZero() { - return sdk.NewInt(0), sdk.NewInt(0), types.ErrCalculatedPoolAmountIsZero + return sdkmath.NewInt(0), sdkmath.NewInt(0), types.ErrCalculatedPoolAmountIsZero } return x, y, nil } @@ -72,10 +73,10 @@ func (k Keeper) DeserializePoolCoinHelper(ctx sdk.Context, appID, poolID, poolCo return nil, err } - poolCoin := sdk.NewCoin(deserializerKit.Pool.PoolCoinDenom, sdk.NewInt(int64(poolCoinAmount))) + poolCoin := sdk.NewCoin(deserializerKit.Pool.PoolCoinDenom, sdkmath.NewInt(int64(poolCoinAmount))) x, y, err := k.CalculateXYFromPoolCoin(ctx, deserializerKit, poolCoin) if err != nil { - return []sdk.Coin{sdk.NewCoin(deserializerKit.Pair.QuoteCoinDenom, sdk.NewInt(0)), sdk.NewCoin(deserializerKit.Pair.BaseCoinDenom, sdk.NewInt(0))}, nil + return []sdk.Coin{sdk.NewCoin(deserializerKit.Pair.QuoteCoinDenom, sdkmath.NewInt(0)), sdk.NewCoin(deserializerKit.Pair.BaseCoinDenom, sdkmath.NewInt(0))}, nil } quoteCoin := sdk.NewCoin(deserializerKit.Pair.QuoteCoinDenom, x) baseCoin := sdk.NewCoin(deserializerKit.Pair.BaseCoinDenom, y) @@ -112,8 +113,8 @@ func (k Keeper) GetAssetWhoseOraclePriceExists(ctx sdk.Context, quoteCoinDenom, return asset, nil } -func (k Keeper) GetAggregatedChildPoolContributions(ctx sdk.Context, appID uint64, poolIds []uint64, masterPoolSupplyAddresses []sdk.AccAddress) map[string]sdk.Dec { - poolSupplyData := make(map[string]sdk.Dec) +func (k Keeper) GetAggregatedChildPoolContributions(ctx sdk.Context, appID uint64, poolIds []uint64, masterPoolSupplyAddresses []sdk.AccAddress) map[string]sdkmath.LegacyDec { + poolSupplyData := make(map[string]sdkmath.LegacyDec) for _, poolID := range poolIds { deserializerKit, err := k.GetPoolTokenDesrializerKit(ctx, appID, poolID) @@ -139,7 +140,7 @@ func (k Keeper) GetAggregatedChildPoolContributions(ctx sdk.Context, appID uint6 quoteCoin := sdk.NewCoin(pair.QuoteCoinDenom, x) baseCoin := sdk.NewCoin(pair.BaseCoinDenom, y) - var assetAmount sdk.Int + var assetAmount sdkmath.Int if pair.QuoteCoinDenom == asset.Denom { assetAmount = quoteCoin.Amount @@ -147,7 +148,7 @@ func (k Keeper) GetAggregatedChildPoolContributions(ctx sdk.Context, appID uint6 assetAmount = baseCoin.Amount } value, _ := k.CalcAssetPrice(ctx, asset.Id, assetAmount) - value = value.Mul(sdk.NewDec(2)) // multiplying the calculated value of sigle asset with 2, since we have 50-50 pools. + value = value.Mul(sdkmath.LegacyNewDec(2)) // multiplying the calculated value of sigle asset with 2, since we have 50-50 pools. _, found = poolSupplyData[address.String()] if !found { poolSupplyData[address.String()] = value @@ -174,7 +175,7 @@ func (k Keeper) GetFarmingRewardsData(ctx sdk.Context, appID uint64, coinsToDist } var lpAddresses []sdk.AccAddress - var lpSupplies []sdk.Dec + var lpSupplies []sdkmath.LegacyDec activeFarmers := k.GetAllActiveFarmers(ctx, appID, pool.Id) for _, activeFarmer := range activeFarmers { @@ -189,7 +190,7 @@ func (k Keeper) GetFarmingRewardsData(ctx sdk.Context, appID uint64, coinsToDist quoteCoin := sdk.NewCoin(pair.QuoteCoinDenom, x) baseCoin := sdk.NewCoin(pair.BaseCoinDenom, y) - var assetAmount sdk.Int + var assetAmount sdkmath.Int if pair.QuoteCoinDenom == asset.Denom { assetAmount = quoteCoin.Amount @@ -197,15 +198,15 @@ func (k Keeper) GetFarmingRewardsData(ctx sdk.Context, appID uint64, coinsToDist assetAmount = baseCoin.Amount } value, _ := k.CalcAssetPrice(ctx, asset.Id, assetAmount) - value = value.Mul(sdk.NewDec(2)) // multiplying the calculated value of sigle asset with 2, since we have 50-50 pools. + value = value.Mul(sdkmath.LegacyNewDec(2)) // multiplying the calculated value of sigle asset with 2, since we have 50-50 pools. lpAddresses = append(lpAddresses, addr) lpSupplies = append(lpSupplies, value) } // Logic for master pool mechanism if liquidityGaugeData.IsMasterPool { - var childPoolSupplies []sdk.Dec - var minMasterChildPoolSupplies []sdk.Dec + var childPoolSupplies []sdkmath.LegacyDec + var minMasterChildPoolSupplies []sdkmath.LegacyDec var childPoolIds []uint64 if len(liquidityGaugeData.ChildPoolIds) == 0 { @@ -231,7 +232,7 @@ func (k Keeper) GetFarmingRewardsData(ctx sdk.Context, appID uint64, coinsToDist for _, accAddress := range lpAddresses { aggregatedSupplyValue, found := chilPoolSuppliesData[accAddress.String()] if !found { - childPoolSupplies = append(childPoolSupplies, sdk.NewDec(0)) + childPoolSupplies = append(childPoolSupplies, sdkmath.LegacyNewDec(0)) } else { childPoolSupplies = append(childPoolSupplies, aggregatedSupplyValue) } @@ -241,9 +242,9 @@ func (k Keeper) GetFarmingRewardsData(ctx sdk.Context, appID uint64, coinsToDist return nil, types.ErrSupplyValueCalculationInvalid } - totalRewardEligibleSupply := sdk.NewDec(0) + totalRewardEligibleSupply := sdkmath.LegacyNewDec(0) for i := 0; i < len(lpAddresses); i++ { - var minSupply sdk.Dec + var minSupply sdkmath.LegacyDec if lpSupplies[i].LTE(childPoolSupplies[i]) { minSupply = lpSupplies[i] } else { @@ -255,13 +256,13 @@ func (k Keeper) GetFarmingRewardsData(ctx sdk.Context, appID uint64, coinsToDist var rewardData []rewardstypes.RewardDistributionDataCollector if !totalRewardEligibleSupply.IsZero() { - multiplier := sdk.NewDecFromInt(coinsToDistribute.Amount).Quo(totalRewardEligibleSupply) + multiplier := sdkmath.LegacyNewDecFromInt(coinsToDistribute.Amount).Quo(totalRewardEligibleSupply) for index, address := range lpAddresses { if !minMasterChildPoolSupplies[index].IsZero() { calculatedReward := int64(math.Floor(minMasterChildPoolSupplies[index].Mul(multiplier).MustFloat64())) newData := new(rewardstypes.RewardDistributionDataCollector) newData.RewardReceiver = address - newData.RewardCoin = sdk.NewCoin(coinsToDistribute.Denom, sdk.NewInt(calculatedReward)) + newData.RewardCoin = sdk.NewCoin(coinsToDistribute.Denom, sdkmath.NewInt(calculatedReward)) rewardData = append(rewardData, *newData) } } @@ -272,19 +273,19 @@ func (k Keeper) GetFarmingRewardsData(ctx sdk.Context, appID uint64, coinsToDist } // Logic for non master pool gauges (external rewards), (also used for masterpool if no child pool exists) - totalRewardEligibleSupply := sdk.NewDec(0) + totalRewardEligibleSupply := sdkmath.LegacyNewDec(0) for _, supply := range lpSupplies { totalRewardEligibleSupply = totalRewardEligibleSupply.Add(supply) } var rewardData []rewardstypes.RewardDistributionDataCollector if !totalRewardEligibleSupply.IsZero() { - multiplier := sdk.NewDecFromInt(coinsToDistribute.Amount).Quo(totalRewardEligibleSupply) + multiplier := sdkmath.LegacyNewDecFromInt(coinsToDistribute.Amount).Quo(totalRewardEligibleSupply) for index, address := range lpAddresses { calculatedReward := int64(math.Floor(lpSupplies[index].Mul(multiplier).MustFloat64())) newData := new(rewardstypes.RewardDistributionDataCollector) newData.RewardReceiver = address - newData.RewardCoin = sdk.NewCoin(coinsToDistribute.Denom, sdk.NewInt(calculatedReward)) + newData.RewardCoin = sdk.NewCoin(coinsToDistribute.Denom, sdkmath.NewInt(calculatedReward)) rewardData = append(rewardData, *newData) } } @@ -397,7 +398,7 @@ func (k Keeper) Unfarm(ctx sdk.Context, msg *types.MsgUnfarm) error { return sdkerrors.Wrapf(types.ErrorFarmerNotFound, "no active farm found for given pool id %d", msg.PoolId) } - farmedCoinAmount := sdk.NewInt(0) + farmedCoinAmount := sdkmath.NewInt(0) if qfound { for _, qCoin := range queuedFarmer.QueudCoins { @@ -419,11 +420,11 @@ func (k Keeper) Unfarm(ctx sdk.Context, msg *types.MsgUnfarm) error { for i := len(queuedCoins) - 1; i >= 0; i-- { if queuedCoins[i].FarmedPoolCoin.Amount.GTE(msg.UnfarmingPoolCoin.Amount) { queuedCoins[i].FarmedPoolCoin.Amount = queuedCoins[i].FarmedPoolCoin.Amount.Sub(msg.UnfarmingPoolCoin.Amount) - msg.UnfarmingPoolCoin.Amount = sdk.NewInt(0) + msg.UnfarmingPoolCoin.Amount = sdkmath.NewInt(0) break } else { msg.UnfarmingPoolCoin.Amount = msg.UnfarmingPoolCoin.Amount.Sub(queuedCoins[i].FarmedPoolCoin.Amount) - queuedCoins[i].FarmedPoolCoin.Amount = sdk.NewInt(0) + queuedCoins[i].FarmedPoolCoin.Amount = sdkmath.NewInt(0) } } } @@ -506,7 +507,7 @@ func (k Keeper) ProcessQueuedFarmers(ctx sdk.Context, appID uint64) { for _, queuedFarmer := range queuedFarmers { activeFarmer, found := k.GetActiveFarmer(ctx, queuedFarmer.AppId, queuedFarmer.PoolId, sdk.MustAccAddressFromBech32(queuedFarmer.Farmer)) if !found { - activeFarmer = types.NewActivefarmer(queuedFarmer.AppId, queuedFarmer.PoolId, sdk.MustAccAddressFromBech32(queuedFarmer.Farmer), sdk.NewCoin(pool.PoolCoinDenom, sdk.NewInt(0))) + activeFarmer = types.NewActivefarmer(queuedFarmer.AppId, queuedFarmer.PoolId, sdk.MustAccAddressFromBech32(queuedFarmer.Farmer), sdk.NewCoin(pool.PoolCoinDenom, sdkmath.NewInt(0))) } updatedQueue := []*types.QueuedCoin{} @@ -529,8 +530,8 @@ func (k Keeper) ProcessQueuedFarmers(ctx sdk.Context, appID uint64) { } } -func (k Keeper) GetAmountFarmedForAssetID(ctx sdk.Context, appID, assetID uint64, farmer sdk.AccAddress) (sdk.Int, error) { - totalAmountFarmed := sdk.ZeroInt() +func (k Keeper) GetAmountFarmedForAssetID(ctx sdk.Context, appID, assetID uint64, farmer sdk.AccAddress) (sdkmath.Int, error) { + totalAmountFarmed := sdkmath.ZeroInt() asset, found := k.assetKeeper.GetAsset(ctx, assetID) if !found { return totalAmountFarmed, assettypes.ErrorAssetDoesNotExist diff --git a/x/liquidity/keeper/rewards_test.go b/x/liquidity/keeper/rewards_test.go index 526a01e3a..85752b79d 100644 --- a/x/liquidity/keeper/rewards_test.go +++ b/x/liquidity/keeper/rewards_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "time" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidity/types" rewardtypes "github.com/comdex-official/comdex/x/rewards/types" @@ -77,7 +78,7 @@ func (s *KeeperTestSuite) TestFarm() { { Name: "error insufficient pool denoms", Msg: *types.NewMsgFarm(appID1, pool.Id, liquidityProvider1, utils.ParseCoin("100000000000pool1-1")), - ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "10000000000pool1-1 is smaller than 100000000000pool1-1"), + ExpErr: sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "spendable balance 10000000000pool1-1 is smaller than 100000000000pool1-1"), AvailableBalance: utils.ParseCoins("10000000000pool1-1,10000000000pool2-1"), }, { @@ -1267,19 +1268,19 @@ func (s *KeeperTestSuite) TestGetAmountFarmedForAssetID() { quantityFarmed, err := s.keeper.GetAmountFarmedForAssetID(s.ctx, appID1, asset1.Id, liquidityProvider1) s.Require().NoError(err) - s.Require().Equal(sdk.NewInt(2999999997), quantityFarmed) + s.Require().Equal(sdkmath.NewInt(2999999997), quantityFarmed) quantityFarmed, err = s.keeper.GetAmountFarmedForAssetID(s.ctx, appID1, asset2.Id, liquidityProvider1) s.Require().NoError(err) - s.Require().Equal(sdk.NewInt(1999999998), quantityFarmed) + s.Require().Equal(sdkmath.NewInt(1999999998), quantityFarmed) quantityFarmed, err = s.keeper.GetAmountFarmedForAssetID(s.ctx, appID1, asset3.Id, liquidityProvider1) s.Require().NoError(err) - s.Require().Equal(sdk.NewInt(1999999998), quantityFarmed) + s.Require().Equal(sdkmath.NewInt(1999999998), quantityFarmed) quantityFarmed, err = s.keeper.GetAmountFarmedForAssetID(s.ctx, appID1, asset4.Id, liquidityProvider1) s.Require().NoError(err) - s.Require().Equal(sdk.NewInt(999999999), quantityFarmed) + s.Require().Equal(sdkmath.NewInt(999999999), quantityFarmed) } func (s *KeeperTestSuite) TestOraclePricForRewardDistrbution() { diff --git a/x/liquidity/keeper/store.go b/x/liquidity/keeper/store.go index cae6f3dba..bff881a8f 100644 --- a/x/liquidity/keeper/store.go +++ b/x/liquidity/keeper/store.go @@ -1,7 +1,7 @@ package keeper import ( - gogotypes "github.com/gogo/protobuf/types" + gogotypes "github.com/cosmos/gogoproto/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/liquidity/keeper/swap.go b/x/liquidity/keeper/swap.go index 3101d87dc..12e2c413e 100644 --- a/x/liquidity/keeper/swap.go +++ b/x/liquidity/keeper/swap.go @@ -6,6 +6,7 @@ import ( "strings" "time" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -13,46 +14,46 @@ import ( "github.com/comdex-official/comdex/x/liquidity/types" ) -func CalculateSwapFeeAmount(ctx sdk.Context, params types.GenericParams, calculatedOfferCoinAmt sdk.Int) sdk.Int { - return calculatedOfferCoinAmt.ToDec().MulTruncate(params.SwapFeeRate).TruncateInt() +func CalculateSwapFeeAmount(ctx sdk.Context, params types.GenericParams, calculatedOfferCoinAmt sdkmath.Int) sdkmath.Int { + return sdkmath.LegacyNewDec(calculatedOfferCoinAmt.Int64()).MulTruncate(params.SwapFeeRate).TruncateInt() } -func (k Keeper) PriceLimits(ctx sdk.Context, lastPrice sdk.Dec, params types.GenericParams) (lowest, highest sdk.Dec) { +func (k Keeper) PriceLimits(ctx sdk.Context, lastPrice sdkmath.LegacyDec, params types.GenericParams) (lowest, highest sdkmath.LegacyDec) { return types.PriceLimits(lastPrice, params.MaxPriceLimitRatio, int(params.TickPrecision)) } // ValidateMsgLimitOrder validates types.MsgLimitOrder with state and returns // calculated offer coin and price that is fit into ticks. -func (k Keeper) ValidateMsgLimitOrder(ctx sdk.Context, msg *types.MsgLimitOrder) (offerCoin sdk.Coin, swapFeeCoin sdk.Coin, price sdk.Dec, err error) { +func (k Keeper) ValidateMsgLimitOrder(ctx sdk.Context, msg *types.MsgLimitOrder) (offerCoin sdk.Coin, swapFeeCoin sdk.Coin, price sdkmath.LegacyDec, err error) { _, found := k.assetKeeper.GetApp(ctx, msg.AppId) if !found { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrInvalidAppID, "app id %d not found", msg.AppId) } params, err := k.GetGenericParams(ctx, msg.AppId) if err != nil { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrap(err, "params retreval failed") + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrap(err, "params retreval failed") } spendable := k.bankKeeper.SpendableCoins(ctx, msg.GetOrderer()) if spendableAmt := spendable.AmountOf(msg.OfferCoin.Denom); spendableAmt.LT(msg.OfferCoin.Amount) { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf( + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf( sdkerrors.ErrInsufficientFunds, "%s is smaller than %s", sdk.NewCoin(msg.OfferCoin.Denom, spendableAmt), msg.OfferCoin) } if msg.OrderLifespan > params.MaxOrderLifespan { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrTooLongOrderLifespan, "%s is longer than %s", msg.OrderLifespan, params.MaxOrderLifespan) } pair, found := k.GetPair(ctx, msg.AppId, msg.PairId) if !found { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "pair %d not found", msg.PairId) + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "pair %d not found", msg.PairId) } - var upperPriceLimit, lowerPriceLimit sdk.Dec + var upperPriceLimit, lowerPriceLimit sdkmath.LegacyDec if pair.LastPrice != nil { lowerPriceLimit, upperPriceLimit = k.PriceLimits(ctx, *pair.LastPrice, params) } else { @@ -61,15 +62,15 @@ func (k Keeper) ValidateMsgLimitOrder(ctx sdk.Context, msg *types.MsgLimitOrder) } switch { case msg.Price.GT(upperPriceLimit): - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf(types.ErrPriceOutOfRange, "%s is higher than %s", msg.Price, upperPriceLimit) + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrPriceOutOfRange, "%s is higher than %s", msg.Price, upperPriceLimit) case msg.Price.LT(lowerPriceLimit): - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf(types.ErrPriceOutOfRange, "%s is lower than %s", msg.Price, lowerPriceLimit) + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrPriceOutOfRange, "%s is lower than %s", msg.Price, lowerPriceLimit) } switch msg.Direction { case types.OrderDirectionBuy: if msg.OfferCoin.Denom != pair.QuoteCoinDenom || msg.DemandCoinDenom != pair.BaseCoinDenom { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrWrongPair, "denom pair (%s, %s) != (%s, %s)", msg.DemandCoinDenom, msg.OfferCoin.Denom, pair.BaseCoinDenom, pair.QuoteCoinDenom) } @@ -79,12 +80,12 @@ func (k Keeper) ValidateMsgLimitOrder(ctx sdk.Context, msg *types.MsgLimitOrder) swapFeeCoin = sdk.NewCoin(msg.OfferCoin.Denom, CalculateSwapFeeAmount(ctx, params, offerCoin.Amount)) if msg.OfferCoin.IsLT(offerCoin.Add(swapFeeCoin)) { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf( + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf( types.ErrInsufficientOfferCoin, "%s is smaller than %s", msg.OfferCoin, offerCoin.Add(swapFeeCoin)) } case types.OrderDirectionSell: if msg.OfferCoin.Denom != pair.BaseCoinDenom || msg.DemandCoinDenom != pair.QuoteCoinDenom { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrWrongPair, "denom pair (%s, %s) != (%s, %s)", msg.OfferCoin.Denom, msg.DemandCoinDenom, pair.BaseCoinDenom, pair.QuoteCoinDenom) } @@ -94,12 +95,12 @@ func (k Keeper) ValidateMsgLimitOrder(ctx sdk.Context, msg *types.MsgLimitOrder) swapFeeCoin = sdk.NewCoin(msg.OfferCoin.Denom, CalculateSwapFeeAmount(ctx, params, offerCoin.Amount)) if msg.OfferCoin.Amount.LT(swapFeeCoin.Amount.Add(offerCoin.Amount)) { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf( + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf( types.ErrInsufficientOfferCoin, "%s is smaller than %s", msg.OfferCoin, sdk.NewCoin(msg.OfferCoin.Denom, swapFeeCoin.Amount.Add(offerCoin.Amount))) } } if types.IsTooSmallOrderAmount(msg.Amount, price) { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, types.ErrTooSmallOrder + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, types.ErrTooSmallOrder } return offerCoin, swapFeeCoin, price, nil @@ -153,70 +154,70 @@ func (k Keeper) LimitOrder(ctx sdk.Context, msg *types.MsgLimitOrder) (types.Ord // ValidateMsgMarketOrder validates types.MsgMarketOrder with state and returns // calculated offer coin and price. -func (k Keeper) ValidateMsgMarketOrder(ctx sdk.Context, msg *types.MsgMarketOrder) (offerCoin sdk.Coin, swapFeeCoin sdk.Coin, price sdk.Dec, err error) { +func (k Keeper) ValidateMsgMarketOrder(ctx sdk.Context, msg *types.MsgMarketOrder) (offerCoin sdk.Coin, swapFeeCoin sdk.Coin, price sdkmath.LegacyDec, err error) { _, found := k.assetKeeper.GetApp(ctx, msg.AppId) if !found { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrInvalidAppID, "app id %d not found", msg.AppId) } params, err := k.GetGenericParams(ctx, msg.AppId) if err != nil { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrap(err, "params retreval failed") + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrap(err, "params retreval failed") } spendable := k.bankKeeper.SpendableCoins(ctx, msg.GetOrderer()) if spendableAmt := spendable.AmountOf(msg.OfferCoin.Denom); spendableAmt.LT(msg.OfferCoin.Amount) { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf( + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf( sdkerrors.ErrInsufficientFunds, "%s is smaller than %s", sdk.NewCoin(msg.OfferCoin.Denom, spendableAmt), msg.OfferCoin) } if msg.OrderLifespan > params.MaxOrderLifespan { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrTooLongOrderLifespan, "%s is longer than %s", msg.OrderLifespan, params.MaxOrderLifespan) } pair, found := k.GetPair(ctx, msg.AppId, msg.PairId) if !found { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "pair %d not found", msg.PairId) + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "pair %d not found", msg.PairId) } if pair.LastPrice == nil { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, types.ErrNoLastPrice + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, types.ErrNoLastPrice } lastPrice := *pair.LastPrice switch msg.Direction { case types.OrderDirectionBuy: if msg.OfferCoin.Denom != pair.QuoteCoinDenom || msg.DemandCoinDenom != pair.BaseCoinDenom { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrWrongPair, "denom pair (%s, %s) != (%s, %s)", msg.DemandCoinDenom, msg.OfferCoin.Denom, pair.BaseCoinDenom, pair.QuoteCoinDenom) } - price = amm.PriceToDownTick(lastPrice.Mul(sdk.OneDec().Add(params.MaxPriceLimitRatio)), int(params.TickPrecision)) + price = amm.PriceToDownTick(lastPrice.Mul(sdkmath.LegacyOneDec().Add(params.MaxPriceLimitRatio)), int(params.TickPrecision)) offerCoin = sdk.NewCoin(msg.OfferCoin.Denom, amm.OfferCoinAmount(amm.Buy, price, msg.Amount)) swapFeeCoin = sdk.NewCoin(msg.OfferCoin.Denom, CalculateSwapFeeAmount(ctx, params, offerCoin.Amount)) if msg.OfferCoin.IsLT(offerCoin.Add(swapFeeCoin)) { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf( + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf( types.ErrInsufficientOfferCoin, "%s is smaller than %s", msg.OfferCoin, offerCoin.Add(swapFeeCoin)) } case types.OrderDirectionSell: if msg.OfferCoin.Denom != pair.BaseCoinDenom || msg.DemandCoinDenom != pair.QuoteCoinDenom { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf(types.ErrWrongPair, "denom pair (%s, %s) != (%s, %s)", msg.OfferCoin.Denom, msg.DemandCoinDenom, pair.BaseCoinDenom, pair.QuoteCoinDenom) } - price = amm.PriceToUpTick(lastPrice.Mul(sdk.OneDec().Sub(params.MaxPriceLimitRatio)), int(params.TickPrecision)) + price = amm.PriceToUpTick(lastPrice.Mul(sdkmath.LegacyOneDec().Sub(params.MaxPriceLimitRatio)), int(params.TickPrecision)) offerCoin = sdk.NewCoin(msg.OfferCoin.Denom, msg.Amount) swapFeeCoin = sdk.NewCoin(msg.OfferCoin.Denom, CalculateSwapFeeAmount(ctx, params, offerCoin.Amount)) if msg.OfferCoin.Amount.LT(swapFeeCoin.Amount.Add(offerCoin.Amount)) { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, sdkerrors.Wrapf( + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, sdkerrors.Wrapf( types.ErrInsufficientOfferCoin, "%s is smaller than %s", msg.OfferCoin, sdk.NewCoin(msg.OfferCoin.Denom, swapFeeCoin.Amount.Add(offerCoin.Amount))) } } if types.IsTooSmallOrderAmount(msg.Amount, price) { - return sdk.Coin{}, sdk.Coin{}, sdk.Dec{}, types.ErrTooSmallOrder + return sdk.Coin{}, sdk.Coin{}, sdkmath.LegacyDec{}, types.ErrTooSmallOrder } return offerCoin, swapFeeCoin, price, nil @@ -303,7 +304,7 @@ func (k Keeper) MMOrder(ctx sdk.Context, msg *types.MsgMMOrder) (orders []types. return nil, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "pair %d not found", msg.PairId) } - var lowestPrice, highestPrice sdk.Dec + var lowestPrice, highestPrice sdkmath.LegacyDec if pair.LastPrice != nil { lowestPrice, highestPrice = types.PriceLimits(*pair.LastPrice, params.MaxPriceLimitRatio, tickPrec) } else { @@ -668,7 +669,7 @@ func (k Keeper) ExecuteMatching(ctx sdk.Context, pair types.Pair) error { return nil } -func (k Keeper) Match(ctx sdk.Context, params types.GenericParams, ob *amm.OrderBook, pools []*types.PoolOrderer, lastPrice *sdk.Dec) (matchPrice sdk.Dec, quoteCoinDiff sdk.Int, matched bool) { +func (k Keeper) Match(ctx sdk.Context, params types.GenericParams, ob *amm.OrderBook, pools []*types.PoolOrderer, lastPrice *sdkmath.LegacyDec) (matchPrice sdkmath.LegacyDec, quoteCoinDiff sdkmath.Int, matched bool) { tickPrec := int(params.TickPrecision) if lastPrice == nil { ov := amm.MultipleOrderViews{ob.MakeView()} @@ -678,7 +679,7 @@ func (k Keeper) Match(ctx sdk.Context, params types.GenericParams, ob *amm.Order var found bool matchPrice, found = amm.FindMatchPrice(ov, tickPrec) if !found { - return sdk.Dec{}, sdk.Int{}, false + return sdkmath.LegacyDec{}, sdkmath.Int{}, false } for _, pool := range pools { buyAmt := pool.BuyAmountOver(matchPrice, true) @@ -702,7 +703,7 @@ func (k Keeper) Match(ctx sdk.Context, params types.GenericParams, ob *amm.Order return } -func (k Keeper) ApplyMatchResult(ctx sdk.Context, pair types.Pair, orders []amm.Order, quoteCoinDiff sdk.Int) error { +func (k Keeper) ApplyMatchResult(ctx sdk.Context, pair types.Pair, orders []amm.Order, quoteCoinDiff sdkmath.Int) error { params, err := k.GetGenericParams(ctx, pair.AppId) if err != nil { return sdkerrors.Wrap(err, "params retreval failed") @@ -728,7 +729,7 @@ func (k Keeper) ApplyMatchResult(ctx sdk.Context, pair types.Pair, orders []amm. OrderDirection types.OrderDirection PaidCoin sdk.Coin ReceivedCoin sdk.Coin - MatchedAmount sdk.Int + MatchedAmount sdkmath.Int } poolMatchResultByID := map[uint64]*PoolMatchResult{} var poolMatchResults []*PoolMatchResult @@ -782,9 +783,9 @@ func (k Keeper) ApplyMatchResult(ctx sdk.Context, pair types.Pair, orders []amm. r = &PoolMatchResult{ PoolID: order.PoolID, OrderDirection: types.OrderDirectionFromAMM(order.Direction), - PaidCoin: sdk.NewCoin(paidCoin.Denom, sdk.ZeroInt()), - ReceivedCoin: sdk.NewCoin(receivedCoin.Denom, sdk.ZeroInt()), - MatchedAmount: sdk.ZeroInt(), + PaidCoin: sdk.NewCoin(paidCoin.Denom, sdkmath.ZeroInt()), + ReceivedCoin: sdk.NewCoin(receivedCoin.Denom, sdkmath.ZeroInt()), + MatchedAmount: sdkmath.ZeroInt(), } poolMatchResultByID[order.PoolID] = r poolMatchResults = append(poolMatchResults, r) @@ -836,7 +837,7 @@ func (k Keeper) FinishOrder(ctx sdk.Context, order types.Order, status types.Ord pair, _ := k.GetPair(ctx, order.AppId, order.PairId) - accumulatedSwapFee := sdk.NewCoin(order.OfferCoin.Denom, sdk.NewInt(0)) + accumulatedSwapFee := sdk.NewCoin(order.OfferCoin.Denom, sdkmath.NewInt(0)) collectedSwapFeeAmountFromOrderer := CalculateSwapFeeAmount(ctx, params, order.OfferCoin.Amount) if order.RemainingOfferCoin.IsPositive() { @@ -984,7 +985,7 @@ func (k Keeper) ConvertAccumulatedSwapFeesWithSwapDistrToken(ctx sdk.Context, ap } swapFeeCoin := sdk.NewCoin(balance.Denom, CalculateSwapFeeAmount(ctx, params, balance.Amount)) - swapFeeCoin.Amount = swapFeeCoin.Amount.Mul(sdk.NewInt(3)) + swapFeeCoin.Amount = swapFeeCoin.Amount.Mul(sdkmath.NewInt(3)) // reserving extra for swap fee from the offer coin, i.e swapfee *3 offerCoin := sdk.NewCoin(balance.Denom, balance.Amount.Sub(swapFeeCoin.Amount)) @@ -996,12 +997,12 @@ func (k Keeper) ConvertAccumulatedSwapFeesWithSwapDistrToken(ctx sdk.Context, ap } lastPrice := *pair.LastPrice - var amount sdk.Int + var amount sdkmath.Int var demandCoinDenom string switch orderDirection { case types.OrderDirectionBuy: - maxPrice := lastPrice.Mul(sdk.OneDec().Add(params.MaxPriceLimitRatio)) - amount = offerCoin.Amount.ToDec().Quo(maxPrice).TruncateInt() + maxPrice := lastPrice.Mul(sdkmath.LegacyOneDec().Add(params.MaxPriceLimitRatio)) + amount = sdkmath.LegacyNewDec(offerCoin.Amount.Int64()).Quo(maxPrice).TruncateInt() demandCoinDenom = swappablePair.BaseCoinDenom case types.OrderDirectionSell: amount = offerCoin.Amount diff --git a/x/liquidity/keeper/swap_test.go b/x/liquidity/keeper/swap_test.go index 033417045..8d08fe5a5 100644 --- a/x/liquidity/keeper/swap_test.go +++ b/x/liquidity/keeper/swap_test.go @@ -4,6 +4,7 @@ import ( "math/rand" "time" + sdkmath "cosmossdk.io/math" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidity" "github.com/comdex-official/comdex/x/liquidity/amm" @@ -444,7 +445,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { types.OrderDirectionBuy, utils.ParseCoin("1003000uasset2"), asset1.Denom, - sdk.MustNewDecFromStr("0.5"), + sdkmath.LegacyMustNewDecFromStr("0.5"), newInt(2000000), time.Minute*1, ), @@ -457,7 +458,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { OfferCoin: utils.ParseCoin("1000000uasset2"), RemainingOfferCoin: utils.ParseCoin("1000000uasset2"), ReceivedCoin: utils.ParseCoin("0uasset1"), - Price: sdk.MustNewDecFromStr("0.5"), + Price: sdkmath.LegacyMustNewDecFromStr("0.5"), Amount: newInt(2000000), OpenAmount: newInt(2000000), BatchId: 1, @@ -478,7 +479,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { types.OrderDirectionBuy, utils.ParseCoin("1005006uasset2"), asset1.Denom, - sdk.MustNewDecFromStr("0.501"), + sdkmath.LegacyMustNewDecFromStr("0.501"), newInt(2000000), time.Minute*1, ), @@ -491,7 +492,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { OfferCoin: utils.ParseCoin("1002000uasset2"), RemainingOfferCoin: utils.ParseCoin("1002000uasset2"), ReceivedCoin: utils.ParseCoin("0uasset1"), - Price: sdk.MustNewDecFromStr("0.501"), + Price: sdkmath.LegacyMustNewDecFromStr("0.501"), Amount: newInt(2000000), OpenAmount: newInt(2000000), BatchId: 3, @@ -512,7 +513,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { types.OrderDirectionBuy, utils.ParseCoin("1000994uasset2"), asset1.Denom, - sdk.MustNewDecFromStr("0.499"), + sdkmath.LegacyMustNewDecFromStr("0.499"), newInt(2000000), time.Minute*1, ), @@ -525,7 +526,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { OfferCoin: utils.ParseCoin("998000uasset2"), RemainingOfferCoin: utils.ParseCoin("998000uasset2"), ReceivedCoin: utils.ParseCoin("0uasset1"), - Price: sdk.MustNewDecFromStr("0.499"), + Price: sdkmath.LegacyMustNewDecFromStr("0.499"), Amount: newInt(2000000), OpenAmount: newInt(2000000), BatchId: 4, @@ -546,7 +547,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { types.OrderDirectionSell, utils.ParseCoin("2006000uasset1"), asset2.Denom, - sdk.MustNewDecFromStr("0.501"), + sdkmath.LegacyMustNewDecFromStr("0.501"), newInt(2000000), time.Minute*1, ), @@ -559,7 +560,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { OfferCoin: utils.ParseCoin("2000000uasset1"), RemainingOfferCoin: utils.ParseCoin("2000000uasset1"), ReceivedCoin: utils.ParseCoin("0uasset2"), - Price: sdk.MustNewDecFromStr("0.501"), + Price: sdkmath.LegacyMustNewDecFromStr("0.501"), Amount: newInt(2000000), OpenAmount: newInt(2000000), BatchId: 6, @@ -580,7 +581,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { types.OrderDirectionSell, utils.ParseCoin("2006000uasset1"), asset2.Denom, - sdk.MustNewDecFromStr("0.51"), + sdkmath.LegacyMustNewDecFromStr("0.51"), newInt(2000000), time.Minute*1, ), @@ -593,7 +594,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { OfferCoin: utils.ParseCoin("2000000uasset1"), RemainingOfferCoin: utils.ParseCoin("2000000uasset1"), ReceivedCoin: utils.ParseCoin("0uasset2"), - Price: sdk.MustNewDecFromStr("0.51"), + Price: sdkmath.LegacyMustNewDecFromStr("0.51"), Amount: newInt(2000000), OpenAmount: newInt(2000000), BatchId: 8, @@ -614,7 +615,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { types.OrderDirectionSell, utils.ParseCoin("2006000uasset1"), asset2.Denom, - sdk.MustNewDecFromStr("0.499980"), + sdkmath.LegacyMustNewDecFromStr("0.499980"), newInt(2000000), time.Minute*1, ), @@ -627,7 +628,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithPoolSwap() { OfferCoin: utils.ParseCoin("2000000uasset1"), RemainingOfferCoin: utils.ParseCoin("2000000uasset1"), ReceivedCoin: utils.ParseCoin("0uasset2"), - Price: sdk.MustNewDecFromStr("0.499980"), + Price: sdkmath.LegacyMustNewDecFromStr("0.499980"), Amount: newInt(2000000), OpenAmount: newInt(2000000), BatchId: 10, @@ -711,7 +712,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionBuy, utils.ParseCoin("17552500uasset2"), asset1.Denom, - sdk.MustNewDecFromStr("0.5"), + sdkmath.LegacyMustNewDecFromStr("0.5"), newInt(35000000), time.Minute*1, ), @@ -725,7 +726,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionSell, utils.ParseCoin("35105000uasset1"), asset2.Denom, - sdk.MustNewDecFromStr("0.5"), + sdkmath.LegacyMustNewDecFromStr("0.5"), newInt(35000000), time.Minute*1, ), @@ -742,7 +743,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionBuy, utils.ParseCoin("17552500uasset2"), asset1.Denom, - sdk.MustNewDecFromStr("0.5"), + sdkmath.LegacyMustNewDecFromStr("0.5"), newInt(35000000), time.Minute*1, ), @@ -756,7 +757,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionSell, utils.ParseCoin("20060000uasset1"), asset2.Denom, - sdk.MustNewDecFromStr("0.5"), + sdkmath.LegacyMustNewDecFromStr("0.5"), newInt(20000000), time.Minute*1, ), @@ -773,7 +774,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionBuy, utils.ParseCoin("15045000uasset2"), asset1.Denom, - sdk.MustNewDecFromStr("0.5"), + sdkmath.LegacyMustNewDecFromStr("0.5"), newInt(30000000), time.Minute*1, ), @@ -787,7 +788,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionSell, utils.ParseCoin("70210000uasset1"), asset2.Denom, - sdk.MustNewDecFromStr("0.5"), + sdkmath.LegacyMustNewDecFromStr("0.5"), newInt(70000000), time.Minute*1, ), @@ -804,7 +805,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionBuy, utils.ParseCoin("15045000uasset2"), asset1.Denom, - sdk.MustNewDecFromStr("0.45"), + sdkmath.LegacyMustNewDecFromStr("0.45"), newInt(30000000), time.Minute*1, ), @@ -818,7 +819,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionSell, utils.ParseCoin("70210000uasset1"), asset2.Denom, - sdk.MustNewDecFromStr("0.55"), + sdkmath.LegacyMustNewDecFromStr("0.55"), newInt(70000000), time.Minute*1, ), @@ -835,7 +836,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionBuy, utils.ParseCoin("16549500uasset2"), asset1.Denom, - sdk.MustNewDecFromStr("0.55"), + sdkmath.LegacyMustNewDecFromStr("0.55"), newInt(30000000), time.Minute*1, ), @@ -849,7 +850,7 @@ func (s *KeeperTestSuite) TestLimitOrderWithoutPool() { types.OrderDirectionSell, utils.ParseCoin("30090000uasset1"), asset2.Denom, - sdk.MustNewDecFromStr("0.50"), + sdkmath.LegacyMustNewDecFromStr("0.50"), newInt(30000000), time.Minute*1, ), @@ -930,8 +931,8 @@ func (s *KeeperTestSuite) TestDustCollector() { pair := s.CreateNewLiquidityPair(appID1, s.addr(0), asset1.Denom, asset2.Denom) - s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.9005"), sdk.NewInt(1000), 0) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.9005"), sdk.NewInt(1000), 0) + s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.9005"), sdkmath.NewInt(1000), 0) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.9005"), sdkmath.NewInt(1000), 0) s.nextBlock() s.Require().True(coinsEq(utils.ParseCoins("1000denom1,1denom2"), s.getBalances(s.addr(1)))) @@ -951,16 +952,16 @@ func (s *KeeperTestSuite) TestInsufficientRemainingOfferCoin() { pair := s.CreateNewLiquidityPair(appID1, s.addr(0), asset1.Denom, asset2.Denom) - order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.5"), sdk.NewInt(10000), time.Minute) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.5"), sdk.NewInt(1001), 0) + order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.5"), sdkmath.NewInt(10000), time.Minute) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.5"), sdkmath.NewInt(1001), 0) s.nextBlock() - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.5"), sdk.NewInt(8999), 0) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.5"), sdkmath.NewInt(8999), 0) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) order, found := s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) s.Require().True(found) s.Require().Equal(types.OrderStatusExpired, order.Status) - s.Require().True(intEq(sdk.OneInt(), order.OpenAmount)) + s.Require().True(intEq(sdkmath.OneInt(), order.OpenAmount)) } func (s *KeeperTestSuite) TestNegativeOpenAmount() { @@ -973,8 +974,8 @@ func (s *KeeperTestSuite) TestNegativeOpenAmount() { pair := s.CreateNewLiquidityPair(appID1, s.addr(0), asset1.Denom, asset2.Denom) - order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.82"), sdk.NewInt(648744), 0) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.82"), sdk.NewInt(648745), 0) + order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.82"), sdkmath.NewInt(648744), 0) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.82"), sdkmath.NewInt(648745), 0) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) order, found := s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) @@ -994,21 +995,21 @@ func (s *KeeperTestSuite) TestExpireSmallOrders() { asset2 := s.CreateNewAsset("ASSETTWO", "denom2", 1000000) pair := s.CreateNewLiquidityPair(appID1, s.addr(0), asset1.Denom, asset2.Denom) - s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.000018"), sdk.NewInt(10000000), 0) + s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.000018"), sdkmath.NewInt(10000000), 0) // This order should have 10000 open amount after matching. // If this order would be matched after that, then the orderer will receive // floor(10000*0.000018) demand coin, which is zero. // So the order must have been expired after matching. - order := s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.000018"), sdk.NewInt(10010000), time.Minute) + order := s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.000018"), sdkmath.NewInt(10010000), time.Minute) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) order, found := s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) s.Require().True(found) s.Require().Equal(types.OrderStatusExpired, order.Status) liquidity.BeginBlocker(s.ctx, s.keeper, s.app.AssetKeeper) // Delete outdated states. - s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.000019"), sdk.NewInt(100000000), time.Minute) - s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.000019"), sdk.NewInt(100000000), time.Minute) + s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.000019"), sdkmath.NewInt(100000000), time.Minute) + s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.000019"), sdkmath.NewInt(100000000), time.Minute) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) } @@ -1025,26 +1026,26 @@ func (s *KeeperTestSuite) TestRejectSmallOrders() { // Too small offer coin amount. msg := types.NewMsgLimitOrder( appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseCoin("99denom2"), - "denom1", utils.ParseDec("0.1"), sdk.NewInt(990), 0) + "denom1", utils.ParseDec("0.1"), sdkmath.NewInt(990), 0) s.Require().EqualError(msg.ValidateBasic(), "offer coin 99denom2 is smaller than the min amount 100: invalid request") // Too small order amount. msg = types.NewMsgLimitOrder( appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseCoin("990denom2"), - "denom1", utils.ParseDec("10.0"), sdk.NewInt(99), 0) + "denom1", utils.ParseDec("10.0"), sdkmath.NewInt(99), 0) s.Require().EqualError(msg.ValidateBasic(), "order amount 99 is smaller than the min amount 100: invalid request") // Too small orders. msg = types.NewMsgLimitOrder( appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseCoin("101denom2"), - "denom1", utils.ParseDec("0.00010001"), sdk.NewInt(999000), 0) + "denom1", utils.ParseDec("0.00010001"), sdkmath.NewInt(999000), 0) s.Require().NoError(msg.ValidateBasic()) _, err := s.keeper.LimitOrder(s.ctx, msg) s.Require().ErrorIs(err, types.ErrTooSmallOrder) msg = types.NewMsgLimitOrder( appID1, s.addr(1), pair.Id, types.OrderDirectionSell, utils.ParseCoin("1002999denom1"), - "denom2", utils.ParseDec("0.0001"), sdk.NewInt(999999), 0) + "denom2", utils.ParseDec("0.0001"), sdkmath.NewInt(999999), 0) s.Require().NoError(msg.ValidateBasic()) _, err = s.keeper.LimitOrder(s.ctx, msg) s.Require().ErrorIs(err, types.ErrTooSmallOrder) @@ -1052,13 +1053,13 @@ func (s *KeeperTestSuite) TestRejectSmallOrders() { // Too small offer coin amount. msg2 := types.NewMsgMarketOrder( appID1, s.addr(1), pair.Id, types.OrderDirectionSell, utils.ParseCoin("99denom1"), - "denom2", sdk.NewInt(99), 0) + "denom2", sdkmath.NewInt(99), 0) s.Require().EqualError(msg2.ValidateBasic(), "offer coin 99denom1 is smaller than the min amount 100: invalid request") // Too small order amount. msg2 = types.NewMsgMarketOrder( appID1, s.addr(1), pair.Id, types.OrderDirectionSell, utils.ParseCoin("100denom1"), - "denom2", sdk.NewInt(99), 0) + "denom2", sdkmath.NewInt(99), 0) s.Require().EqualError(msg2.ValidateBasic(), "order amount 99 is smaller than the min amount 100: invalid request") p := utils.ParseDec("0.0001") @@ -1068,14 +1069,14 @@ func (s *KeeperTestSuite) TestRejectSmallOrders() { // Too small orders. msg2 = types.NewMsgMarketOrder( appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseCoin("100denom2"), - "denom1", sdk.NewInt(909090), 0) + "denom1", sdkmath.NewInt(909090), 0) s.Require().NoError(msg2.ValidateBasic()) _, err = s.keeper.MarketOrder(s.ctx, msg2) s.Require().ErrorIs(err, types.ErrTooSmallOrder) msg2 = types.NewMsgMarketOrder( appID1, s.addr(1), pair.Id, types.OrderDirectionSell, utils.ParseCoin("1003denom1"), - "denom2", sdk.NewInt(1000), 0) + "denom2", sdkmath.NewInt(1000), 0) s.Require().NoError(msg2.ValidateBasic()) _, err = s.keeper.MarketOrder(s.ctx, msg2) s.Require().ErrorIs(err, types.ErrTooSmallOrder) @@ -1303,7 +1304,7 @@ func (s *KeeperTestSuite) TestMarketOrder() { OfferCoin: utils.ParseCoin("1100000uasset2"), RemainingOfferCoin: utils.ParseCoin("1100000uasset2"), ReceivedCoin: utils.ParseCoin("0uasset1"), - Price: sdk.MustNewDecFromStr("1.1"), + Price: sdkmath.LegacyMustNewDecFromStr("1.1"), Amount: newInt(1000000), OpenAmount: newInt(1000000), BatchId: 2, @@ -1336,7 +1337,7 @@ func (s *KeeperTestSuite) TestMarketOrder() { OfferCoin: utils.ParseCoin("1000000uasset1"), RemainingOfferCoin: utils.ParseCoin("1000000uasset1"), ReceivedCoin: utils.ParseCoin("0uasset2"), - Price: sdk.MustNewDecFromStr("0.9"), + Price: sdkmath.LegacyMustNewDecFromStr("0.9"), Amount: newInt(1000000), OpenAmount: newInt(1000000), BatchId: 2, @@ -1373,8 +1374,8 @@ func (s *KeeperTestSuite) TestMarketOrder() { if tc.ExpErr == types.ErrNoLastPrice { // When there is no last price in the pair, only limit orders can be made. // These two orders will be matched. - s.LimitOrder(tc.Msg.AppId, creator, tc.Msg.PairId, types.OrderDirectionBuy, utils.ParseDec("1"), sdk.NewInt(10000), 0) - s.LimitOrder(tc.Msg.AppId, creator, tc.Msg.PairId, types.OrderDirectionSell, utils.ParseDec("1"), sdk.NewInt(10000), 0) + s.LimitOrder(tc.Msg.AppId, creator, tc.Msg.PairId, types.OrderDirectionBuy, utils.ParseDec("1"), sdkmath.NewInt(10000), 0) + s.LimitOrder(tc.Msg.AppId, creator, tc.Msg.PairId, types.OrderDirectionSell, utils.ParseDec("1"), sdkmath.NewInt(10000), 0) s.nextBlock() } s.sendCoins(tc.Msg.GetOrderer(), dummyAcc, s.getBalances(tc.Msg.GetOrderer())) @@ -1392,16 +1393,16 @@ func (s *KeeperTestSuite) TestMarketOrderTwo() { // When there is no last price in the pair, only limit orders can be made. // These two orders will be matched. - s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(10000), 0) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdk.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdkmath.NewInt(10000), 0) s.nextBlock() // Now users can make market orders. // In this case, addr(3) user's order takes higher priority than addr(4) user's, // because market buy orders have 10% higher price than the last price(1.0). - s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdk.NewInt(10000), 0) - s.LimitOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.08"), sdk.NewInt(10000), 0) - s.LimitOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.07"), sdk.NewInt(10000), 0) + s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.08"), sdkmath.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.07"), sdkmath.NewInt(10000), 0) s.nextBlock() // Check the result. @@ -1472,7 +1473,7 @@ func (s *KeeperTestSuite) TestMarketOrderWithNoLastPrice() { offerCoin := utils.ParseCoin("10000denom2") s.fundAddr(s.addr(1), sdk.NewCoins(offerCoin)) msg := types.NewMsgMarketOrder( - appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, offerCoin, "denom1", sdk.NewInt(10000), 0) + appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, offerCoin, "denom1", sdkmath.NewInt(10000), 0) _, err := s.keeper.MarketOrder(s.ctx, msg) s.Require().ErrorIs(err, types.ErrNoLastPrice) } @@ -1487,7 +1488,7 @@ func (s *KeeperTestSuite) TestSingleOrderNoMatch() { pair := s.CreateNewLiquidityPair(appID1, s.addr(0), asset1.Denom, asset2.Denom) - order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(1000000), 10*time.Second) + order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(1000000), 10*time.Second) // Execute matching liquidity.EndBlocker(ctx, k, s.app.AssetKeeper) @@ -1541,8 +1542,8 @@ func (s *KeeperTestSuite) TestPartialMatch() { pair := s.CreateNewLiquidityPair(appID1, s.addr(0), asset1.Denom, asset2.Denom) - order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(10000), time.Hour) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdk.NewInt(5000), 0) + order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(10000), time.Hour) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdkmath.NewInt(5000), 0) s.nextBlock() order, found := s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) @@ -1550,9 +1551,9 @@ func (s *KeeperTestSuite) TestPartialMatch() { s.Require().Equal(types.OrderStatusPartiallyMatched, order.Status) s.Require().True(utils.ParseCoin("5000denom2").IsEqual(order.RemainingOfferCoin)) s.Require().True(utils.ParseCoin("5000denom1").IsEqual(order.ReceivedCoin)) - s.Require().True(sdk.NewInt(5000).Equal(order.OpenAmount)) + s.Require().True(sdkmath.NewInt(5000).Equal(order.OpenAmount)) - s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, sdk.NewInt(5000), 0) + s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(5000), 0) s.nextBlock() // Now completely matched. @@ -1570,7 +1571,7 @@ func (s *KeeperTestSuite) TestMatchWithLowPricePool() { // Create a pool with very low price. s.CreateNewLiquidityPool(appID1, pair.Id, s.addr(0), "1000000000000000000000denom1,1000000denom2") - order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.000000000001000000"), sdk.NewInt(100000000000000000), 10*time.Second) + order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.000000000001000000"), sdkmath.NewInt(100000000000000000), 10*time.Second) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) order, found := s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) s.Require().True(found) @@ -1592,8 +1593,8 @@ func (s *KeeperTestSuite) TestMMOrder() { orders := s.MarketMakingOrder( s.addr(1), appID1, pair.Id, - utils.ParseDec("1.1"), utils.ParseDec("1.03"), sdk.NewInt(1000_000000), - utils.ParseDec("0.97"), utils.ParseDec("0.9"), sdk.NewInt(1000_000000), + utils.ParseDec("1.1"), utils.ParseDec("1.03"), sdkmath.NewInt(1000_000000), + utils.ParseDec("0.97"), utils.ParseDec("0.9"), sdkmath.NewInt(1000_000000), 10*time.Second, true) maxNumTicks := int(params.MaxNumMarketMakingOrderTicks) s.Require().Len(orders, 2*maxNumTicks) @@ -1634,8 +1635,8 @@ func (s *KeeperTestSuite) TestMMOrderCancelPreviousOrders() { s.MarketMakingOrder( s.addr(1), appID1, pair.Id, - utils.ParseDec("1.1"), utils.ParseDec("1.03"), sdk.NewInt(1000_000000), - utils.ParseDec("0.97"), utils.ParseDec("0.9"), sdk.NewInt(1000_000000), + utils.ParseDec("1.1"), utils.ParseDec("1.03"), sdkmath.NewInt(1000_000000), + utils.ParseDec("0.97"), utils.ParseDec("0.9"), sdkmath.NewInt(1000_000000), 10*time.Second, true) // Cannot place MM orders again because it's not allowed to cancel previous @@ -1643,8 +1644,8 @@ func (s *KeeperTestSuite) TestMMOrderCancelPreviousOrders() { s.fundAddr(s.addr(1), utils.ParseCoins("1000000000denom1,1000000000denom2")) _, err := s.keeper.MMOrder(s.ctx, types.NewMsgMMOrder( appID1, s.addr(1), pair.Id, - utils.ParseDec("1.1"), utils.ParseDec("1.03"), sdk.NewInt(1000_000000), - utils.ParseDec("0.97"), utils.ParseDec("0.9"), sdk.NewInt(1000_000000), + utils.ParseDec("1.1"), utils.ParseDec("1.03"), sdkmath.NewInt(1000_000000), + utils.ParseDec("0.97"), utils.ParseDec("0.9"), sdkmath.NewInt(1000_000000), 10*time.Second)) s.Require().ErrorIs(err, types.ErrSameBatch) @@ -1652,8 +1653,8 @@ func (s *KeeperTestSuite) TestMMOrderCancelPreviousOrders() { s.nextBlock() s.MarketMakingOrder( s.addr(1), appID1, pair.Id, - utils.ParseDec("1.1"), utils.ParseDec("1.03"), sdk.NewInt(1000_000000), - utils.ParseDec("0.97"), utils.ParseDec("0.9"), sdk.NewInt(1000_000000), + utils.ParseDec("1.1"), utils.ParseDec("1.03"), sdkmath.NewInt(1000_000000), + utils.ParseDec("0.97"), utils.ParseDec("0.9"), sdkmath.NewInt(1000_000000), 10*time.Second, true) params, err := s.keeper.GetGenericParams(s.ctx, appID1) @@ -1802,7 +1803,7 @@ func (s *KeeperTestSuite) TestCancelAllOrders() { pair := s.CreateNewLiquidityPair(appID1, s.addr(0), asset1.Denom, asset2.Denom) - order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(10000), time.Hour) + order := s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(10000), time.Hour) msg := types.NewMsgCancelAllOrders(appID1, s.addr(1), nil) s.keeper.CancelAllOrders(s.ctx, msg) // CancelAllOrders doesn't cancel orders within in same batch s.nextBlock() @@ -1820,14 +1821,14 @@ func (s *KeeperTestSuite) TestCancelAllOrders() { // The order won't be matched with this market order, since the order is // already canceled. - s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdk.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdkmath.NewInt(10000), 0) s.nextBlock() s.Require().True(utils.ParseCoins("10030denom2").IsEqual(s.getBalances(s.addr(1)))) pair2 := s.CreateNewLiquidityPair(appID1, s.addr(0), asset2.Denom, asset3.Denom) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdk.NewInt(10000), time.Hour) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.5"), sdk.NewInt(10000), time.Hour) - s.LimitOrder(appID1, s.addr(2), pair2.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdk.NewInt(10000), time.Hour) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.0"), sdkmath.NewInt(10000), time.Hour) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("1.5"), sdkmath.NewInt(10000), time.Hour) + s.LimitOrder(appID1, s.addr(2), pair2.Id, types.OrderDirectionSell, utils.ParseDec("1.0"), sdkmath.NewInt(10000), time.Hour) s.nextBlock() msg = types.NewMsgCancelAllOrders(appID1, s.addr(2), []uint64{pair.Id}) @@ -2017,17 +2018,17 @@ func (s *KeeperTestSuite) TestConvertAccumulatedSwapFeesWithSwapDistrToken_1() { s.keeper.SetPair(s.ctx, pair) _ = s.CreateNewLiquidityPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor") // the given deposit amount is not the actuall deposit amout, it will be decided by the protocal based on the min,max and initial prices of ranged pools - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdk.MustNewDecFromStr("0.95"), sdk.MustNewDecFromStr("1.05"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdk.MustNewDecFromStr("0.90"), sdk.MustNewDecFromStr("1.1"), sdk.MustNewDecFromStr("1")) - _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdk.MustNewDecFromStr("0.99"), sdk.MustNewDecFromStr("1.01"), sdk.MustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdkmath.LegacyMustNewDecFromStr("0.95"), sdkmath.LegacyMustNewDecFromStr("1.05"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdkmath.LegacyMustNewDecFromStr("0.90"), sdkmath.LegacyMustNewDecFromStr("1.1"), sdkmath.LegacyMustNewDecFromStr("1")) + _ = s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "100000000ucmdx,100000000uharbor", sdkmath.LegacyMustNewDecFromStr("0.99"), sdkmath.LegacyMustNewDecFromStr("1.01"), sdkmath.LegacyMustNewDecFromStr("1")) - s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdk.NewInt(30_000000), 0) - s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdk.NewInt(54_000000), 0) - s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdk.NewInt(17_000000), 0) + s.MarketOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(30_000000), 0) + s.MarketOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(54_000000), 0) + s.MarketOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(17_000000), 0) - s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdk.NewInt(12_000000), 0) - s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdk.NewInt(19_000000), 0) - s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdk.NewInt(23_000000), 0) + s.MarketOrder(appID1, s.addr(5), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(12_000000), 0) + s.MarketOrder(appID1, s.addr(6), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(19_000000), 0) + s.MarketOrder(appID1, s.addr(7), pair.Id, types.OrderDirectionSell, sdkmath.NewInt(23_000000), 0) _, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) @@ -2077,15 +2078,15 @@ func (s *KeeperTestSuite) TestConvertAccumulatedSwapFeesWithSwapDistrToken_2() { _ = s.CreateNewLiquidityPool(appID1, pair4.Id, addr1, "100000000stake,100000000ucmdx") // the given deposit amount is not the actuall deposit amout, it will be decided by the protocal based on the min,max and initial prices of ranged pools - s.MarketOrder(appID1, s.addr(2), pair1.Id, types.OrderDirectionBuy, sdk.NewInt(30_000000), 0) - s.MarketOrder(appID1, s.addr(3), pair2.Id, types.OrderDirectionBuy, sdk.NewInt(54_000000), 0) - s.MarketOrder(appID1, s.addr(4), pair3.Id, types.OrderDirectionBuy, sdk.NewInt(17_000000), 0) - s.MarketOrder(appID1, s.addr(4), pair4.Id, types.OrderDirectionBuy, sdk.NewInt(17_000000), 0) + s.MarketOrder(appID1, s.addr(2), pair1.Id, types.OrderDirectionBuy, sdkmath.NewInt(30_000000), 0) + s.MarketOrder(appID1, s.addr(3), pair2.Id, types.OrderDirectionBuy, sdkmath.NewInt(54_000000), 0) + s.MarketOrder(appID1, s.addr(4), pair3.Id, types.OrderDirectionBuy, sdkmath.NewInt(17_000000), 0) + s.MarketOrder(appID1, s.addr(4), pair4.Id, types.OrderDirectionBuy, sdkmath.NewInt(17_000000), 0) - s.MarketOrder(appID1, s.addr(6), pair1.Id, types.OrderDirectionSell, sdk.NewInt(19_000000), 0) - s.MarketOrder(appID1, s.addr(7), pair2.Id, types.OrderDirectionSell, sdk.NewInt(23_000000), 0) - s.MarketOrder(appID1, s.addr(5), pair3.Id, types.OrderDirectionSell, sdk.NewInt(12_000000), 0) - s.MarketOrder(appID1, s.addr(5), pair4.Id, types.OrderDirectionSell, sdk.NewInt(32_000000), 0) + s.MarketOrder(appID1, s.addr(6), pair1.Id, types.OrderDirectionSell, sdkmath.NewInt(19_000000), 0) + s.MarketOrder(appID1, s.addr(7), pair2.Id, types.OrderDirectionSell, sdkmath.NewInt(23_000000), 0) + s.MarketOrder(appID1, s.addr(5), pair3.Id, types.OrderDirectionSell, sdkmath.NewInt(12_000000), 0) + s.MarketOrder(appID1, s.addr(5), pair4.Id, types.OrderDirectionSell, sdkmath.NewInt(32_000000), 0) _, err := s.keeper.GetGenericParams(s.ctx, appID1) s.Require().NoError(err) @@ -2138,24 +2139,24 @@ func (s *KeeperTestSuite) TestPoolPreserveK() { } pools := s.keeper.GetAllPools(s.ctx, appID1) - ks := map[uint64]sdk.Dec{} + ks := map[uint64]sdkmath.LegacyDec{} for _, pool := range pools { rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}).(*amm.RangedPool) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}).(*amm.RangedPool) transX, transY := ammPool.Translation() - ks[pool.Id] = rx.Amount.ToDec().Add(transX).Mul(ry.Amount.ToDec().Add(transY)) + ks[pool.Id] = sdkmath.LegacyNewDec(rx.Amount.Int64()).Add(transX).Mul(sdkmath.LegacyNewDec(ry.Amount.Int64()).Add(transY)) } for i := 0; i < 20; i++ { pair, _ = s.keeper.GetPair(s.ctx, appID1, pair.Id) for j := 0; j < 50; j++ { - var price sdk.Dec + var price sdkmath.LegacyDec if pair.LastPrice == nil { price = utils.RandomDec(r, utils.ParseDec("0.001"), utils.ParseDec("100.0")) } else { price = utils.RandomDec(r, utils.ParseDec("0.91"), utils.ParseDec("1.09")).Mul(*pair.LastPrice) } - amt := utils.RandomInt(r, sdk.NewInt(10000), sdk.NewInt(1000000)) + amt := utils.RandomInt(r, sdkmath.NewInt(10000), sdkmath.NewInt(1000000)) lifespan := time.Duration(r.Intn(60)) * time.Second if r.Intn(2) == 0 { s.LimitOrder(appID1, s.addr(j+2), pair.Id, types.OrderDirectionBuy, price, amt, lifespan) @@ -2170,9 +2171,9 @@ func (s *KeeperTestSuite) TestPoolPreserveK() { for _, pool := range pools { rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}).(*amm.RangedPool) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}).(*amm.RangedPool) transX, transY := ammPool.Translation() - k := rx.Amount.ToDec().Add(transX).Mul(ry.Amount.ToDec().Add(transY)) + k := sdkmath.LegacyNewDec(rx.Amount.Int64()).Add(transX).Mul(sdkmath.LegacyNewDec(ry.Amount.Int64()).Add(transY)) s.Require().True(k.GTE(ks[pool.Id].Mul(utils.ParseDec("0.99999")))) // there may be a small error ks[pool.Id] = k } @@ -2188,7 +2189,7 @@ func (s *KeeperTestSuite) TestPoolOrderOverflow() { pair := s.CreateNewLiquidityPair(appID1, s.addr(0), asset1.Denom, asset2.Denom) s.CreateNewLiquidityPool(appID1, pair.Id, s.addr(0), "1000000denom1,10000000000000000000000000denom2") - s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.000000000000010000"), sdk.NewInt(1e17), 0) + s.LimitOrder(appID1, s.addr(1), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.000000000000010000"), sdkmath.NewInt(1e17), 0) s.Require().NotPanics(func() { liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) }) @@ -2196,7 +2197,7 @@ func (s *KeeperTestSuite) TestPoolOrderOverflow() { func (s *KeeperTestSuite) TestRangedLiquidity() { orderPrice := utils.ParseDec("1.05") - orderAmt := sdk.NewInt(100000) + orderAmt := sdkmath.NewInt(100000) appID1 := s.CreateNewApp("appone") @@ -2217,7 +2218,7 @@ func (s *KeeperTestSuite) TestRangedLiquidity() { paid := order.OfferCoin.Sub(order.RemainingOfferCoin).Amount received := order.ReceivedCoin.Amount s.Require().True(received.LT(orderAmt)) - s.Require().True(paid.ToDec().QuoInt(received).LTE(orderPrice)) + s.Require().True(sdkmath.LegacyNewDec(paid.Int64()).QuoInt(received).LTE(orderPrice)) liquidity.BeginBlocker(s.ctx, s.keeper, s.app.AssetKeeper) pair = s.CreateNewLiquidityPair(appID1, s.addr(0), asset3.Denom, asset4.Denom) @@ -2231,7 +2232,7 @@ func (s *KeeperTestSuite) TestRangedLiquidity() { paid = order.OfferCoin.Sub(order.RemainingOfferCoin).Amount received = order.ReceivedCoin.Amount s.Require().True(intEq(orderAmt, received)) - s.Require().True(paid.ToDec().QuoInt(received).LTE(orderPrice)) + s.Require().True(sdkmath.LegacyNewDec(paid.Int64()).QuoInt(received).LTE(orderPrice)) } func (s *KeeperTestSuite) TestOneSidedRangedPool() { @@ -2246,20 +2247,20 @@ func (s *KeeperTestSuite) TestOneSidedRangedPool() { pool := s.CreateNewLiquidityRangedPool(appID1, pair.Id, s.addr(1), "1000000denom1,1000000denom2", utils.ParseDec("1.0"), utils.ParseDec("1.2"), utils.ParseDec("1.0")) rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) s.Require().True(utils.DecApproxEqual(utils.ParseDec("1.0"), ammPool.Price())) - s.Require().True(intEq(sdk.ZeroInt(), rx.Amount)) - s.Require().True(intEq(sdk.NewInt(1000000), ry.Amount)) + s.Require().True(intEq(sdkmath.ZeroInt(), rx.Amount)) + s.Require().True(intEq(sdkmath.NewInt(1000000), ry.Amount)) orderPrice := utils.ParseDec("1.1") - orderAmt := sdk.NewInt(100000) - order := s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.1"), sdk.NewInt(100000), 0) + orderAmt := sdkmath.NewInt(100000) + order := s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionBuy, utils.ParseDec("1.1"), sdkmath.NewInt(100000), 0) liquidity.EndBlocker(s.ctx, s.keeper, s.app.AssetKeeper) order, _ = s.keeper.GetOrder(s.ctx, appID1, order.PairId, order.Id) paid := order.OfferCoin.Sub(order.RemainingOfferCoin).Amount received := order.ReceivedCoin.Amount s.Require().True(intEq(orderAmt, received)) - s.Require().True(paid.ToDec().QuoInt(received).LTE(orderPrice)) + s.Require().True(sdkmath.LegacyNewDec(paid.Int64()).QuoInt(received).LTE(orderPrice)) rx, _ = s.keeper.GetPoolBalances(s.ctx, pool) s.Require().True(rx.IsPositive()) @@ -2285,14 +2286,14 @@ func (s *KeeperTestSuite) TestExhaustRangedPool() { // Buy for { rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) poolPrice := ammPool.Price() - if ry.Amount.LT(sdk.NewInt(100)) { + if ry.Amount.LT(sdkmath.NewInt(100)) { s.Require().True(utils.DecApproxEqual(maxPrice, poolPrice)) break } - orderPrice := utils.RandomDec(r, poolPrice, poolPrice.Mul(sdk.NewDecWithPrec(105, 2))) - amt := utils.RandomInt(r, sdk.NewInt(5000), sdk.NewInt(15000)) + orderPrice := utils.RandomDec(r, poolPrice, poolPrice.Mul(sdkmath.LegacyNewDecWithPrec(105, 2))) + amt := utils.RandomInt(r, sdkmath.NewInt(5000), sdkmath.NewInt(15000)) s.LimitOrder(appID1, orderer, pair.Id, types.OrderDirectionBuy, orderPrice, amt, 0) s.nextBlock() } @@ -2300,14 +2301,14 @@ func (s *KeeperTestSuite) TestExhaustRangedPool() { // Sell for { rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) poolPrice := ammPool.Price() - if rx.Amount.LT(sdk.NewInt(100)) { + if rx.Amount.LT(sdkmath.NewInt(100)) { s.Require().True(utils.DecApproxEqual(minPrice, poolPrice)) break } - orderPrice := utils.RandomDec(r, poolPrice.Mul(sdk.NewDecWithPrec(95, 2)), poolPrice) - amt := utils.RandomInt(r, sdk.NewInt(5000), sdk.NewInt(15000)) + orderPrice := utils.RandomDec(r, poolPrice.Mul(sdkmath.LegacyNewDecWithPrec(95, 2)), poolPrice) + amt := utils.RandomInt(r, sdkmath.NewInt(5000), sdkmath.NewInt(15000)) s.LimitOrder(appID1, orderer, pair.Id, types.OrderDirectionSell, orderPrice, amt, 0) s.nextBlock() } @@ -2315,13 +2316,13 @@ func (s *KeeperTestSuite) TestExhaustRangedPool() { // Buy again for { rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) poolPrice := ammPool.Price() if poolPrice.GTE(initialPrice) { break } - orderPrice := utils.RandomDec(r, poolPrice, poolPrice.Mul(sdk.NewDecWithPrec(105, 2))) - amt := utils.RandomInt(r, sdk.NewInt(5000), sdk.NewInt(15000)) + orderPrice := utils.RandomDec(r, poolPrice, poolPrice.Mul(sdkmath.LegacyNewDecWithPrec(105, 2))) + amt := utils.RandomInt(r, sdkmath.NewInt(5000), sdkmath.NewInt(15000)) s.LimitOrder(appID1, orderer, pair.Id, types.OrderDirectionBuy, orderPrice, amt, 0) s.nextBlock() } @@ -2330,10 +2331,10 @@ func (s *KeeperTestSuite) TestExhaustRangedPool() { s.Require().NoError(err) rx, ry := s.keeper.GetPoolBalances(s.ctx, pool) - ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdk.Int{}) + ammPool := pool.AMMPool(rx.Amount, ry.Amount, sdkmath.Int{}) s.Require().True(coinEq(rx, utils.ParseCoin("997231denom2"))) s.Require().True(coinEq(ry, utils.ParseCoin("984671denom1"))) - s.Require().True(decEq(ammPool.Price(), utils.ParseDec("1.003719250732340754"))) + s.Require().True(decEq(ammPool.Price(), utils.ParseDec("1.003719250732340753"))) s.Require().True(coinsEq(utils.ParseCoins("31534denom2"), s.getBalances(sdk.MustAccAddressFromBech32(params.DustCollectorAddress)))) s.Require().True(coinsEq(utils.ParseCoins("12546884denom1,12666562denom2"), s.getBalances(orderer))) @@ -2366,9 +2367,9 @@ func (s *KeeperTestSuite) TestOrderBooks_edgecase1() { s.Require().Len(resp.Pairs[0].OrderBooks[0].Buys, 2) s.Require().True(decEq(utils.ParseDec("0.63219"), resp.Pairs[0].OrderBooks[0].Buys[0].Price)) - s.Require().True(intEq(sdk.NewInt(1178846737645), resp.Pairs[0].OrderBooks[0].Buys[0].UserOrderAmount)) + s.Require().True(intEq(sdkmath.NewInt(1178846737645), resp.Pairs[0].OrderBooks[0].Buys[0].UserOrderAmount)) s.Require().True(decEq(utils.ParseDec("0.5187"), resp.Pairs[0].OrderBooks[0].Buys[1].Price)) - s.Require().True(intEq(sdk.NewInt(13340086), resp.Pairs[0].OrderBooks[0].Buys[1].UserOrderAmount)) + s.Require().True(intEq(sdkmath.NewInt(13340086), resp.Pairs[0].OrderBooks[0].Buys[1].UserOrderAmount)) s.Require().Len(resp.Pairs[0].OrderBooks[0].Sells, 0) } @@ -2381,17 +2382,17 @@ func (s *KeeperTestSuite) TestSwap_edgecase1() { asset2 := s.CreateNewAsset("ASSETTWO", "denom2", 1000000) pair := s.CreateNewLiquidityPair(appID1, addr1, asset1.Denom, asset2.Denom) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.102"), sdk.NewInt(10000), 0) - s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.101"), sdk.NewInt(9995), 0) - s.LimitOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.102"), sdk.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.102"), sdkmath.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.101"), sdkmath.NewInt(9995), 0) + s.LimitOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.102"), sdkmath.NewInt(10000), 0) s.nextBlock() pair, _ = s.keeper.GetPair(s.ctx, appID1, pair.Id) s.Require().True(decEq(utils.ParseDec("0.102"), *pair.LastPrice)) - s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.102"), sdk.NewInt(10000), 0) - s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.101"), sdk.NewInt(9995), 0) - s.LimitOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.102"), sdk.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(2), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.102"), sdkmath.NewInt(10000), 0) + s.LimitOrder(appID1, s.addr(3), pair.Id, types.OrderDirectionSell, utils.ParseDec("0.101"), sdkmath.NewInt(9995), 0) + s.LimitOrder(appID1, s.addr(4), pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.102"), sdkmath.NewInt(10000), 0) s.nextBlock() } @@ -2412,7 +2413,7 @@ func (s *KeeperTestSuite) TestSwap_edgecase2() { s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "17335058855denom2", utils.ParseDec("1.15"), utils.ParseDec("1.55"), utils.ParseDec("1.55")) s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "217771046279denom2", utils.ParseDec("1.25"), utils.ParseDec("1.45"), utils.ParseDec("1.45")) - s.MarketOrder(appID1, addr2, pair.Id, types.OrderDirectionSell, sdk.NewInt(4336_000000), 0) + s.MarketOrder(appID1, addr2, pair.Id, types.OrderDirectionSell, sdkmath.NewInt(4336_000000), 0) s.nextBlock() pair, _ = s.keeper.GetPair(s.ctx, appID1, pair.Id) @@ -2422,7 +2423,7 @@ func (s *KeeperTestSuite) TestSwap_edgecase2() { pair, _ = s.keeper.GetPair(s.ctx, appID1, pair.Id) s.Require().True(decEq(utils.ParseDec("1.6484"), *pair.LastPrice)) - s.MarketOrder(appID1, addr2, pair.Id, types.OrderDirectionSell, sdk.NewInt(4450_000000), 0) + s.MarketOrder(appID1, addr2, pair.Id, types.OrderDirectionSell, sdkmath.NewInt(4450_000000), 0) s.nextBlock() pair, _ = s.keeper.GetPair(s.ctx, appID1, pair.Id) @@ -2445,7 +2446,7 @@ func (s *KeeperTestSuite) TestSwap_edgecase3() { s.CreateNewLiquidityPool(appID1, pair.Id, addr1, "110001546090denom2,110013588106denom1") s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "140913832254denom2,130634675302denom1", utils.ParseDec("0.92"), utils.ParseDec("1.08"), utils.ParseDec("0.99989")) - s.MarketOrder(appID1, addr2, pair.Id, types.OrderDirectionBuy, sdk.NewInt(30_000000), 0) + s.MarketOrder(appID1, addr2, pair.Id, types.OrderDirectionBuy, sdkmath.NewInt(30_000000), 0) s.nextBlock() pair, _ = s.keeper.GetPair(s.ctx, appID1, pair.Id) @@ -2469,8 +2470,8 @@ func (s *KeeperTestSuite) TestSwap_edgecase4() { s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000_000000denom1,1000_000000denom2", utils.ParseDec("0.95"), utils.ParseDec("1.05"), utils.ParseDec("1.02")) s.CreateNewLiquidityRangedPool(appID1, pair.Id, addr1, "1000_000000denom1,1000_000000denom2", utils.ParseDec("0.9"), utils.ParseDec("1.2"), utils.ParseDec("0.98")) - s.LimitOrder(appID1, addr2, pair.Id, types.OrderDirectionSell, utils.ParseDec("1.05"), sdk.NewInt(50_000000), 0) - s.LimitOrder(appID1, addr2, pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.97"), sdk.NewInt(100_000000), 0) + s.LimitOrder(appID1, addr2, pair.Id, types.OrderDirectionSell, utils.ParseDec("1.05"), sdkmath.NewInt(50_000000), 0) + s.LimitOrder(appID1, addr2, pair.Id, types.OrderDirectionBuy, utils.ParseDec("0.97"), sdkmath.NewInt(100_000000), 0) s.nextBlock() s.Require().True(utils.ParseCoins("50150000denom1,97291000denom2").IsEqual(s.getBalances(addr2))) diff --git a/x/liquidity/legacy/v1/liquidity.pb.go b/x/liquidity/legacy/v1/liquidity.pb.go index 7118b695f..b85a4b6d5 100644 --- a/x/liquidity/legacy/v1/liquidity.pb.go +++ b/x/liquidity/legacy/v1/liquidity.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_gogo_protobuf_types "github.com/cosmos/gogoproto/types" _ "github.com/golang/protobuf/ptypes/timestamp" io "io" math "math" diff --git a/x/liquidity/legacy/v1/params.pb.go b/x/liquidity/legacy/v1/params.pb.go index 1d125a7b5..d502aa06b 100644 --- a/x/liquidity/legacy/v1/params.pb.go +++ b/x/liquidity/legacy/v1/params.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_gogo_protobuf_types "github.com/cosmos/gogoproto/types" _ "github.com/golang/protobuf/ptypes/duration" io "io" math "math" diff --git a/x/liquidity/legacy/v2/store.go b/x/liquidity/legacy/v2/store.go index 5a025a25e..c853a284b 100644 --- a/x/liquidity/legacy/v2/store.go +++ b/x/liquidity/legacy/v2/store.go @@ -3,6 +3,7 @@ package v2 import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" expected "github.com/comdex-official/comdex/x/liquidity/expected" v1liquidity "github.com/comdex-official/comdex/x/liquidity/legacy/v1" @@ -129,7 +130,7 @@ func MigrateOrders(appID uint64, store sdk.KVStore, cdc codec.BinaryCodec) error func MigrateStore( ctx sdk.Context, assetKeeper expected.AssetKeeper, - storeKey sdk.StoreKey, + storeKey storetypes.StoreKey, cdc codec.BinaryCodec, ) error { allApps, found := assetKeeper.GetApps(ctx) diff --git a/x/liquidity/legacy/v2/store_test.go b/x/liquidity/legacy/v2/store_test.go index 41bd25d80..795306016 100644 --- a/x/liquidity/legacy/v2/store_test.go +++ b/x/liquidity/legacy/v2/store_test.go @@ -12,7 +12,7 @@ package v2_test // "github.com/comdex-official/comdex/x/liquidity/types" // sdk "github.com/cosmos/cosmos-sdk/types" // "github.com/stretchr/testify/require" -// tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +// tmproto "github.com/cometbft/cometbft/proto/tendermint/types" // ) // func CreateNewTestApp(t *testing.T, app *chain.App, ctx sdk.Context, appName string) uint64 { diff --git a/x/liquidity/module.go b/x/liquidity/module.go index 6262f4f17..b2114d3f5 100644 --- a/x/liquidity/module.go +++ b/x/liquidity/module.go @@ -9,12 +9,12 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - abci "github.com/tendermint/tendermint/abci/types" "github.com/comdex-official/comdex/x/liquidity/client/cli" "github.com/comdex-official/comdex/x/liquidity/expected" @@ -120,21 +120,11 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/liquidity/module_test.go b/x/liquidity/module_test.go index f988c6b5f..a35ee2a48 100644 --- a/x/liquidity/module_test.go +++ b/x/liquidity/module_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -35,7 +35,7 @@ func TestModuleTestSuite(t *testing.T) { } func (suite *ModuleTestSuite) SetupTest() { - app := chain.Setup(false) + app := chain.Setup(suite.T(), false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) suite.app = app @@ -207,7 +207,7 @@ func (s *ModuleTestSuite) LimitOrder( params, err := s.keeper.GetGenericParams(s.ctx, appID) s.Require().NoError(err) - offerCoin = offerCoin.Add(sdk.NewCoin(offerCoin.Denom, offerCoin.Amount.ToDec().Mul(params.SwapFeeRate).RoundInt())) + offerCoin = offerCoin.Add(sdk.NewCoin(offerCoin.Denom, sdk.NewDec(offerCoin.Amount.Int64()).Mul(params.SwapFeeRate).RoundInt())) s.fundAddr(orderer, sdk.NewCoins(offerCoin)) msg := types.NewMsgLimitOrder( @@ -246,7 +246,7 @@ func (s *ModuleTestSuite) MarketOrder( demandCoinDenom = pair.QuoteCoinDenom } - offerCoin = offerCoin.Add(sdk.NewCoin(offerCoin.Denom, offerCoin.Amount.ToDec().Mul(params.SwapFeeRate).RoundInt())) + offerCoin = offerCoin.Add(sdk.NewCoin(offerCoin.Denom, sdk.NewDec(offerCoin.Amount.Int64()).Mul(params.SwapFeeRate).RoundInt())) s.fundAddr(orderer, sdk.NewCoins(offerCoin)) msg := types.NewMsgMarketOrder( diff --git a/x/liquidity/types/codec.go b/x/liquidity/types/codec.go index 824e3a30f..accfe9c00 100644 --- a/x/liquidity/types/codec.go +++ b/x/liquidity/types/codec.go @@ -6,7 +6,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // RegisterLegacyAminoCodec registers the necessary x/liquidity interfaces and concrete types @@ -71,5 +71,6 @@ var ( func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/liquidity/types/genesis.pb.go b/x/liquidity/types/genesis.pb.go index 7571b2d76..732260113 100644 --- a/x/liquidity/types/genesis.pb.go +++ b/x/liquidity/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/liquidity/types/gov.go b/x/liquidity/types/gov.go index 3cf4199c1..5a6ca91ea 100644 --- a/x/liquidity/types/gov.go +++ b/x/liquidity/types/gov.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -15,8 +15,6 @@ const ( func init() { govtypes.RegisterProposalType(ProposalUpdateGenericParams) govtypes.RegisterProposalType(ProposalCreateNewLiquidityPair) - govtypes.RegisterProposalTypeCodec(&UpdateGenericParamsProposal{}, "comdex/UpdateGenericParams") - govtypes.RegisterProposalTypeCodec(&CreateNewLiquidityPairProposal{}, "comdex/CreateNewLiquidityPair") } var ( diff --git a/x/liquidity/types/gov.pb.go b/x/liquidity/types/gov.pb.go index 4a35e7789..1db281bd2 100644 --- a/x/liquidity/types/gov.pb.go +++ b/x/liquidity/types/gov.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/liquidity/types/keys_test.go b/x/liquidity/types/keys_test.go index 20279e878..7a452064c 100644 --- a/x/liquidity/types/keys_test.go +++ b/x/liquidity/types/keys_test.go @@ -4,9 +4,9 @@ import ( "bytes" "testing" + "github.com/cometbft/cometbft/crypto" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/tendermint/tendermint/crypto" "github.com/comdex-official/comdex/x/liquidity/types" ) diff --git a/x/liquidity/types/liquidity.pb.go b/x/liquidity/types/liquidity.pb.go index 4b74e687d..b2c6fca9d 100644 --- a/x/liquidity/types/liquidity.pb.go +++ b/x/liquidity/types/liquidity.pb.go @@ -4,12 +4,13 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -243,15 +244,15 @@ func (AddressType) EnumDescriptor() ([]byte, []int) { // Pair defines a coin pair. type Pair struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - BaseCoinDenom string `protobuf:"bytes,2,opt,name=base_coin_denom,json=baseCoinDenom,proto3" json:"base_coin_denom,omitempty"` - QuoteCoinDenom string `protobuf:"bytes,3,opt,name=quote_coin_denom,json=quoteCoinDenom,proto3" json:"quote_coin_denom,omitempty"` - EscrowAddress string `protobuf:"bytes,4,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"` - LastOrderId uint64 `protobuf:"varint,5,opt,name=last_order_id,json=lastOrderId,proto3" json:"last_order_id,omitempty"` - LastPrice *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=last_price,json=lastPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"last_price,omitempty"` - CurrentBatchId uint64 `protobuf:"varint,7,opt,name=current_batch_id,json=currentBatchId,proto3" json:"current_batch_id,omitempty"` - SwapFeeCollectorAddress string `protobuf:"bytes,8,opt,name=swap_fee_collector_address,json=swapFeeCollectorAddress,proto3" json:"swap_fee_collector_address,omitempty"` - AppId uint64 `protobuf:"varint,9,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + BaseCoinDenom string `protobuf:"bytes,2,opt,name=base_coin_denom,json=baseCoinDenom,proto3" json:"base_coin_denom,omitempty"` + QuoteCoinDenom string `protobuf:"bytes,3,opt,name=quote_coin_denom,json=quoteCoinDenom,proto3" json:"quote_coin_denom,omitempty"` + EscrowAddress string `protobuf:"bytes,4,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"` + LastOrderId uint64 `protobuf:"varint,5,opt,name=last_order_id,json=lastOrderId,proto3" json:"last_order_id,omitempty"` + LastPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=last_price,json=lastPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"last_price,omitempty"` + CurrentBatchId uint64 `protobuf:"varint,7,opt,name=current_batch_id,json=currentBatchId,proto3" json:"current_batch_id,omitempty"` + SwapFeeCollectorAddress string `protobuf:"bytes,8,opt,name=swap_fee_collector_address,json=swapFeeCollectorAddress,proto3" json:"swap_fee_collector_address,omitempty"` + AppId uint64 `protobuf:"varint,9,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` } func (m *Pair) Reset() { *m = Pair{} } @@ -289,18 +290,18 @@ var xxx_messageInfo_Pair proto.InternalMessageInfo // Pool defines a basic liquidity pool with no min-price and max-price. type Pool struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - PairId uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` - ReserveAddress string `protobuf:"bytes,3,opt,name=reserve_address,json=reserveAddress,proto3" json:"reserve_address,omitempty"` - PoolCoinDenom string `protobuf:"bytes,4,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty"` - LastDepositRequestId uint64 `protobuf:"varint,5,opt,name=last_deposit_request_id,json=lastDepositRequestId,proto3" json:"last_deposit_request_id,omitempty"` - LastWithdrawRequestId uint64 `protobuf:"varint,6,opt,name=last_withdraw_request_id,json=lastWithdrawRequestId,proto3" json:"last_withdraw_request_id,omitempty"` - Disabled bool `protobuf:"varint,7,opt,name=disabled,proto3" json:"disabled,omitempty"` - AppId uint64 `protobuf:"varint,8,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - Type PoolType `protobuf:"varint,9,opt,name=type,proto3,enum=comdex.liquidity.v1beta1.PoolType" json:"type,omitempty"` - Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` - MinPrice *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,11,opt,name=min_price,json=minPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_price,omitempty"` - MaxPrice *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,12,opt,name=max_price,json=maxPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_price,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + PairId uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` + ReserveAddress string `protobuf:"bytes,3,opt,name=reserve_address,json=reserveAddress,proto3" json:"reserve_address,omitempty"` + PoolCoinDenom string `protobuf:"bytes,4,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty"` + LastDepositRequestId uint64 `protobuf:"varint,5,opt,name=last_deposit_request_id,json=lastDepositRequestId,proto3" json:"last_deposit_request_id,omitempty"` + LastWithdrawRequestId uint64 `protobuf:"varint,6,opt,name=last_withdraw_request_id,json=lastWithdrawRequestId,proto3" json:"last_withdraw_request_id,omitempty"` + Disabled bool `protobuf:"varint,7,opt,name=disabled,proto3" json:"disabled,omitempty"` + AppId uint64 `protobuf:"varint,8,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` + Type PoolType `protobuf:"varint,9,opt,name=type,proto3,enum=comdex.liquidity.v1beta1.PoolType" json:"type,omitempty"` + Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` + MinPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=min_price,json=minPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price,omitempty"` + MaxPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=max_price,json=maxPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_price,omitempty"` } func (m *Pool) Reset() { *m = Pool{} } @@ -457,9 +458,9 @@ type Order struct { // received_coin specifies the received coin after the swap ReceivedCoin types.Coin `protobuf:"bytes,8,opt,name=received_coin,json=receivedCoin,proto3" json:"received_coin"` // price specifies the price that an orderer is willing to swap - Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` - OpenAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=open_amount,json=openAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"open_amount"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + Amount cosmossdk_io_math.Int `protobuf:"bytes,10,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` + OpenAmount cosmossdk_io_math.Int `protobuf:"bytes,11,opt,name=open_amount,json=openAmount,proto3,customtype=cosmossdk.io/math.Int" json:"open_amount"` // batch_id specifies the pair's batch id when the request is stored BatchId uint64 `protobuf:"varint,12,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"` ExpireAt time.Time `protobuf:"bytes,13,opt,name=expire_at,json=expireAt,proto3,stdtime" json:"expire_at"` @@ -685,123 +686,124 @@ func init() { } var fileDescriptor_579dcc42096fa86d = []byte{ - // 1850 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x73, 0x1a, 0xc9, - 0x15, 0xd7, 0x00, 0x42, 0xf0, 0x90, 0x10, 0x6e, 0x4b, 0x36, 0xc2, 0x6b, 0x44, 0x91, 0xac, 0x4d, - 0xb9, 0x6a, 0xc1, 0xc6, 0x49, 0x9c, 0x8f, 0xdd, 0x4d, 0xf1, 0x31, 0xda, 0x9d, 0x0a, 0x08, 0x3c, - 0xa0, 0x8a, 0x9d, 0x0b, 0x35, 0x9a, 0x69, 0xa1, 0xae, 0x05, 0x66, 0x3c, 0xd3, 0xd8, 0xd2, 0x2d, - 0x97, 0x54, 0x52, 0x9c, 0xf6, 0x94, 0x1b, 0x97, 0xe4, 0x96, 0xbf, 0x20, 0xd7, 0xdc, 0x7c, 0xc8, - 0x61, 0x4f, 0xa9, 0x54, 0x2a, 0xa5, 0x4d, 0xec, 0xff, 0x20, 0xc7, 0x54, 0xaa, 0x92, 0xea, 0xee, - 0x99, 0x61, 0x06, 0x4b, 0x91, 0xbc, 0x6b, 0x9f, 0xa4, 0x7e, 0xfd, 0x7e, 0xef, 0xfb, 0xf5, 0x7b, - 0x03, 0x94, 0x74, 0x73, 0x6c, 0xe0, 0x93, 0xca, 0x88, 0x3c, 0x9b, 0x12, 0x83, 0xd0, 0xd3, 0xca, - 0xf3, 0x07, 0x87, 0x98, 0x6a, 0x0f, 0x16, 0x94, 0xb2, 0x65, 0x9b, 0xd4, 0x44, 0x59, 0xc1, 0x59, - 0x5e, 0xd0, 0x5d, 0xce, 0xdc, 0xd6, 0xd0, 0x1c, 0x9a, 0x9c, 0xa9, 0xc2, 0xfe, 0x13, 0xfc, 0xb9, - 0xbc, 0x6e, 0x3a, 0x63, 0xd3, 0xa9, 0x1c, 0x6a, 0x0e, 0xf6, 0x85, 0xea, 0x26, 0x99, 0xb8, 0xf7, - 0xbb, 0x43, 0xd3, 0x1c, 0x8e, 0x70, 0x85, 0x9f, 0x0e, 0xa7, 0x47, 0x15, 0x4a, 0xc6, 0xd8, 0xa1, - 0xda, 0xd8, 0x12, 0x0c, 0xc5, 0xff, 0x44, 0x20, 0xd6, 0xd5, 0x88, 0x8d, 0xd2, 0x10, 0x21, 0x46, - 0x56, 0x2a, 0x48, 0xa5, 0x98, 0x1a, 0x21, 0x06, 0xba, 0x03, 0x9b, 0x4c, 0xe8, 0x80, 0x09, 0x1b, - 0x18, 0x78, 0x62, 0x8e, 0xb3, 0x91, 0x82, 0x54, 0x4a, 0xaa, 0x1b, 0x8c, 0xdc, 0x30, 0xc9, 0xa4, - 0xc9, 0x88, 0xa8, 0x04, 0x99, 0x67, 0x53, 0x93, 0x86, 0x18, 0xa3, 0x9c, 0x31, 0xcd, 0xe9, 0x0b, - 0xce, 0x0f, 0x21, 0x8d, 0x1d, 0xdd, 0x36, 0x5f, 0x0c, 0x34, 0xc3, 0xb0, 0xb1, 0xe3, 0x64, 0x63, - 0x42, 0xa0, 0xa0, 0xd6, 0x04, 0x11, 0x15, 0x61, 0x63, 0xa4, 0x39, 0x74, 0x60, 0xda, 0x06, 0xb6, - 0x07, 0xc4, 0xc8, 0xae, 0x72, 0x9b, 0x52, 0x8c, 0xd8, 0x61, 0x34, 0xc5, 0x40, 0x0a, 0x00, 0xe7, - 0xb1, 0x6c, 0xa2, 0xe3, 0x6c, 0x9c, 0x89, 0xa9, 0xdf, 0xfb, 0xdb, 0xd9, 0xee, 0x9d, 0x21, 0xa1, - 0xc7, 0xd3, 0xc3, 0xb2, 0x6e, 0x8e, 0x2b, 0x6e, 0x64, 0xc4, 0x9f, 0x8f, 0x1c, 0xe3, 0x8b, 0x0a, - 0x3d, 0xb5, 0xb0, 0x53, 0x6e, 0x62, 0x5d, 0x4d, 0x32, 0x74, 0x97, 0x81, 0x99, 0xfd, 0xfa, 0xd4, - 0xb6, 0xf1, 0x84, 0x0e, 0x0e, 0x35, 0xaa, 0x1f, 0x33, 0x8d, 0x6b, 0x5c, 0x63, 0xda, 0xa5, 0xd7, - 0x19, 0x59, 0x31, 0xd0, 0x4f, 0x20, 0xe7, 0xbc, 0xd0, 0xac, 0xc1, 0x11, 0x66, 0xce, 0x8e, 0x46, - 0x58, 0xa7, 0xa6, 0xed, 0xfb, 0x92, 0xe0, 0xbe, 0xdc, 0x64, 0x1c, 0x7b, 0x18, 0x37, 0xbc, 0x7b, - 0xcf, 0xab, 0x6d, 0x88, 0x6b, 0x96, 0xc5, 0x84, 0x27, 0xb9, 0xf0, 0x55, 0xcd, 0xb2, 0x14, 0xa3, - 0xf8, 0xeb, 0x18, 0xc4, 0xba, 0xa6, 0x39, 0x7a, 0x23, 0xfc, 0x37, 0x61, 0xcd, 0xd2, 0x08, 0xf7, - 0x3f, 0xc2, 0x89, 0x71, 0x76, 0x54, 0x0c, 0x74, 0x17, 0x36, 0x6d, 0xec, 0x60, 0xfb, 0x39, 0xf6, - 0x55, 0xbb, 0xe1, 0x76, 0xc9, 0x9e, 0xc6, 0x3b, 0xb0, 0x69, 0x99, 0xe6, 0x28, 0x98, 0x17, 0x37, - 0xde, 0x8c, 0xbc, 0x48, 0xcb, 0xf7, 0xe1, 0x26, 0x8f, 0xa5, 0x81, 0x2d, 0xd3, 0x21, 0x74, 0x60, - 0xe3, 0x67, 0x53, 0xec, 0xd0, 0x45, 0xe4, 0xb7, 0xd8, 0x75, 0x53, 0xdc, 0xaa, 0xe2, 0x52, 0x31, - 0xd0, 0x23, 0xc8, 0x72, 0xd8, 0x0b, 0x42, 0x8f, 0x0d, 0x5b, 0x7b, 0x11, 0xc4, 0xc5, 0x39, 0x6e, - 0x9b, 0xdd, 0xff, 0xdc, 0xbd, 0x5e, 0x00, 0x73, 0x90, 0x30, 0x88, 0xa3, 0x1d, 0x8e, 0xb0, 0x08, - 0x74, 0x42, 0xf5, 0xcf, 0x81, 0x28, 0x25, 0x02, 0x51, 0x42, 0x3f, 0x80, 0x18, 0xcb, 0x1d, 0x0f, - 0x5d, 0xba, 0x5a, 0x2c, 0x5f, 0xd4, 0x24, 0x65, 0x16, 0xca, 0xfe, 0xa9, 0x85, 0x55, 0xce, 0x8f, - 0xb2, 0xb0, 0xa6, 0xdb, 0x58, 0xa3, 0xa6, 0x9d, 0x05, 0xee, 0xba, 0x77, 0x44, 0x9f, 0x41, 0x72, - 0x4c, 0x26, 0x6e, 0xfd, 0xa4, 0xde, 0xba, 0x7e, 0x12, 0x63, 0x32, 0x11, 0xe5, 0xc3, 0x04, 0x69, - 0x27, 0xae, 0xa0, 0xf5, 0x6f, 0x20, 0x48, 0x3b, 0xe1, 0x82, 0x8a, 0xff, 0x8d, 0x42, 0x3a, 0x1c, - 0xe4, 0x73, 0x6b, 0x82, 0x65, 0x34, 0x50, 0x13, 0xa6, 0x39, 0x52, 0x0c, 0x74, 0x1b, 0x60, 0xec, - 0x0c, 0x07, 0xc7, 0x98, 0x0c, 0x8f, 0x29, 0x2f, 0x87, 0xa8, 0x9a, 0x1c, 0x3b, 0xc3, 0xcf, 0x39, - 0x01, 0x7d, 0x00, 0x49, 0x37, 0xb9, 0xa6, 0xed, 0xd6, 0xc0, 0x82, 0x80, 0x2c, 0xd8, 0xf0, 0x52, - 0xcf, 0x4a, 0xc5, 0xc9, 0xae, 0x16, 0xa2, 0xa5, 0x54, 0x75, 0xa7, 0x2c, 0x0c, 0x2e, 0xb3, 0x76, - 0xf7, 0x03, 0xcc, 0xca, 0xa6, 0x7e, 0xff, 0xe5, 0xd9, 0xee, 0xca, 0x1f, 0xbe, 0xde, 0x2d, 0x5d, - 0xc1, 0x49, 0x06, 0x70, 0xd4, 0x75, 0x57, 0x03, 0x3f, 0x21, 0x1b, 0xd2, 0x9a, 0xae, 0x63, 0x8b, - 0x62, 0xc3, 0x55, 0x19, 0x7f, 0xf7, 0x2a, 0x37, 0x3c, 0x15, 0x42, 0xa7, 0x02, 0x99, 0x31, 0x99, - 0x30, 0x8d, 0x7e, 0x53, 0xf0, 0xea, 0xfb, 0xbf, 0x5a, 0x63, 0x4c, 0xab, 0x9a, 0x16, 0xc0, 0xae, - 0xdb, 0x35, 0xe8, 0xa7, 0x10, 0x77, 0xa8, 0x46, 0xa7, 0xa2, 0xe7, 0xd3, 0xd5, 0xbb, 0x17, 0xd7, - 0xa3, 0x9b, 0xc9, 0x1e, 0x67, 0x57, 0x5d, 0xd8, 0x45, 0x6f, 0xc1, 0xaf, 0xa2, 0xb0, 0xb9, 0xd4, - 0x2e, 0xef, 0xac, 0x04, 0xf2, 0x00, 0x5e, 0xa3, 0x62, 0xaf, 0x06, 0x02, 0x14, 0xf4, 0x31, 0x24, - 0x17, 0x71, 0x59, 0xbd, 0x5a, 0x5c, 0x12, 0xde, 0x3b, 0x82, 0x28, 0x6c, 0x7a, 0xb2, 0x26, 0xef, - 0x2f, 0xa3, 0x69, 0x5f, 0x87, 0x48, 0xe9, 0x22, 0x0f, 0x6b, 0xdf, 0x36, 0x0f, 0xc1, 0xd7, 0xa6, - 0xf8, 0x97, 0x38, 0xac, 0xf2, 0x41, 0x73, 0xf5, 0x47, 0xf9, 0x92, 0xe8, 0x67, 0x61, 0x8d, 0x4f, - 0x33, 0x3f, 0xf4, 0xde, 0x11, 0xed, 0x41, 0xd2, 0x20, 0x36, 0xd6, 0x29, 0x31, 0x45, 0xdc, 0xd3, - 0xd5, 0xd2, 0xc5, 0x6e, 0x70, 0xab, 0x9a, 0x1e, 0xbf, 0xba, 0x80, 0xa2, 0x4f, 0x01, 0xcc, 0xa3, - 0x23, 0x6c, 0x8b, 0x04, 0xc6, 0xaf, 0x96, 0xc0, 0x24, 0x87, 0xf0, 0x0c, 0x3e, 0x86, 0x2d, 0x1b, - 0x8f, 0x35, 0x32, 0x21, 0x93, 0xe1, 0x20, 0x20, 0xe9, 0x8a, 0x2d, 0x82, 0x7c, 0x70, 0xc7, 0x17, - 0xd9, 0x84, 0x0d, 0x1b, 0xeb, 0x98, 0x3c, 0x77, 0xbb, 0x9c, 0x07, 0xf9, 0x0a, 0xb2, 0xd6, 0x3d, - 0x94, 0x2b, 0x65, 0x55, 0xbc, 0xad, 0x49, 0xfe, 0xb6, 0x96, 0x19, 0xcb, 0x5b, 0xbc, 0xaf, 0x02, - 0x8c, 0xf6, 0x20, 0xae, 0x8d, 0xcd, 0xe9, 0x84, 0x8a, 0x39, 0xf0, 0x56, 0x62, 0x94, 0x09, 0x55, - 0x5d, 0x34, 0xea, 0x40, 0xca, 0xb4, 0xf0, 0x64, 0xe0, 0x0a, 0x4b, 0x7d, 0x23, 0x61, 0xc0, 0x44, - 0xd4, 0x84, 0xc0, 0x1d, 0x48, 0xf8, 0x5b, 0xc7, 0x3a, 0x2f, 0xa9, 0xb5, 0x43, 0x77, 0xdd, 0xa8, - 0x41, 0x12, 0x9f, 0x58, 0xc4, 0xc6, 0x03, 0x8d, 0x66, 0x37, 0x78, 0xec, 0x72, 0x65, 0xb1, 0xce, - 0x95, 0xbd, 0x75, 0xae, 0xdc, 0xf7, 0xd6, 0xb9, 0x7a, 0x82, 0x59, 0xf1, 0xe5, 0xd7, 0xbb, 0x92, - 0x9a, 0x10, 0xb0, 0x1a, 0x45, 0x9f, 0xf8, 0x1d, 0x92, 0xe6, 0xa5, 0xf5, 0xe1, 0x25, 0xa5, 0x75, - 0x61, 0x7f, 0x6c, 0x06, 0xa7, 0xf1, 0x23, 0x77, 0x1a, 0x67, 0xb8, 0xcc, 0xef, 0x5c, 0x22, 0x73, - 0x31, 0x8e, 0x8b, 0x53, 0x58, 0x6f, 0xb7, 0xc5, 0x0a, 0x37, 0x31, 0xf0, 0x49, 0xb0, 0x2d, 0xa4, - 0x70, 0x5b, 0x2c, 0x34, 0x47, 0x82, 0x9a, 0x03, 0xfd, 0x17, 0x0d, 0xf5, 0xdf, 0x2d, 0x48, 0x7a, - 0xeb, 0x22, 0xdb, 0x2a, 0xa3, 0xa5, 0x98, 0x9a, 0x30, 0xc5, 0xae, 0xe8, 0x14, 0xff, 0x2c, 0xc1, - 0x7a, 0x4d, 0xa7, 0xe4, 0x39, 0xde, 0xd3, 0xec, 0x71, 0x48, 0xba, 0xb4, 0x2c, 0xfd, 0xdc, 0xb7, - 0xf5, 0x06, 0xc4, 0x8f, 0x38, 0xd2, 0xdd, 0xb4, 0xdc, 0x13, 0xa2, 0x90, 0xe1, 0xff, 0x05, 0x67, - 0x4a, 0xec, 0xb2, 0x22, 0xaf, 0xb0, 0x3c, 0xfd, 0xfb, 0x6c, 0xf7, 0xee, 0x15, 0xdf, 0x3d, 0x35, - 0x2d, 0x74, 0x78, 0xe3, 0xa7, 0xf8, 0x77, 0x09, 0xe0, 0xf1, 0x14, 0x4f, 0xdd, 0x06, 0x39, 0xcf, - 0x08, 0xe9, 0x7d, 0x1b, 0x81, 0x9e, 0x00, 0xf0, 0x55, 0x0a, 0x1b, 0xac, 0x3a, 0x23, 0x97, 0x56, - 0xe7, 0x6d, 0xa6, 0xf0, 0x5f, 0x67, 0xbb, 0xd7, 0x4e, 0xb5, 0xf1, 0xe8, 0xc7, 0xc5, 0x05, 0xb6, - 0xc8, 0x4b, 0x36, 0xe9, 0x12, 0x6a, 0xb4, 0x38, 0x97, 0x60, 0x5d, 0xb8, 0xf7, 0x8e, 0xb3, 0x25, - 0x43, 0xea, 0xd9, 0x14, 0x4f, 0xbd, 0x95, 0x23, 0xc6, 0x07, 0xd4, 0x77, 0x2f, 0xae, 0xde, 0x45, - 0x8c, 0x55, 0xe0, 0x40, 0x3e, 0x75, 0xee, 0xfd, 0x56, 0x82, 0x84, 0xb7, 0x66, 0xa2, 0x2a, 0x6c, - 0x77, 0x3b, 0x9d, 0xd6, 0xa0, 0xff, 0xb4, 0x2b, 0x0f, 0x0e, 0xf6, 0x7b, 0x5d, 0xb9, 0xa1, 0xec, - 0x29, 0x72, 0x33, 0xb3, 0x92, 0xbb, 0x39, 0x9b, 0x17, 0xae, 0x7b, 0x8c, 0x07, 0x13, 0xc7, 0xc2, - 0x3a, 0x39, 0x22, 0x98, 0x7f, 0x58, 0x2d, 0x30, 0xf5, 0x5a, 0x4f, 0x69, 0x64, 0xa4, 0xdc, 0xb5, - 0xd9, 0xbc, 0xb0, 0xe1, 0x71, 0xd7, 0x35, 0x87, 0xe8, 0xec, 0xc3, 0x64, 0xc1, 0xa7, 0xd6, 0xf6, - 0x3f, 0x93, 0x9b, 0x99, 0x48, 0x0e, 0xcd, 0xe6, 0x85, 0xb4, 0xbf, 0xe6, 0x6a, 0x93, 0x21, 0x36, - 0x72, 0xb1, 0xdf, 0xfc, 0x3e, 0xbf, 0x72, 0xef, 0x4f, 0x12, 0x24, 0xfd, 0x8e, 0x43, 0xdf, 0x83, - 0x1b, 0x1d, 0xb5, 0x29, 0xab, 0xe7, 0x99, 0x96, 0x9d, 0xcd, 0x0b, 0x5b, 0x3e, 0x6b, 0xd0, 0xb6, - 0x12, 0x64, 0x02, 0xa8, 0x96, 0xd2, 0x56, 0xfa, 0x19, 0x49, 0xe8, 0xf4, 0xf9, 0x5b, 0x64, 0x4c, - 0x28, 0xba, 0x07, 0xd7, 0x02, 0x9c, 0xed, 0x9a, 0xfa, 0x33, 0xb9, 0x9f, 0x89, 0xe4, 0xae, 0xcf, - 0xe6, 0x85, 0x4d, 0x9f, 0xb5, 0xad, 0xd9, 0x5f, 0x60, 0xca, 0xbe, 0xe8, 0x82, 0xbc, 0xed, 0x4c, - 0x34, 0xb7, 0x39, 0x9b, 0x17, 0x52, 0x0b, 0xbe, 0xb6, 0xeb, 0xc3, 0x1f, 0x25, 0x48, 0x87, 0x87, - 0x1c, 0xfa, 0x14, 0x6e, 0x09, 0x70, 0x53, 0x51, 0xe5, 0x46, 0x5f, 0xe9, 0xec, 0x2f, 0x79, 0x73, - 0x7b, 0x36, 0x2f, 0xec, 0x84, 0x41, 0x41, 0x97, 0xca, 0x70, 0x7d, 0x19, 0x5f, 0x3f, 0x78, 0x9a, - 0x91, 0x72, 0xdb, 0xb3, 0x79, 0xe1, 0x5a, 0x18, 0x57, 0x9f, 0x9e, 0xa2, 0xfb, 0xb0, 0xb5, 0xcc, - 0xdf, 0x93, 0x5b, 0xad, 0x4c, 0x24, 0x77, 0x63, 0x36, 0x2f, 0xa0, 0x30, 0xa0, 0x87, 0x47, 0x23, - 0xd7, 0xf4, 0x5f, 0x46, 0x60, 0x23, 0xb4, 0x66, 0xa0, 0x8f, 0x21, 0xa7, 0xca, 0x8f, 0x0f, 0xe4, - 0x5e, 0x7f, 0xd0, 0xeb, 0xd7, 0xfa, 0x07, 0xbd, 0x25, 0xc3, 0x3f, 0x98, 0xcd, 0x0b, 0xd9, 0x10, - 0x24, 0x68, 0xf7, 0x27, 0x70, 0x6b, 0x09, 0xbd, 0xdf, 0xe9, 0x0f, 0xe4, 0x27, 0x72, 0xe3, 0xa0, - 0x2f, 0x37, 0x33, 0xd2, 0x39, 0xf0, 0x7d, 0x93, 0xca, 0x27, 0x58, 0x9f, 0x52, 0x6c, 0xa0, 0x1f, - 0x42, 0x76, 0x09, 0xde, 0x3b, 0x68, 0x34, 0x64, 0xb9, 0xc9, 0xab, 0x28, 0x37, 0x9b, 0x17, 0x6e, - 0x84, 0xb0, 0xbd, 0xa9, 0xae, 0x63, 0x6c, 0x60, 0x83, 0xd5, 0xf4, 0x12, 0x72, 0xaf, 0xa6, 0xb4, - 0xe4, 0x66, 0x26, 0x2a, 0x6a, 0x3a, 0x04, 0xdb, 0xd3, 0xc8, 0xc8, 0xaf, 0xc0, 0xdf, 0x45, 0x21, - 0x15, 0x98, 0x23, 0xcc, 0x06, 0x11, 0xca, 0x73, 0xdd, 0xe7, 0x36, 0x04, 0xd8, 0x83, 0xce, 0xff, - 0x08, 0x76, 0x42, 0xc8, 0x25, 0xd7, 0x97, 0xa1, 0x41, 0xc7, 0x1f, 0x2d, 0x29, 0x65, 0xd0, 0x76, - 0xad, 0xdf, 0xf8, 0x9c, 0x3b, 0xbe, 0x33, 0x9b, 0x17, 0xb6, 0xc3, 0xc8, 0x36, 0x9b, 0xb7, 0xd8, - 0x40, 0x0d, 0xc8, 0x87, 0x80, 0xdd, 0x9a, 0xda, 0x57, 0x6a, 0xad, 0xd6, 0x53, 0x1f, 0x1e, 0xcd, - 0xed, 0xce, 0xe6, 0x85, 0x5b, 0x01, 0x78, 0x57, 0xb3, 0x29, 0xd1, 0x46, 0xa3, 0x53, 0x4f, 0x88, - 0xdf, 0x76, 0xae, 0x90, 0x46, 0xa7, 0xdd, 0x6d, 0xc9, 0xcc, 0xea, 0x58, 0xa0, 0xed, 0x04, 0xb8, - 0x61, 0x8e, 0xad, 0x11, 0xa6, 0x22, 0xe4, 0x61, 0x54, 0x6d, 0xbf, 0x21, 0xb3, 0x90, 0xaf, 0x8a, - 0x90, 0x07, 0x41, 0xda, 0x44, 0xc7, 0xec, 0x53, 0xd9, 0xaf, 0x53, 0x17, 0x23, 0x3f, 0xe9, 0x2a, - 0xaa, 0xdc, 0xcc, 0xc4, 0x03, 0x75, 0x2a, 0x20, 0x32, 0x5f, 0x07, 0xbc, 0x24, 0x9d, 0x42, 0xca, - 0xfd, 0x85, 0x80, 0xbf, 0x13, 0x0f, 0x60, 0xbb, 0xd6, 0x6c, 0xaa, 0x72, 0xaf, 0x27, 0xba, 0xf3, - 0x61, 0x75, 0x50, 0x7f, 0xda, 0x97, 0x7b, 0x99, 0x15, 0x21, 0x27, 0xc0, 0xfb, 0xb0, 0x5a, 0x3f, - 0xa5, 0xd8, 0x79, 0x03, 0x52, 0xbd, 0xef, 0x42, 0xa4, 0x37, 0x20, 0xd5, 0xfb, 0x1c, 0x22, 0x54, - 0xd7, 0x1f, 0xbf, 0xfc, 0x67, 0x7e, 0xe5, 0xe5, 0xab, 0xbc, 0xf4, 0xd5, 0xab, 0xbc, 0xf4, 0x8f, - 0x57, 0x79, 0xe9, 0xcb, 0xd7, 0xf9, 0x95, 0xaf, 0x5e, 0xe7, 0x57, 0xfe, 0xfa, 0x3a, 0xbf, 0xf2, - 0x8b, 0x87, 0xa1, 0x59, 0xc4, 0x1e, 0xe5, 0x8f, 0xcc, 0xa3, 0x23, 0xa2, 0x13, 0x6d, 0xe4, 0x9e, - 0x2b, 0xc1, 0x5f, 0xd0, 0xf8, 0x70, 0x3a, 0x8c, 0xf3, 0x59, 0xf3, 0xf0, 0x7f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x8d, 0x52, 0xec, 0x37, 0x62, 0x13, 0x00, 0x00, + // 1863 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x73, 0x1a, 0xd9, + 0x11, 0xd7, 0x00, 0x42, 0xd0, 0x92, 0x10, 0x7e, 0xb6, 0x6c, 0x84, 0xd6, 0x40, 0xb1, 0xd9, 0x35, + 0xe5, 0xaa, 0x05, 0x1b, 0x67, 0xe3, 0x6c, 0xb2, 0xeb, 0x14, 0x7f, 0x46, 0xd9, 0xa9, 0x80, 0x84, + 0x07, 0x54, 0xb1, 0x73, 0xa1, 0x46, 0x33, 0x4f, 0xe8, 0x95, 0x81, 0x19, 0xcf, 0x3c, 0x6c, 0x71, + 0xcb, 0x25, 0x55, 0x29, 0x4e, 0x7b, 0xca, 0x8d, 0x4b, 0x72, 0x4a, 0x3e, 0x41, 0xae, 0xb9, 0xf9, + 0x90, 0xc3, 0x1e, 0x53, 0xa9, 0x94, 0x37, 0xb1, 0x3f, 0xc1, 0xe6, 0x98, 0x4b, 0x52, 0xef, 0xbd, + 0x99, 0x61, 0x06, 0x4b, 0x11, 0x55, 0xeb, 0x3d, 0x89, 0xe9, 0xe9, 0x5f, 0xf7, 0xeb, 0xee, 0x5f, + 0xbf, 0xee, 0x11, 0x94, 0x74, 0x73, 0x64, 0xe0, 0xf3, 0xca, 0x90, 0x3c, 0x9f, 0x10, 0x83, 0xd0, + 0x69, 0xe5, 0xc5, 0xfd, 0x13, 0x4c, 0xb5, 0xfb, 0x0b, 0x49, 0xd9, 0xb2, 0x4d, 0x6a, 0xa2, 0x8c, + 0xd0, 0x2c, 0x2f, 0xe4, 0xae, 0x66, 0xf6, 0xc6, 0xc0, 0x1c, 0x98, 0x5c, 0xa9, 0xc2, 0x7e, 0x09, + 0xfd, 0x6c, 0x4e, 0x37, 0x9d, 0x91, 0xe9, 0x54, 0x4e, 0x34, 0x07, 0xfb, 0x46, 0x75, 0x93, 0x8c, + 0xdd, 0xf7, 0xf9, 0x81, 0x69, 0x0e, 0x86, 0xb8, 0xc2, 0x9f, 0x4e, 0x26, 0xa7, 0x15, 0x4a, 0x46, + 0xd8, 0xa1, 0xda, 0xc8, 0x12, 0x0a, 0xc5, 0x6f, 0x23, 0x10, 0xeb, 0x68, 0xc4, 0x46, 0x29, 0x88, + 0x10, 0x23, 0x23, 0x15, 0xa4, 0x52, 0x4c, 0x8d, 0x10, 0x03, 0x7d, 0x0c, 0x3b, 0xcc, 0x68, 0x9f, + 0x19, 0xeb, 0x1b, 0x78, 0x6c, 0x8e, 0x32, 0x91, 0x82, 0x54, 0x4a, 0xaa, 0xdb, 0x4c, 0xdc, 0x30, + 0xc9, 0xb8, 0xc9, 0x84, 0xa8, 0x04, 0xe9, 0xe7, 0x13, 0x93, 0x86, 0x14, 0xa3, 0x5c, 0x31, 0xc5, + 0xe5, 0x0b, 0xcd, 0x8f, 0x20, 0x85, 0x1d, 0xdd, 0x36, 0x5f, 0xf6, 0x35, 0xc3, 0xb0, 0xb1, 0xe3, + 0x64, 0x62, 0xc2, 0xa0, 0x90, 0xd6, 0x84, 0x10, 0x15, 0x61, 0x7b, 0xa8, 0x39, 0xb4, 0x6f, 0xda, + 0x06, 0xb6, 0xfb, 0xc4, 0xc8, 0xac, 0xf3, 0x33, 0x6d, 0x32, 0xe1, 0x11, 0x93, 0x29, 0x06, 0x7a, + 0x04, 0xc0, 0x75, 0x2c, 0x9b, 0xe8, 0x38, 0x13, 0x67, 0x66, 0xea, 0xf9, 0xbf, 0xbf, 0xce, 0xef, + 0x8b, 0x74, 0x38, 0xc6, 0xb3, 0x32, 0x31, 0x2b, 0x23, 0x8d, 0x9e, 0x95, 0x5b, 0x78, 0xa0, 0xe9, + 0xd3, 0x26, 0xd6, 0xd5, 0x24, 0x83, 0x74, 0x18, 0x82, 0x1d, 0x5a, 0x9f, 0xd8, 0x36, 0x1e, 0xd3, + 0xfe, 0x89, 0x46, 0xf5, 0x33, 0xe6, 0x66, 0x83, 0xbb, 0x49, 0xb9, 0xf2, 0x3a, 0x13, 0x2b, 0x06, + 0xfa, 0x29, 0x64, 0x9d, 0x97, 0x9a, 0xd5, 0x3f, 0xc5, 0x2c, 0xc2, 0xe1, 0x10, 0xeb, 0xd4, 0xb4, + 0xfd, 0x00, 0x12, 0x3c, 0x80, 0x5b, 0x4c, 0xe3, 0x00, 0xe3, 0x86, 0xf7, 0xde, 0x0b, 0x65, 0x17, + 0xe2, 0x9a, 0x65, 0x31, 0xe3, 0x49, 0x6e, 0x7c, 0x5d, 0xb3, 0x2c, 0xc5, 0x28, 0x7e, 0x1b, 0x85, + 0x58, 0xc7, 0x34, 0x87, 0xef, 0xe4, 0xfc, 0x16, 0x6c, 0x58, 0x1a, 0xe1, 0x41, 0x47, 0xb8, 0x30, + 0xce, 0x1e, 0x15, 0x03, 0xdd, 0x81, 0x1d, 0x1b, 0x3b, 0xd8, 0x7e, 0x81, 0x7d, 0xd7, 0x6e, 0x8e, + 0x5d, 0xb1, 0xe7, 0xf1, 0x63, 0xd8, 0xb1, 0x4c, 0x73, 0x18, 0x2c, 0x86, 0x9b, 0x64, 0x26, 0x5e, + 0xd4, 0xe2, 0x53, 0xb8, 0xc5, 0x13, 0x68, 0x60, 0xcb, 0x74, 0x08, 0xed, 0xdb, 0xf8, 0xf9, 0x04, + 0x3b, 0x74, 0x91, 0xee, 0x1b, 0xec, 0x75, 0x53, 0xbc, 0x55, 0xc5, 0x4b, 0xc5, 0x40, 0x0f, 0x21, + 0xc3, 0x61, 0x2f, 0x09, 0x3d, 0x33, 0x6c, 0xed, 0x65, 0x10, 0x17, 0xe7, 0xb8, 0x5d, 0xf6, 0xfe, + 0x97, 0xee, 0xeb, 0x05, 0x30, 0x0b, 0x09, 0x83, 0x38, 0xda, 0xc9, 0x10, 0x8b, 0x44, 0x27, 0x54, + 0xff, 0x39, 0x90, 0xa5, 0x44, 0x20, 0x4b, 0xe8, 0x47, 0x10, 0xa3, 0x53, 0x0b, 0xf3, 0xd4, 0xa5, + 0xaa, 0xc5, 0xf2, 0x65, 0x9d, 0x51, 0x66, 0xa9, 0xec, 0x4d, 0x2d, 0xac, 0x72, 0x7d, 0x94, 0x81, + 0x0d, 0xdd, 0xc6, 0x1a, 0x35, 0xed, 0x0c, 0xf0, 0xd0, 0xbd, 0x47, 0xf4, 0x39, 0x24, 0x47, 0x64, + 0xec, 0x92, 0x66, 0x73, 0x35, 0xd2, 0x24, 0x46, 0x64, 0x2c, 0x38, 0xc3, 0xd0, 0xda, 0xb9, 0x8b, + 0xde, 0x5a, 0x15, 0xad, 0x9d, 0x73, 0x74, 0xf1, 0xbf, 0x51, 0x48, 0x85, 0xd3, 0x79, 0x61, 0xf5, + 0x59, 0xed, 0x02, 0xd5, 0x37, 0xcd, 0xa1, 0x62, 0xa0, 0xdb, 0x00, 0x23, 0x67, 0xd0, 0x3f, 0xc3, + 0x64, 0x70, 0x46, 0x79, 0xe1, 0xa3, 0x6a, 0x72, 0xe4, 0x0c, 0xbe, 0xe4, 0x02, 0xf4, 0x01, 0x24, + 0xdd, 0x32, 0x9a, 0xb6, 0x5b, 0xed, 0x85, 0x00, 0x59, 0xb0, 0xed, 0x15, 0x99, 0x91, 0xc2, 0xc9, + 0xac, 0x17, 0xa2, 0xa5, 0xcd, 0xea, 0x5e, 0x59, 0x9c, 0xbb, 0xcc, 0xba, 0xd9, 0x4f, 0x25, 0x23, + 0x48, 0xfd, 0xde, 0xab, 0xd7, 0xf9, 0xb5, 0x3f, 0x7d, 0x93, 0x2f, 0x0d, 0x08, 0x3d, 0x9b, 0x9c, + 0xb0, 0xc4, 0x57, 0xdc, 0x6b, 0x46, 0xfc, 0xf9, 0xc4, 0x31, 0x9e, 0x55, 0x58, 0xae, 0x1d, 0x0e, + 0x70, 0xd4, 0x2d, 0xd7, 0x03, 0x7f, 0x42, 0x36, 0xa4, 0x34, 0x5d, 0xc7, 0x16, 0xc5, 0x86, 0xeb, + 0x32, 0xfe, 0xfe, 0x5d, 0x6e, 0x7b, 0x2e, 0x84, 0x4f, 0x05, 0xd2, 0x23, 0x32, 0x66, 0x1e, 0x7d, + 0xfa, 0x73, 0x9e, 0xfd, 0x5f, 0xaf, 0x31, 0xe6, 0x55, 0x4d, 0x09, 0x60, 0xc7, 0xed, 0x0f, 0xf4, + 0x33, 0x88, 0x3b, 0x54, 0xa3, 0x13, 0xd1, 0xdd, 0xa9, 0xea, 0x9d, 0xcb, 0x99, 0xe7, 0x56, 0xb2, + 0xcb, 0xd5, 0x55, 0x17, 0x76, 0x59, 0xd7, 0xff, 0x26, 0x0a, 0x3b, 0x4b, 0x8d, 0xf1, 0xde, 0x28, + 0x90, 0x03, 0xf0, 0x5a, 0x12, 0x7b, 0x1c, 0x08, 0x48, 0x18, 0x77, 0x17, 0x79, 0x59, 0x5f, 0x2d, + 0x2f, 0x09, 0xef, 0xc6, 0x40, 0x14, 0x76, 0x3c, 0x5b, 0xe3, 0xef, 0xaf, 0xa2, 0x29, 0xdf, 0x87, + 0x28, 0xe9, 0xa2, 0x0e, 0x1b, 0xdf, 0xb5, 0x0e, 0xc1, 0x7b, 0xa5, 0xf8, 0xc7, 0x38, 0xac, 0xf3, + 0x39, 0xb2, 0xfa, 0xf5, 0x7b, 0x45, 0xf6, 0x33, 0xb0, 0xc1, 0x87, 0x95, 0x9f, 0x7a, 0xef, 0x11, + 0x1d, 0x40, 0xd2, 0x20, 0x36, 0xd6, 0x29, 0x31, 0x45, 0xde, 0x53, 0xd5, 0xd2, 0xe5, 0x61, 0xf0, + 0x53, 0x35, 0x3d, 0x7d, 0x75, 0x01, 0x65, 0xf3, 0xce, 0x3c, 0x3d, 0xc5, 0xb6, 0x28, 0x60, 0x7c, + 0xb5, 0x02, 0x26, 0x39, 0x84, 0x57, 0xf0, 0x31, 0xdc, 0xb0, 0xf1, 0x48, 0x23, 0x63, 0x32, 0x1e, + 0xf4, 0x03, 0x96, 0x56, 0x6c, 0x11, 0xe4, 0x83, 0x8f, 0x7c, 0x93, 0x4d, 0xd8, 0xb6, 0xb1, 0x8e, + 0xc9, 0x0b, 0xb7, 0xcb, 0x79, 0x92, 0x57, 0xb0, 0xb5, 0xe5, 0xa1, 0xb8, 0x95, 0xcf, 0x60, 0x5d, + 0x5c, 0xa8, 0x49, 0x7e, 0xa1, 0x7e, 0xc8, 0x54, 0xae, 0xba, 0x54, 0x05, 0x02, 0x7d, 0x0a, 0x71, + 0x6d, 0x64, 0x4e, 0xc6, 0x54, 0x5c, 0xf3, 0xf5, 0xdb, 0x2e, 0x76, 0xf7, 0x5d, 0xac, 0x32, 0xa6, + 0xaa, 0xab, 0x8c, 0x1e, 0xc1, 0xa6, 0x69, 0xe1, 0x71, 0xdf, 0xc5, 0x6e, 0xae, 0x82, 0x05, 0x86, + 0xa8, 0x09, 0xfc, 0x1e, 0x24, 0xfc, 0x95, 0x61, 0x8b, 0xb3, 0x64, 0xe3, 0xc4, 0xdd, 0x15, 0x6a, + 0x90, 0xc4, 0xe7, 0x16, 0xb1, 0x71, 0x5f, 0xa3, 0x99, 0x6d, 0x9e, 0x8e, 0x6c, 0x59, 0x2c, 0x60, + 0x65, 0x6f, 0x01, 0x2b, 0xf7, 0xbc, 0x05, 0xac, 0x9e, 0x60, 0x4e, 0xbf, 0xfa, 0x26, 0x2f, 0xa9, + 0x09, 0x01, 0xab, 0x51, 0xf4, 0x85, 0x4f, 0xfa, 0x14, 0x67, 0xcb, 0x47, 0x57, 0xb0, 0xe5, 0x52, + 0xca, 0xef, 0x04, 0x47, 0xe9, 0x43, 0x77, 0x94, 0xa6, 0xb9, 0xcd, 0x0f, 0xaf, 0xb0, 0xb9, 0x98, + 0xa5, 0xc5, 0x09, 0x6c, 0xb5, 0xdb, 0x62, 0xe9, 0x1a, 0x1b, 0xf8, 0x3c, 0xc8, 0x74, 0x29, 0xcc, + 0xf4, 0x85, 0xe7, 0x48, 0xd0, 0x73, 0xa0, 0xa5, 0xa2, 0xa1, 0x96, 0xda, 0x87, 0xa4, 0xb7, 0xe0, + 0xb1, 0x3d, 0x30, 0x5a, 0x8a, 0xa9, 0x09, 0x53, 0x6c, 0x77, 0x4e, 0xf1, 0xaf, 0x12, 0x6c, 0xd5, + 0x74, 0x4a, 0x5e, 0xe0, 0x03, 0xcd, 0x1e, 0x85, 0xac, 0x4b, 0xcb, 0xd6, 0x2f, 0xbc, 0x2e, 0x6f, + 0x42, 0xfc, 0x94, 0x23, 0xdd, 0x35, 0xc9, 0x7d, 0x42, 0x14, 0xd2, 0xfc, 0x57, 0x70, 0x4c, 0xc4, + 0xae, 0xe2, 0x6d, 0x85, 0xd5, 0xe9, 0x3f, 0xaf, 0xf3, 0x77, 0x56, 0xbc, 0xca, 0xd4, 0x94, 0xf0, + 0xe1, 0x4d, 0x94, 0xe2, 0x3f, 0x24, 0x80, 0xc7, 0x13, 0x3c, 0x71, 0x39, 0x7f, 0xd1, 0x21, 0xa4, + 0xef, 0xfb, 0x10, 0xe8, 0x09, 0x00, 0xdf, 0x83, 0xb0, 0xc1, 0xd8, 0x19, 0xb9, 0x92, 0x9d, 0xbc, + 0x25, 0xfe, 0xfd, 0x3a, 0x7f, 0x6d, 0xaa, 0x8d, 0x86, 0x3f, 0x29, 0x2e, 0xb0, 0x45, 0x4e, 0xd9, + 0xa4, 0x2b, 0xa8, 0xd1, 0xe2, 0x5c, 0x82, 0x2d, 0x11, 0xde, 0x7b, 0xae, 0x96, 0x0c, 0x9b, 0xcf, + 0x27, 0x78, 0xe2, 0x6d, 0x11, 0x31, 0x3e, 0x73, 0x7e, 0x70, 0x39, 0x7b, 0x17, 0x39, 0x56, 0x81, + 0x03, 0xf9, 0x20, 0xb9, 0xfb, 0x3b, 0x09, 0x12, 0xde, 0x8e, 0x88, 0xaa, 0xb0, 0xdb, 0x39, 0x3a, + 0x6a, 0xf5, 0x7b, 0x4f, 0x3b, 0x72, 0xff, 0xf8, 0xb0, 0xdb, 0x91, 0x1b, 0xca, 0x81, 0x22, 0x37, + 0xd3, 0x6b, 0xd9, 0x5b, 0xb3, 0x79, 0xe1, 0xba, 0xa7, 0x78, 0x3c, 0x76, 0x2c, 0xac, 0x93, 0x53, + 0x82, 0xf9, 0xa7, 0xd0, 0x02, 0x53, 0xaf, 0x75, 0x95, 0x46, 0x5a, 0xca, 0x5e, 0x9b, 0xcd, 0x0b, + 0xdb, 0x9e, 0x76, 0x5d, 0x73, 0x88, 0xce, 0xbe, 0x2a, 0x16, 0x7a, 0x6a, 0xed, 0xf0, 0xe7, 0x72, + 0x33, 0x1d, 0xc9, 0xa2, 0xd9, 0xbc, 0x90, 0xf2, 0x77, 0x54, 0x6d, 0x3c, 0xc0, 0x46, 0x36, 0xf6, + 0xdb, 0x3f, 0xe4, 0xd6, 0xee, 0xfe, 0x45, 0x82, 0xa4, 0xdf, 0x71, 0xe8, 0x87, 0x70, 0xf3, 0x48, + 0x6d, 0xca, 0xea, 0x45, 0x47, 0xcb, 0xcc, 0xe6, 0x85, 0x1b, 0xbe, 0x6a, 0xf0, 0x6c, 0x25, 0x48, + 0x07, 0x50, 0x2d, 0xa5, 0xad, 0xf4, 0xd2, 0x92, 0xf0, 0xe9, 0xeb, 0xb7, 0xc8, 0x88, 0x50, 0x74, + 0x17, 0xae, 0x05, 0x34, 0xdb, 0x35, 0xf5, 0x17, 0x72, 0x2f, 0x1d, 0xc9, 0x5e, 0x9f, 0xcd, 0x0b, + 0x3b, 0xbe, 0x6a, 0x5b, 0xb3, 0x9f, 0x61, 0xca, 0xbe, 0xc1, 0x82, 0xba, 0xed, 0x74, 0x34, 0xbb, + 0x33, 0x9b, 0x17, 0x36, 0x17, 0x7a, 0x6d, 0x37, 0x86, 0x3f, 0x4b, 0x90, 0x0a, 0xcf, 0x2d, 0xf4, + 0x08, 0xf6, 0x05, 0xb8, 0xa9, 0xa8, 0x72, 0xa3, 0xa7, 0x1c, 0x1d, 0x2e, 0x45, 0x73, 0x7b, 0x36, + 0x2f, 0xec, 0x85, 0x41, 0xc1, 0x90, 0xca, 0x70, 0x7d, 0x19, 0x5f, 0x3f, 0x7e, 0x9a, 0x96, 0xb2, + 0xbb, 0xb3, 0x79, 0xe1, 0x5a, 0x18, 0x57, 0x9f, 0x4c, 0xd1, 0x3d, 0xb8, 0xb1, 0xac, 0xdf, 0x95, + 0x5b, 0xad, 0x74, 0x24, 0x7b, 0x73, 0x36, 0x2f, 0xa0, 0x30, 0xa0, 0x8b, 0x87, 0x43, 0xf7, 0xe8, + 0xbf, 0x8e, 0xc0, 0x76, 0x68, 0x73, 0x40, 0x9f, 0x43, 0x56, 0x95, 0x1f, 0x1f, 0xcb, 0xdd, 0x5e, + 0xbf, 0xdb, 0xab, 0xf5, 0x8e, 0xbb, 0x4b, 0x07, 0xff, 0x60, 0x36, 0x2f, 0x64, 0x42, 0x90, 0xe0, + 0xb9, 0xbf, 0x80, 0xfd, 0x25, 0xf4, 0xe1, 0x51, 0xaf, 0x2f, 0x3f, 0x91, 0x1b, 0xc7, 0x3d, 0xb9, + 0x99, 0x96, 0x2e, 0x80, 0x1f, 0x9a, 0x54, 0x3e, 0xc7, 0xfa, 0x84, 0x62, 0x03, 0xfd, 0x18, 0x32, + 0x4b, 0xf0, 0xee, 0x71, 0xa3, 0x21, 0xcb, 0x4d, 0xce, 0xa2, 0xec, 0x6c, 0x5e, 0xb8, 0x19, 0xc2, + 0x76, 0x27, 0xba, 0x8e, 0xb1, 0x81, 0x0d, 0xc6, 0xe9, 0x25, 0xe4, 0x41, 0x4d, 0x69, 0xc9, 0xcd, + 0x74, 0x54, 0x70, 0x3a, 0x04, 0x3b, 0xd0, 0xc8, 0xd0, 0x67, 0xe0, 0xef, 0xa3, 0xb0, 0x19, 0x98, + 0x23, 0xec, 0x0c, 0x22, 0x95, 0x17, 0x86, 0xcf, 0xcf, 0x10, 0x50, 0x0f, 0x06, 0xff, 0x19, 0xec, + 0x85, 0x90, 0x4b, 0xa1, 0x2f, 0x43, 0x83, 0x81, 0x3f, 0x5c, 0x72, 0xca, 0xa0, 0xed, 0x5a, 0xaf, + 0xf1, 0x25, 0x0f, 0x7c, 0x6f, 0x36, 0x2f, 0xec, 0x86, 0x91, 0x6d, 0x36, 0x6f, 0xb1, 0x81, 0x1a, + 0x90, 0x0b, 0x01, 0x3b, 0x35, 0xb5, 0xa7, 0xd4, 0x5a, 0xad, 0xa7, 0x3e, 0x3c, 0x9a, 0xcd, 0xcf, + 0xe6, 0x85, 0xfd, 0x00, 0xbc, 0xa3, 0xd9, 0x94, 0x68, 0xc3, 0xe1, 0xd4, 0x33, 0xe2, 0xb7, 0x9d, + 0x6b, 0xa4, 0x71, 0xd4, 0xee, 0xb4, 0x64, 0x76, 0xea, 0x58, 0xa0, 0xed, 0x04, 0xb8, 0x61, 0x8e, + 0xac, 0x21, 0xa6, 0x22, 0xe5, 0x61, 0x54, 0xed, 0xb0, 0x21, 0xb3, 0x94, 0xaf, 0x8b, 0x94, 0x07, + 0x41, 0xda, 0x58, 0xc7, 0xec, 0x3b, 0xd7, 0xe7, 0xa9, 0x8b, 0x91, 0x9f, 0x74, 0x14, 0x55, 0x6e, + 0xa6, 0xe3, 0x01, 0x9e, 0x0a, 0x88, 0xcc, 0xd7, 0x01, 0xaf, 0x48, 0x53, 0xd8, 0x74, 0x3f, 0xef, + 0xf9, 0x3d, 0x71, 0x1f, 0x76, 0x6b, 0xcd, 0xa6, 0x2a, 0x77, 0xbb, 0xa2, 0x3b, 0x1f, 0x54, 0xfb, + 0xf5, 0xa7, 0x3d, 0xb9, 0x9b, 0x5e, 0x13, 0x76, 0x02, 0xba, 0x0f, 0xaa, 0xf5, 0x29, 0xc5, 0xce, + 0x3b, 0x90, 0xea, 0x3d, 0x17, 0x22, 0xbd, 0x03, 0xa9, 0xde, 0xe3, 0x10, 0xe1, 0xba, 0xfe, 0xf8, + 0xd5, 0xbf, 0x72, 0x6b, 0xaf, 0xde, 0xe4, 0xa4, 0xaf, 0xdf, 0xe4, 0xa4, 0x7f, 0xbe, 0xc9, 0x49, + 0x5f, 0xbd, 0xcd, 0xad, 0x7d, 0xfd, 0x36, 0xb7, 0xf6, 0xb7, 0xb7, 0xb9, 0xb5, 0x5f, 0x3d, 0x08, + 0xcd, 0x22, 0x76, 0x29, 0x7f, 0x62, 0x9e, 0x9e, 0x12, 0x9d, 0x68, 0x43, 0xf7, 0xb9, 0x12, 0xfc, + 0x9f, 0x17, 0x1f, 0x4e, 0x27, 0x71, 0x3e, 0x6b, 0x1e, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x2b, + 0xb5, 0xed, 0x6d, 0x14, 0x13, 0x00, 0x00, } func (m *Pair) Marshal() (dAtA []byte, err error) { @@ -1204,7 +1206,7 @@ func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x70 } - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpireAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireAt):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ExpireAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExpireAt):]) if err3 != nil { return 0, err3 } @@ -1435,7 +1437,7 @@ func (m *QueuedCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + n10, err10 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err10 != nil { return 0, err10 } @@ -1727,7 +1729,7 @@ func (m *Order) Size() (n int) { if m.BatchId != 0 { n += 1 + sovLiquidity(uint64(m.BatchId)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireAt) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExpireAt) n += 1 + l + sovLiquidity(uint64(l)) if m.Status != 0 { n += 1 + sovLiquidity(uint64(m.Status)) @@ -1796,7 +1798,7 @@ func (m *QueuedCoin) Size() (n int) { _ = l l = m.FarmedPoolCoin.Size() n += 1 + l + sovLiquidity(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovLiquidity(uint64(l)) return n } @@ -2025,7 +2027,7 @@ func (m *Pair) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.LastPrice = &v if err := m.LastPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2411,7 +2413,7 @@ func (m *Pool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.MinPrice = &v if err := m.MinPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2447,7 +2449,7 @@ func (m *Pool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.MaxPrice = &v if err := m.MaxPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3382,7 +3384,7 @@ func (m *Order) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExpireAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ExpireAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3904,7 +3906,7 @@ func (m *QueuedCoin) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/liquidity/types/msgs_test.go b/x/liquidity/types/msgs_test.go index 47057718c..6f1c83bc9 100644 --- a/x/liquidity/types/msgs_test.go +++ b/x/liquidity/types/msgs_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" + "github.com/cometbft/cometbft/crypto" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/crypto" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidity/types" diff --git a/x/liquidity/types/order.go b/x/liquidity/types/order.go index d29eea79d..41bafeef7 100644 --- a/x/liquidity/types/order.go +++ b/x/liquidity/types/order.go @@ -41,7 +41,7 @@ func NewUserOrder(order Order) *UserOrder { utils.SafeMath(func() { amt = sdk.MinInt( order.OpenAmount, - order.RemainingOfferCoin.Amount.ToDec().QuoTruncate(order.Price).TruncateInt(), + sdk.NewDec(order.RemainingOfferCoin.Amount.Int64()).QuoTruncate(order.Price).TruncateInt(), ) }, func() { amt = order.OpenAmount diff --git a/x/liquidity/types/params.pb.go b/x/liquidity/types/params.pb.go index 1ce9f40e2..d8237db64 100644 --- a/x/liquidity/types/params.pb.go +++ b/x/liquidity/types/params.pb.go @@ -4,12 +4,13 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" io "io" math "math" @@ -72,19 +73,19 @@ type GenericParams struct { TickPrecision uint64 `protobuf:"varint,2,opt,name=tick_precision,json=tickPrecision,proto3" json:"tick_precision,omitempty"` FeeCollectorAddress string `protobuf:"bytes,3,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` DustCollectorAddress string `protobuf:"bytes,4,opt,name=dust_collector_address,json=dustCollectorAddress,proto3" json:"dust_collector_address,omitempty"` - MinInitialPoolCoinSupply github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=min_initial_pool_coin_supply,json=minInitialPoolCoinSupply,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_initial_pool_coin_supply"` + MinInitialPoolCoinSupply cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=min_initial_pool_coin_supply,json=minInitialPoolCoinSupply,proto3,customtype=cosmossdk.io/math.Int" json:"min_initial_pool_coin_supply"` PairCreationFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=pair_creation_fee,json=pairCreationFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"pair_creation_fee"` PoolCreationFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=pool_creation_fee,json=poolCreationFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"pool_creation_fee"` - MinInitialDepositAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=min_initial_deposit_amount,json=minInitialDepositAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_initial_deposit_amount"` - MaxPriceLimitRatio github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=max_price_limit_ratio,json=maxPriceLimitRatio,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_price_limit_ratio"` + MinInitialDepositAmount cosmossdk_io_math.Int `protobuf:"bytes,8,opt,name=min_initial_deposit_amount,json=minInitialDepositAmount,proto3,customtype=cosmossdk.io/math.Int" json:"min_initial_deposit_amount"` + MaxPriceLimitRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=max_price_limit_ratio,json=maxPriceLimitRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_price_limit_ratio"` MaxOrderLifespan time.Duration `protobuf:"bytes,10,opt,name=max_order_lifespan,json=maxOrderLifespan,proto3,stdduration" json:"max_order_lifespan"` - SwapFeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,11,opt,name=swap_fee_rate,json=swapFeeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"swap_fee_rate"` - WithdrawFeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,12,opt,name=withdraw_fee_rate,json=withdrawFeeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"withdraw_fee_rate"` + SwapFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=swap_fee_rate,json=swapFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"swap_fee_rate"` + WithdrawFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=withdraw_fee_rate,json=withdrawFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"withdraw_fee_rate"` DepositExtraGas github_com_cosmos_cosmos_sdk_types.Gas `protobuf:"varint,13,opt,name=deposit_extra_gas,json=depositExtraGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Gas" json:"deposit_extra_gas"` WithdrawExtraGas github_com_cosmos_cosmos_sdk_types.Gas `protobuf:"varint,14,opt,name=withdraw_extra_gas,json=withdrawExtraGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Gas" json:"withdraw_extra_gas"` OrderExtraGas github_com_cosmos_cosmos_sdk_types.Gas `protobuf:"varint,15,opt,name=order_extra_gas,json=orderExtraGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Gas" json:"order_extra_gas"` SwapFeeDistrDenom string `protobuf:"bytes,16,opt,name=swap_fee_distr_denom,json=swapFeeDistrDenom,proto3" json:"swap_fee_distr_denom,omitempty"` - SwapFeeBurnRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,17,opt,name=swap_fee_burn_rate,json=swapFeeBurnRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"swap_fee_burn_rate"` + SwapFeeBurnRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=swap_fee_burn_rate,json=swapFeeBurnRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"swap_fee_burn_rate"` AppId uint64 `protobuf:"varint,18,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` MaxNumMarketMakingOrderTicks uint64 `protobuf:"varint,19,opt,name=max_num_market_making_order_ticks,json=maxNumMarketMakingOrderTicks,proto3" json:"max_num_market_making_order_ticks,omitempty"` MaxNumActivePoolsPerPair uint64 `protobuf:"varint,20,opt,name=max_num_active_pools_per_pair,json=maxNumActivePoolsPerPair,proto3" json:"max_num_active_pools_per_pair,omitempty"` @@ -133,59 +134,60 @@ func init() { } var fileDescriptor_babec35f52b1356c = []byte{ - // 821 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0x6d, 0xda, 0x86, 0x64, 0x52, 0xd7, 0xc9, 0x34, 0x81, 0x21, 0x6a, 0x9d, 0x50, 0xa9, - 0x28, 0x97, 0xee, 0xd2, 0x96, 0x3b, 0x8a, 0x63, 0x1a, 0x45, 0x6a, 0xc1, 0xdd, 0x22, 0x0e, 0x05, - 0x69, 0x34, 0xde, 0x7d, 0x76, 0x9e, 0xbc, 0xb3, 0x33, 0xcc, 0xcc, 0x36, 0x4e, 0x3f, 0x05, 0x47, - 0x3e, 0x03, 0x77, 0xbe, 0x43, 0x8e, 0x3d, 0x22, 0x0e, 0x2d, 0x24, 0x5f, 0x04, 0xcd, 0xec, 0xae, - 0x63, 0x04, 0x07, 0x6a, 0x89, 0x93, 0xbd, 0xf3, 0xde, 0xfb, 0xfd, 0x77, 0xde, 0x7f, 0xe6, 0x2d, - 0xb9, 0x9f, 0x2a, 0x99, 0xc1, 0x2c, 0xce, 0xf1, 0xc7, 0x12, 0x33, 0x74, 0x67, 0xf1, 0xab, 0x87, - 0x23, 0x70, 0xe2, 0x61, 0xac, 0x85, 0x11, 0xd2, 0x46, 0xda, 0x28, 0xa7, 0x28, 0xab, 0xd2, 0xa2, - 0x79, 0x5a, 0x54, 0xa7, 0xed, 0x6c, 0x4d, 0xd4, 0x44, 0x85, 0xa4, 0xd8, 0xff, 0xab, 0xf2, 0x77, - 0x7a, 0xa9, 0xb2, 0x52, 0xd9, 0x78, 0x24, 0x2c, 0xcc, 0x89, 0xa9, 0xc2, 0xa2, 0x89, 0x4f, 0x94, - 0x9a, 0xe4, 0x10, 0x87, 0xa7, 0x51, 0x39, 0x8e, 0xb3, 0xd2, 0x08, 0x87, 0xaa, 0x8e, 0xdf, 0x5b, - 0x25, 0x2b, 0xc3, 0xa0, 0x7f, 0xef, 0xd7, 0x9b, 0xa4, 0x73, 0x04, 0x05, 0x18, 0x4c, 0xab, 0x15, - 0x7a, 0x97, 0x90, 0x91, 0x70, 0xe9, 0x09, 0xb7, 0xf8, 0x1a, 0x58, 0x7b, 0xaf, 0xbd, 0x7f, 0x3d, - 0x59, 0x0b, 0x2b, 0x2f, 0xf0, 0x35, 0xd0, 0xfb, 0xe4, 0x96, 0xc3, 0x74, 0xca, 0xb5, 0x81, 0x14, - 0x2d, 0xaa, 0x82, 0x7d, 0x10, 0x52, 0x3a, 0x7e, 0x75, 0xd8, 0x2c, 0xd2, 0x47, 0x64, 0x7b, 0x0c, - 0xc0, 0x53, 0x95, 0xe7, 0x90, 0x3a, 0x65, 0xb8, 0xc8, 0x32, 0x03, 0xd6, 0xb2, 0x6b, 0x7b, 0xed, - 0xfd, 0xb5, 0xe4, 0xf6, 0x18, 0xe0, 0xb0, 0x89, 0x1d, 0x54, 0x21, 0xfa, 0x05, 0xf9, 0x28, 0x2b, - 0xad, 0xfb, 0x97, 0xa2, 0xeb, 0xa1, 0x68, 0xcb, 0x47, 0xff, 0x51, 0x55, 0x90, 0x3b, 0x12, 0x0b, - 0x8e, 0x05, 0x3a, 0x14, 0x39, 0xd7, 0x4a, 0xe5, 0xdc, 0xb7, 0x82, 0xdb, 0x52, 0xeb, 0xfc, 0x8c, - 0xdd, 0xf0, 0xb5, 0xfd, 0xe8, 0xfc, 0xed, 0x6e, 0xeb, 0xf7, 0xb7, 0xbb, 0x9f, 0x4d, 0xd0, 0x9d, - 0x94, 0xa3, 0x28, 0x55, 0x32, 0xae, 0x9b, 0x58, 0xfd, 0x3c, 0xb0, 0xd9, 0x34, 0x76, 0x67, 0x1a, - 0x6c, 0x74, 0x5c, 0xb8, 0x84, 0x49, 0x2c, 0x8e, 0x2b, 0xe4, 0x50, 0xa9, 0xfc, 0x50, 0x61, 0xf1, - 0x22, 0xf0, 0xe8, 0x29, 0xd9, 0xd4, 0x02, 0x0d, 0x4f, 0x0d, 0x84, 0x96, 0xf2, 0x31, 0x00, 0x5b, - 0xd9, 0xbb, 0xb6, 0xbf, 0xfe, 0xe8, 0x93, 0xa8, 0x62, 0x45, 0xde, 0x97, 0xc6, 0xc2, 0xc8, 0xd7, - 0xf6, 0x3f, 0xf7, 0xfa, 0xbf, 0xbc, 0xdb, 0xdd, 0xff, 0x0f, 0xfa, 0xbe, 0xc0, 0x26, 0x5d, 0xaf, - 0x72, 0x58, 0x8b, 0x3c, 0x01, 0x08, 0xc2, 0x61, 0x73, 0x8b, 0xc2, 0x1f, 0xfe, 0x1f, 0xc2, 0x7e, - 0xc3, 0x0b, 0xc2, 0x53, 0xb2, 0xb3, 0xd8, 0xe1, 0x0c, 0xb4, 0xb2, 0xe8, 0xb8, 0x90, 0xaa, 0x2c, - 0x1c, 0x5b, 0x5d, 0xaa, 0xbf, 0x1f, 0x5f, 0xf5, 0x77, 0x50, 0xf1, 0x0e, 0x02, 0x8e, 0x0a, 0xb2, - 0x2d, 0xc5, 0x8c, 0x6b, 0x83, 0x29, 0xf0, 0x1c, 0x25, 0x3a, 0x1e, 0x8e, 0x2e, 0x5b, 0x7b, 0x6f, - 0x9d, 0x01, 0xa4, 0x09, 0x95, 0x62, 0x36, 0xf4, 0xac, 0xa7, 0x1e, 0x95, 0x78, 0x12, 0x7d, 0x4e, - 0xfc, 0x2a, 0x57, 0x26, 0x03, 0xc3, 0x73, 0x1c, 0x83, 0xd5, 0xa2, 0x60, 0x64, 0xaf, 0x1d, 0x3a, - 0x59, 0x5d, 0x9d, 0xa8, 0xb9, 0x3a, 0xd1, 0xa0, 0xbe, 0x3a, 0xfd, 0x55, 0x2f, 0xfd, 0xf3, 0xbb, - 0xdd, 0x76, 0xb2, 0x21, 0xc5, 0xec, 0x1b, 0x5f, 0xfd, 0xb4, 0x2e, 0xa6, 0x09, 0xe9, 0xd8, 0x53, - 0xa1, 0xbd, 0x25, 0xfe, 0x75, 0x81, 0xad, 0x2f, 0xf5, 0xb6, 0xeb, 0x1e, 0xf2, 0x04, 0x20, 0x11, - 0x0e, 0xe8, 0x4b, 0xb2, 0x79, 0x8a, 0xee, 0x24, 0x33, 0xe2, 0xf4, 0x8a, 0x7b, 0x73, 0x29, 0x6e, - 0xb7, 0x01, 0x2d, 0xb0, 0x1b, 0x1b, 0x61, 0xe6, 0x8c, 0xe0, 0x13, 0x61, 0x59, 0xc7, 0x5f, 0xe4, - 0xf7, 0x62, 0x1f, 0x09, 0x9b, 0x74, 0x6b, 0xd0, 0x57, 0x9e, 0x73, 0x24, 0x2c, 0xfd, 0x81, 0xd0, - 0xf9, 0x7b, 0x5f, 0xc1, 0x6f, 0x2d, 0x05, 0xdf, 0x68, 0x48, 0x73, 0xfa, 0x77, 0xa4, 0x5b, 0x19, - 0x77, 0x85, 0xee, 0x2e, 0x85, 0xee, 0x04, 0xcc, 0x9c, 0x1b, 0x93, 0xad, 0xb9, 0x83, 0x19, 0x5a, - 0x67, 0x78, 0x06, 0x85, 0x92, 0x6c, 0x23, 0x8c, 0x9e, 0xcd, 0xda, 0x98, 0x81, 0x8f, 0x0c, 0x7c, - 0x80, 0x7e, 0x4f, 0xe8, 0xbc, 0x60, 0x54, 0x9a, 0xa2, 0xf2, 0x67, 0x73, 0x39, 0x7f, 0x6a, 0x7c, - 0xbf, 0x34, 0x45, 0xf0, 0x67, 0x9b, 0xac, 0x08, 0xad, 0x39, 0x66, 0x8c, 0x86, 0xe9, 0x7a, 0x43, - 0x68, 0x7d, 0x9c, 0xd1, 0x23, 0xf2, 0xa9, 0x3f, 0xb9, 0x45, 0x29, 0xb9, 0x14, 0x66, 0x0a, 0x8e, - 0x4b, 0x31, 0xc5, 0x62, 0x52, 0x9f, 0x65, 0x3f, 0x82, 0x2d, 0xbb, 0x1d, 0x2a, 0xee, 0x48, 0x31, - 0xfb, 0xba, 0x94, 0xcf, 0x42, 0xda, 0xb3, 0x90, 0x15, 0x8e, 0xec, 0xb7, 0x3e, 0x87, 0x7e, 0x49, - 0xee, 0x36, 0x20, 0x91, 0x3a, 0x7c, 0x05, 0x61, 0x6e, 0x5a, 0xae, 0xc1, 0x70, 0x3f, 0x77, 0xd8, - 0x56, 0x80, 0xb0, 0x0a, 0x72, 0x10, 0x52, 0xfc, 0x1c, 0xb4, 0x43, 0x30, 0x43, 0x81, 0xa6, 0xff, - 0xfc, 0xfc, 0xcf, 0x5e, 0xeb, 0xfc, 0xa2, 0xd7, 0x7e, 0x73, 0xd1, 0x6b, 0xff, 0x71, 0xd1, 0x6b, - 0xff, 0x74, 0xd9, 0x6b, 0xbd, 0xb9, 0xec, 0xb5, 0x7e, 0xbb, 0xec, 0xb5, 0x5e, 0x3e, 0xfe, 0xdb, - 0xbe, 0xfd, 0xa7, 0xed, 0x81, 0x1a, 0x8f, 0x31, 0x45, 0x91, 0xd7, 0xcf, 0xf1, 0xe2, 0x37, 0x31, - 0x34, 0x62, 0xb4, 0x12, 0xae, 0xdc, 0xe3, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x51, 0xea, 0x47, - 0xa8, 0x34, 0x07, 0x00, 0x00, + // 847 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x41, 0x73, 0x1b, 0x35, + 0x14, 0xc7, 0x6d, 0xda, 0x86, 0x44, 0xc1, 0x75, 0xac, 0x26, 0xb0, 0x84, 0xc6, 0x09, 0x65, 0xca, + 0xe4, 0xd2, 0x5d, 0xda, 0x72, 0x67, 0xe2, 0x98, 0x7a, 0x32, 0x93, 0x52, 0x77, 0xcb, 0xf4, 0x90, + 0x81, 0xd1, 0xc8, 0xbb, 0xcf, 0xce, 0x1b, 0xaf, 0x56, 0x42, 0xd2, 0x36, 0x4e, 0x3f, 0x05, 0x47, + 0x3e, 0x03, 0x9f, 0x24, 0xc7, 0x1e, 0x19, 0x0e, 0x2d, 0x24, 0x07, 0xbe, 0x06, 0x23, 0xed, 0xae, + 0x13, 0xa6, 0x1c, 0x4c, 0x66, 0x38, 0xd9, 0xab, 0xf7, 0xfe, 0xbf, 0xa7, 0x7d, 0x7f, 0xe9, 0x2d, + 0xb9, 0x9f, 0x48, 0x91, 0xc2, 0x2c, 0xca, 0xf0, 0xa7, 0x02, 0x53, 0xb4, 0xa7, 0xd1, 0xab, 0x87, + 0x23, 0xb0, 0xfc, 0x61, 0xa4, 0xb8, 0xe6, 0xc2, 0x84, 0x4a, 0x4b, 0x2b, 0x69, 0x50, 0xa6, 0x85, + 0xf3, 0xb4, 0xb0, 0x4a, 0xdb, 0x5c, 0x9f, 0xc8, 0x89, 0xf4, 0x49, 0x91, 0xfb, 0x57, 0xe6, 0x6f, + 0x76, 0x13, 0x69, 0x84, 0x34, 0xd1, 0x88, 0x1b, 0x98, 0x13, 0x13, 0x89, 0x79, 0x1d, 0x9f, 0x48, + 0x39, 0xc9, 0x20, 0xf2, 0x4f, 0xa3, 0x62, 0x1c, 0xa5, 0x85, 0xe6, 0x16, 0x65, 0x15, 0xbf, 0xb7, + 0x4c, 0x96, 0x86, 0xbe, 0xfe, 0xbd, 0xbf, 0x56, 0x49, 0x6b, 0x00, 0x39, 0x68, 0x4c, 0xca, 0x15, + 0xba, 0x45, 0xc8, 0x88, 0xdb, 0xe4, 0x98, 0x19, 0x7c, 0x0d, 0x41, 0x73, 0xa7, 0xb9, 0x7b, 0x33, + 0x5e, 0xf1, 0x2b, 0x2f, 0xf0, 0x35, 0xd0, 0xfb, 0xe4, 0xb6, 0xc5, 0x64, 0xca, 0x94, 0x86, 0x04, + 0x0d, 0xca, 0x3c, 0xf8, 0xc0, 0xa7, 0xb4, 0xdc, 0xea, 0xb0, 0x5e, 0xa4, 0x8f, 0xc8, 0xc6, 0x18, + 0x80, 0x25, 0x32, 0xcb, 0x20, 0xb1, 0x52, 0x33, 0x9e, 0xa6, 0x1a, 0x8c, 0x09, 0x6e, 0xec, 0x34, + 0x77, 0x57, 0xe2, 0x3b, 0x63, 0x80, 0xfd, 0x3a, 0xb6, 0x57, 0x86, 0xe8, 0xd7, 0xe4, 0xe3, 0xb4, + 0x30, 0xf6, 0x5f, 0x44, 0x37, 0xbd, 0x68, 0xdd, 0x45, 0xdf, 0x53, 0xfd, 0x48, 0xee, 0x0a, 0xcc, + 0x19, 0xe6, 0x68, 0x91, 0x67, 0x4c, 0x49, 0x99, 0x31, 0xd7, 0x0a, 0x66, 0x0a, 0xa5, 0xb2, 0xd3, + 0xe0, 0x96, 0xd3, 0xf6, 0xb6, 0xce, 0xde, 0x6e, 0x37, 0x7e, 0x7f, 0xbb, 0xbd, 0x51, 0x76, 0xce, + 0xa4, 0xd3, 0x10, 0x65, 0x24, 0xb8, 0x3d, 0x0e, 0x0f, 0x72, 0x1b, 0x07, 0x02, 0xf3, 0x83, 0x92, + 0x30, 0x94, 0x32, 0xdb, 0x97, 0x98, 0xbf, 0xf0, 0x72, 0x7a, 0x42, 0x3a, 0x8a, 0xa3, 0x66, 0x89, + 0x06, 0xdf, 0x41, 0x36, 0x06, 0x08, 0x96, 0x76, 0x6e, 0xec, 0xae, 0x3e, 0xfa, 0x34, 0x2c, 0x61, + 0xa1, 0xb3, 0xa1, 0x76, 0x2c, 0x74, 0xda, 0xde, 0x57, 0xae, 0xdc, 0xaf, 0xef, 0xb6, 0x77, 0x27, + 0x68, 0x8f, 0x8b, 0x51, 0x98, 0x48, 0x11, 0x55, 0x9e, 0x95, 0x3f, 0x0f, 0x4c, 0x3a, 0x8d, 0xec, + 0xa9, 0x02, 0xe3, 0x05, 0x26, 0x6e, 0xbb, 0x2a, 0xfb, 0x55, 0x91, 0x27, 0x00, 0xbe, 0xb0, 0x7f, + 0x97, 0xab, 0x85, 0x3f, 0xfc, 0x3f, 0x0a, 0xbb, 0x17, 0xbe, 0x52, 0xf8, 0x88, 0x6c, 0x5e, 0x6d, + 0x68, 0x0a, 0x4a, 0x1a, 0xb4, 0x8c, 0x0b, 0x59, 0xe4, 0x36, 0x58, 0x5e, 0xa4, 0x9d, 0x9f, 0x5c, + 0xb6, 0xb3, 0x5f, 0xca, 0xf7, 0xbc, 0x9a, 0xbe, 0x24, 0x1b, 0x82, 0xcf, 0x98, 0xd2, 0x98, 0x00, + 0xcb, 0x50, 0xa0, 0x65, 0xfe, 0x60, 0x06, 0x2b, 0x1e, 0xfb, 0x45, 0x85, 0xfd, 0xec, 0x7d, 0xec, + 0x21, 0x4c, 0x78, 0x72, 0xda, 0x87, 0x24, 0xa6, 0x82, 0xcf, 0x86, 0x0e, 0x70, 0xe8, 0xf4, 0xb1, + 0x93, 0xd3, 0xe7, 0xc4, 0xad, 0x32, 0xa9, 0x53, 0xd0, 0x2c, 0xc3, 0x31, 0x18, 0xc5, 0xf3, 0x80, + 0xec, 0x34, 0x7d, 0xb7, 0xca, 0xdb, 0x10, 0xd6, 0xb7, 0x21, 0xec, 0x57, 0xb7, 0xa1, 0xb7, 0xec, + 0xea, 0xfd, 0xf2, 0x6e, 0xbb, 0x19, 0xaf, 0x09, 0x3e, 0x7b, 0xe6, 0xd4, 0x87, 0x95, 0x98, 0x0e, + 0x48, 0xcb, 0x9c, 0x70, 0xe5, 0xda, 0xee, 0xf6, 0x08, 0xc1, 0xea, 0xe2, 0x5b, 0x5c, 0x75, 0xca, + 0x27, 0x00, 0x31, 0xb7, 0x40, 0x9f, 0x91, 0xce, 0x09, 0xda, 0xe3, 0x54, 0xf3, 0x93, 0x4b, 0xd8, + 0x47, 0x8b, 0xc3, 0xda, 0xb5, 0xba, 0x06, 0x1e, 0x91, 0x4e, 0x6d, 0x0a, 0xcc, 0xac, 0xe6, 0x6c, + 0xc2, 0x4d, 0xd0, 0x72, 0xb7, 0xb0, 0x17, 0x56, 0xc0, 0x2f, 0x17, 0xb0, 0x7f, 0xc0, 0x4d, 0xdc, + 0xae, 0x40, 0xdf, 0x3a, 0xce, 0x80, 0x1b, 0xfa, 0x03, 0xa1, 0xf3, 0xcd, 0x5e, 0xc2, 0x6f, 0x5f, + 0x0b, 0xbe, 0x56, 0x93, 0xe6, 0xf4, 0x97, 0xa4, 0x5d, 0x5a, 0x74, 0x89, 0x6e, 0x5f, 0x0b, 0xdd, + 0xf2, 0x98, 0x39, 0x37, 0x22, 0xeb, 0x73, 0xaf, 0x52, 0x34, 0x56, 0xb3, 0x14, 0x72, 0x29, 0x82, + 0x35, 0x3f, 0x37, 0x3a, 0x95, 0x1b, 0x7d, 0x17, 0xe9, 0xbb, 0x00, 0x1d, 0x12, 0x3a, 0x17, 0x8c, + 0x0a, 0x9d, 0x97, 0xa6, 0x74, 0xfe, 0x83, 0x29, 0x15, 0xb3, 0x57, 0xe8, 0xdc, 0x9b, 0xb2, 0x41, + 0x96, 0xb8, 0x52, 0x0c, 0xd3, 0x80, 0xfa, 0x79, 0x78, 0x8b, 0x2b, 0x75, 0x90, 0xd2, 0x01, 0xf9, + 0xdc, 0x1d, 0xcc, 0xbc, 0x10, 0x4c, 0x70, 0x3d, 0x05, 0xcb, 0x04, 0x9f, 0x62, 0x3e, 0xa9, 0x8e, + 0xaa, 0x1b, 0x9a, 0x26, 0xb8, 0xe3, 0x15, 0x77, 0x05, 0x9f, 0x7d, 0x57, 0x88, 0xa7, 0x3e, 0xed, + 0xa9, 0xcf, 0xf2, 0x27, 0xf2, 0x7b, 0x97, 0x43, 0xbf, 0x21, 0x5b, 0x35, 0x88, 0x27, 0x16, 0x5f, + 0x81, 0x9f, 0x74, 0x86, 0x29, 0xd0, 0xcc, 0x8d, 0x8e, 0x60, 0xdd, 0x43, 0x82, 0x12, 0xb2, 0xe7, + 0x53, 0xdc, 0x28, 0x33, 0x43, 0xd0, 0x43, 0x8e, 0xba, 0xf7, 0xfc, 0xec, 0xcf, 0x6e, 0xe3, 0xec, + 0xbc, 0xdb, 0x7c, 0x73, 0xde, 0x6d, 0xfe, 0x71, 0xde, 0x6d, 0xfe, 0x7c, 0xd1, 0x6d, 0xbc, 0xb9, + 0xe8, 0x36, 0x7e, 0xbb, 0xe8, 0x36, 0x8e, 0x1e, 0xff, 0xa3, 0xf1, 0xee, 0x63, 0xf4, 0x40, 0x8e, + 0xc7, 0x98, 0x20, 0xcf, 0xaa, 0xe7, 0xe8, 0xea, 0x57, 0xcc, 0x3b, 0x31, 0x5a, 0xf2, 0x37, 0xea, + 0xf1, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xae, 0x91, 0x14, 0xe6, 0x06, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -308,7 +310,7 @@ func (m *GenericParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x5a - n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxOrderLifespan, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxOrderLifespan):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxOrderLifespan, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxOrderLifespan):]) if err1 != nil { return 0, err1 } @@ -459,7 +461,7 @@ func (m *GenericParams) Size() (n int) { n += 1 + l + sovParams(uint64(l)) l = m.MaxPriceLimitRatio.Size() n += 1 + l + sovParams(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxOrderLifespan) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxOrderLifespan) n += 1 + l + sovParams(uint64(l)) l = m.SwapFeeRate.Size() n += 1 + l + sovParams(uint64(l)) @@ -878,7 +880,7 @@ func (m *GenericParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxOrderLifespan, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.MaxOrderLifespan, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/liquidity/types/query.pb.go b/x/liquidity/types/query.pb.go index c3221d8c9..01f73d336 100644 --- a/x/liquidity/types/query.pb.go +++ b/x/liquidity/types/query.pb.go @@ -5,14 +5,15 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -1478,21 +1479,21 @@ func (m *QueryOrdersByOrdererRequest) GetAppId() uint64 { // PoolResponse defines a custom pool response message. type PoolResponse struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - PairId uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` - ReserveAddress string `protobuf:"bytes,3,opt,name=reserve_address,json=reserveAddress,proto3" json:"reserve_address,omitempty"` - PoolCoinDenom string `protobuf:"bytes,4,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty"` - Balances PoolBalances `protobuf:"bytes,5,opt,name=balances,proto3" json:"balances"` - LastDepositRequestId uint64 `protobuf:"varint,6,opt,name=last_deposit_request_id,json=lastDepositRequestId,proto3" json:"last_deposit_request_id,omitempty"` - LastWithdrawRequestId uint64 `protobuf:"varint,7,opt,name=last_withdraw_request_id,json=lastWithdrawRequestId,proto3" json:"last_withdraw_request_id,omitempty"` - AppId uint64 `protobuf:"varint,8,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - Type PoolType `protobuf:"varint,9,opt,name=type,proto3,enum=comdex.liquidity.v1beta1.PoolType" json:"type,omitempty"` - Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` - PoolCoinSupply github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=pool_coin_supply,json=poolCoinSupply,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"pool_coin_supply"` - MinPrice *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,12,opt,name=min_price,json=minPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_price,omitempty"` - MaxPrice *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,13,opt,name=max_price,json=maxPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_price,omitempty"` - Price *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,14,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price,omitempty"` - Disabled bool `protobuf:"varint,15,opt,name=disabled,proto3" json:"disabled,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + PairId uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` + ReserveAddress string `protobuf:"bytes,3,opt,name=reserve_address,json=reserveAddress,proto3" json:"reserve_address,omitempty"` + PoolCoinDenom string `protobuf:"bytes,4,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty"` + Balances PoolBalances `protobuf:"bytes,5,opt,name=balances,proto3" json:"balances"` + LastDepositRequestId uint64 `protobuf:"varint,6,opt,name=last_deposit_request_id,json=lastDepositRequestId,proto3" json:"last_deposit_request_id,omitempty"` + LastWithdrawRequestId uint64 `protobuf:"varint,7,opt,name=last_withdraw_request_id,json=lastWithdrawRequestId,proto3" json:"last_withdraw_request_id,omitempty"` + AppId uint64 `protobuf:"varint,8,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` + Type PoolType `protobuf:"varint,9,opt,name=type,proto3,enum=comdex.liquidity.v1beta1.PoolType" json:"type,omitempty"` + Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` + PoolCoinSupply cosmossdk_io_math.Int `protobuf:"bytes,11,opt,name=pool_coin_supply,json=poolCoinSupply,proto3,customtype=cosmossdk.io/math.Int" json:"pool_coin_supply"` + MinPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=min_price,json=minPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price,omitempty"` + MaxPrice *cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=max_price,json=maxPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_price,omitempty"` + Price *cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price,omitempty"` + Disabled bool `protobuf:"varint,15,opt,name=disabled,proto3" json:"disabled,omitempty"` } func (m *PoolResponse) Reset() { *m = PoolResponse{} } @@ -2354,9 +2355,9 @@ func (m *QueryOrderBooksResponse) GetPairs() []OrderBookPairResponse { } type OrderBookPairResponse struct { - PairId uint64 `protobuf:"varint,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` - BasePrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=base_price,json=basePrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"base_price"` - OrderBooks []OrderBookResponse `protobuf:"bytes,3,rep,name=order_books,json=orderBooks,proto3" json:"order_books"` + PairId uint64 `protobuf:"varint,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` + BasePrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=base_price,json=basePrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"base_price"` + OrderBooks []OrderBookResponse `protobuf:"bytes,3,rep,name=order_books,json=orderBooks,proto3" json:"order_books"` } func (m *OrderBookPairResponse) Reset() { *m = OrderBookPairResponse{} } @@ -2407,9 +2408,9 @@ func (m *OrderBookPairResponse) GetOrderBooks() []OrderBookResponse { } type OrderBookResponse struct { - PriceUnit github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=price_unit,json=priceUnit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price_unit"` - Sells []OrderBookTickResponse `protobuf:"bytes,2,rep,name=sells,proto3" json:"sells"` - Buys []OrderBookTickResponse `protobuf:"bytes,3,rep,name=buys,proto3" json:"buys"` + PriceUnit cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price_unit,json=priceUnit,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price_unit"` + Sells []OrderBookTickResponse `protobuf:"bytes,2,rep,name=sells,proto3" json:"sells"` + Buys []OrderBookTickResponse `protobuf:"bytes,3,rep,name=buys,proto3" json:"buys"` } func (m *OrderBookResponse) Reset() { *m = OrderBookResponse{} } @@ -2460,9 +2461,9 @@ func (m *OrderBookResponse) GetBuys() []OrderBookTickResponse { } type OrderBookTickResponse struct { - Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` - UserOrderAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=user_order_amount,json=userOrderAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"user_order_amount"` - PoolOrderAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=pool_order_amount,json=poolOrderAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"pool_order_amount"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` + UserOrderAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=user_order_amount,json=userOrderAmount,proto3,customtype=cosmossdk.io/math.Int" json:"user_order_amount"` + PoolOrderAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=pool_order_amount,json=poolOrderAmount,proto3,customtype=cosmossdk.io/math.Int" json:"pool_order_amount"` } func (m *OrderBookTickResponse) Reset() { *m = OrderBookTickResponse{} } @@ -2709,179 +2710,181 @@ func init() { } var fileDescriptor_d297ec7fcddea2d4 = []byte{ - // 2752 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x4d, 0x6c, 0x1c, 0x49, - 0xf5, 0x4f, 0x8f, 0x67, 0x1c, 0xfb, 0xd9, 0x9e, 0xb1, 0x2b, 0x5f, 0x93, 0x49, 0x32, 0xe3, 0x7f, - 0xff, 0x43, 0x32, 0xe4, 0x63, 0x26, 0x71, 0xbe, 0xbd, 0xbb, 0x51, 0x3c, 0xeb, 0x24, 0xeb, 0x4d, - 0x22, 0x92, 0x4e, 0xa2, 0x5d, 0xa2, 0xc0, 0xd0, 0x33, 0x5d, 0x76, 0x5a, 0xe9, 0xe9, 0x6e, 0x77, - 0xf7, 0xc4, 0xf1, 0x5a, 0xd6, 0x4a, 0x48, 0x5c, 0x10, 0x12, 0x2b, 0x2d, 0x8b, 0x40, 0x88, 0x03, - 0x08, 0x09, 0x01, 0x07, 0x0e, 0xc0, 0x65, 0x2f, 0x48, 0x20, 0xa1, 0x3d, 0xb0, 0xda, 0x5d, 0xe5, - 0x82, 0x38, 0x64, 0x21, 0x81, 0x0b, 0xc7, 0x95, 0xb8, 0x70, 0x42, 0xf5, 0xd1, 0x3d, 0xdd, 0xed, - 0x6e, 0x77, 0x8f, 0x35, 0xe6, 0xe2, 0x71, 0x57, 0xd5, 0x7b, 0xef, 0xf7, 0x3e, 0xea, 0xd5, 0xab, - 0x7a, 0x70, 0xb8, 0x6d, 0x74, 0x14, 0xfc, 0xb4, 0xae, 0xa9, 0xcb, 0x5d, 0x55, 0x51, 0x9d, 0xd5, - 0xfa, 0x93, 0xd3, 0x2d, 0xec, 0xc8, 0xa7, 0xeb, 0xcb, 0x5d, 0x6c, 0xad, 0xd6, 0x4c, 0xcb, 0x70, - 0x0c, 0x54, 0x64, 0xab, 0x6a, 0xde, 0xaa, 0x1a, 0x5f, 0x55, 0xda, 0xbd, 0x64, 0x2c, 0x19, 0x74, - 0x51, 0x9d, 0xfc, 0xc7, 0xd6, 0x97, 0x0e, 0x2e, 0x19, 0xc6, 0x92, 0x86, 0xeb, 0xb2, 0xa9, 0xd6, - 0x65, 0x5d, 0x37, 0x1c, 0xd9, 0x51, 0x0d, 0xdd, 0xe6, 0xb3, 0xe5, 0xb6, 0x61, 0x77, 0x0c, 0xbb, - 0xde, 0x92, 0x6d, 0xec, 0x89, 0x6b, 0x1b, 0xaa, 0xce, 0xe7, 0x8f, 0xf9, 0xe7, 0x29, 0x0c, 0x6f, - 0x95, 0x29, 0x2f, 0xa9, 0x3a, 0x65, 0xc6, 0xd7, 0x56, 0x63, 0xf1, 0xf7, 0xb0, 0xb2, 0x95, 0x5f, - 0x8a, 0x5d, 0x69, 0xca, 0x96, 0xdc, 0x71, 0xc1, 0x55, 0x38, 0x74, 0xfa, 0xd5, 0xea, 0x2e, 0xd6, - 0x1d, 0xb5, 0x83, 0x6d, 0x47, 0xee, 0x98, 0x2e, 0xfa, 0xf0, 0x02, 0xa5, 0x6b, 0xf9, 0x10, 0x89, - 0xbb, 0x01, 0xdd, 0x21, 0x98, 0x6f, 0x53, 0xae, 0x12, 0x5e, 0xee, 0x62, 0xdb, 0x11, 0xef, 0xc3, - 0xae, 0xc0, 0xa8, 0x6d, 0x1a, 0xba, 0x8d, 0xd1, 0x65, 0x18, 0x66, 0xd2, 0x8b, 0xc2, 0xb4, 0x50, - 0x1d, 0x9b, 0x99, 0xae, 0xc5, 0x59, 0xba, 0xc6, 0x28, 0x1b, 0xd9, 0x8f, 0x9e, 0x57, 0x76, 0x48, - 0x9c, 0x4a, 0x9c, 0x81, 0xfd, 0x94, 0xed, 0x75, 0xac, 0x63, 0x4b, 0x6d, 0x07, 0x64, 0xa2, 0x3d, - 0x30, 0x2c, 0x9b, 0x66, 0x53, 0x55, 0x28, 0xf3, 0xac, 0x94, 0x93, 0x4d, 0x73, 0x41, 0x11, 0xdb, - 0x50, 0x8a, 0xa2, 0xe1, 0x88, 0xae, 0x86, 0x10, 0x1d, 0x8d, 0x47, 0x14, 0x60, 0x10, 0x02, 0xf6, - 0x73, 0x01, 0xa6, 0x98, 0xc2, 0x86, 0xa1, 0x79, 0x88, 0xf6, 0xc1, 0x4e, 0x53, 0x56, 0xad, 0x1e, - 0xa4, 0x61, 0xf2, 0xb9, 0xa0, 0xa0, 0x12, 0x8c, 0x28, 0xaa, 0x2d, 0xb7, 0x34, 0xac, 0x14, 0x33, - 0xd3, 0x42, 0x75, 0x54, 0xf2, 0xbe, 0xd1, 0x35, 0x80, 0x9e, 0xdb, 0x8b, 0x43, 0x14, 0xd5, 0x91, - 0x1a, 0x8b, 0x91, 0x1a, 0x89, 0x91, 0x1a, 0x0b, 0xd5, 0x9e, 0xa1, 0x96, 0x30, 0x17, 0x28, 0xf9, - 0x28, 0x7d, 0xe6, 0xc8, 0xfa, 0xcd, 0xf1, 0x13, 0xc1, 0x75, 0x18, 0x43, 0xca, 0xed, 0xd0, 0x80, - 0x9c, 0x49, 0x06, 0x8a, 0xc2, 0xf4, 0x10, 0x17, 0x18, 0xe7, 0x18, 0xc3, 0xd0, 0x5c, 0x32, 0x6e, - 0x05, 0x46, 0x8a, 0xae, 0x07, 0x90, 0x67, 0x3c, 0x7b, 0x6e, 0x8e, 0x9c, 0x71, 0xf2, 0x43, 0x17, - 0x1b, 0x30, 0xe9, 0x41, 0xf4, 0xdb, 0xd2, 0x30, 0x34, 0xbf, 0x2d, 0x0d, 0x43, 0x5b, 0x50, 0x7c, - 0x7a, 0x66, 0xfc, 0x7a, 0xde, 0xf7, 0x39, 0xc4, 0xd3, 0xf2, 0x0a, 0x64, 0x09, 0x15, 0xf7, 0x75, - 0x7f, 0x4a, 0x52, 0x4a, 0xb1, 0x05, 0xd3, 0x1e, 0xdb, 0xc6, 0xaa, 0x84, 0x6d, 0x6c, 0x3d, 0xc1, - 0x73, 0x8a, 0x62, 0x61, 0xdb, 0x73, 0xfb, 0x51, 0x28, 0x58, 0x6c, 0xa2, 0x29, 0xb3, 0x19, 0x2a, - 0x70, 0x54, 0xca, 0x5b, 0x81, 0xf5, 0x71, 0xd0, 0xbf, 0x01, 0x15, 0x9f, 0x0c, 0xf2, 0xf7, 0x75, - 0x43, 0xd5, 0xe7, 0xb1, 0x6e, 0x74, 0x5c, 0x11, 0x47, 0xa0, 0x40, 0xad, 0x41, 0xd2, 0x48, 0x53, - 0x21, 0x33, 0x5c, 0xc4, 0x84, 0xe9, 0x5f, 0x1e, 0x27, 0xe1, 0xdb, 0x5e, 0xb8, 0xca, 0xaa, 0xe5, - 0xe1, 0xde, 0x0b, 0xc3, 0x94, 0x15, 0x0b, 0x82, 0x51, 0x89, 0x7f, 0x85, 0x22, 0x32, 0x33, 0x80, - 0x88, 0x1c, 0xf2, 0x83, 0xf9, 0xa1, 0x17, 0x91, 0x0c, 0x0c, 0xf7, 0xd5, 0x2c, 0xe4, 0xc8, 0x6e, - 0x71, 0x23, 0xb2, 0xbc, 0x59, 0xaa, 0x50, 0x2d, 0x2f, 0x12, 0x09, 0xc9, 0x36, 0x44, 0xa2, 0xac, - 0x5a, 0x89, 0xbb, 0x3a, 0xc6, 0xd8, 0xb7, 0x7c, 0xb6, 0xf6, 0xb4, 0xbb, 0x08, 0x59, 0x42, 0xc5, - 0x23, 0x31, 0x9d, 0x72, 0x94, 0x42, 0xfc, 0x40, 0x80, 0x03, 0x94, 0xdf, 0x3c, 0x36, 0x0d, 0x5b, - 0x75, 0x38, 0x2c, 0x7b, 0x8b, 0x1b, 0x65, 0x50, 0xf9, 0x46, 0xfc, 0x83, 0x00, 0x07, 0xa3, 0x71, - 0x71, 0x95, 0xbf, 0x0a, 0x93, 0x0a, 0x9b, 0x6a, 0x5a, 0x7c, 0x8e, 0xfb, 0xb6, 0x1a, 0xaf, 0x7e, - 0x90, 0x19, 0x37, 0x44, 0x41, 0x09, 0x8a, 0x18, 0x9c, 0xbf, 0x1f, 0xf2, 0xc3, 0x22, 0x28, 0x36, - 0xd1, 0xb4, 0x79, 0xc8, 0x78, 0x66, 0xcd, 0xa8, 0x4a, 0x5c, 0xa4, 0x3f, 0x89, 0xf4, 0x9c, 0x67, - 0xa0, 0xb7, 0xa0, 0x10, 0x32, 0x10, 0x0f, 0x8f, 0x7e, 0xed, 0x93, 0x0f, 0xda, 0x47, 0xfc, 0xbe, - 0xeb, 0x9a, 0xb7, 0x54, 0xe7, 0x91, 0x62, 0xc9, 0x2b, 0xa9, 0x63, 0x66, 0x9b, 0xb7, 0xfe, 0x9f, - 0x04, 0x38, 0x14, 0x03, 0x8c, 0xdb, 0xe4, 0x21, 0x4c, 0xad, 0xf0, 0xb9, 0x70, 0xd4, 0x7c, 0x39, - 0xde, 0x2a, 0x21, 0x76, 0xdc, 0x2c, 0x93, 0x2b, 0x21, 0x29, 0x83, 0x8b, 0x9b, 0xaf, 0x71, 0xcf, - 0x86, 0x04, 0x0f, 0x2a, 0x70, 0xde, 0x89, 0xf6, 0x9f, 0x67, 0xa5, 0x07, 0x30, 0x19, 0xb6, 0x12, - 0x0f, 0x9d, 0xbe, 0x8d, 0x54, 0x08, 0x19, 0x49, 0xfc, 0x8e, 0x9b, 0x9e, 0xbf, 0x62, 0x29, 0xd8, - 0x4a, 0xae, 0x6d, 0xb6, 0x39, 0x64, 0x7e, 0x2c, 0xf0, 0xd2, 0xd2, 0x85, 0xc3, 0x4d, 0xf0, 0x1a, - 0x0c, 0x1b, 0x74, 0x84, 0x47, 0x47, 0x25, 0x5e, 0x71, 0x4a, 0xe9, 0x16, 0x70, 0x8c, 0x68, 0x70, - 0x91, 0x70, 0x97, 0x67, 0x7b, 0x2a, 0x24, 0xd1, 0x58, 0x29, 0xfd, 0x7f, 0xc7, 0xef, 0x02, 0x4f, - 0xe5, 0x57, 0x20, 0x47, 0xd1, 0x73, 0x57, 0xa7, 0xd4, 0x98, 0xd1, 0x88, 0xbf, 0x76, 0x8f, 0x11, - 0x66, 0xc7, 0x06, 0xfb, 0xed, 0x41, 0x2e, 0xc2, 0x4e, 0x83, 0x8d, 0xf0, 0xca, 0xc2, 0xfd, 0xf4, - 0x2b, 0x93, 0xd9, 0xc4, 0xf3, 0x03, 0xaf, 0x5c, 0xff, 0x9d, 0x83, 0xf1, 0x40, 0x35, 0xc7, 0x8c, - 0x27, 0x78, 0xc6, 0x8b, 0x05, 0x16, 0x51, 0x90, 0x0d, 0x45, 0x16, 0x64, 0x11, 0x65, 0x55, 0x36, - 0xaa, 0xac, 0x7a, 0x03, 0x46, 0x5a, 0xb2, 0x26, 0xeb, 0x6d, 0x6c, 0x17, 0x73, 0x69, 0x6a, 0xc9, - 0x06, 0x5f, 0xcd, 0x7d, 0xe0, 0x51, 0xa3, 0x73, 0xb0, 0x4f, 0x93, 0x6d, 0xa7, 0x19, 0x4a, 0xfc, - 0x44, 0x87, 0x61, 0xaa, 0xc3, 0x6e, 0x32, 0x1d, 0xcc, 0xf2, 0x0b, 0x0a, 0xba, 0x00, 0x45, 0x4a, - 0x16, 0xde, 0xf5, 0x84, 0x6e, 0x27, 0xa5, 0xdb, 0x43, 0xe6, 0x43, 0x5b, 0x3c, 0x50, 0x04, 0x8c, - 0xf8, 0x8b, 0x80, 0xf3, 0x90, 0x75, 0x56, 0x4d, 0x5c, 0x1c, 0x9d, 0x16, 0xaa, 0xf9, 0x19, 0x71, - 0x73, 0x65, 0xee, 0xad, 0x9a, 0x58, 0xa2, 0xeb, 0x49, 0x94, 0xb4, 0x2d, 0x2c, 0x3b, 0x86, 0x55, - 0x04, 0x16, 0x25, 0xfc, 0x13, 0xbd, 0x0d, 0x93, 0x3d, 0x53, 0xda, 0x5d, 0xd3, 0xd4, 0x56, 0x8b, - 0x63, 0x64, 0x49, 0xa3, 0x46, 0x4c, 0xf0, 0xd7, 0xe7, 0x95, 0x23, 0x4b, 0xaa, 0xf3, 0xa8, 0xdb, - 0x22, 0xb2, 0xea, 0xfc, 0x0a, 0xcc, 0x7e, 0x4e, 0xda, 0xca, 0xe3, 0x3a, 0x61, 0x6f, 0xd7, 0x16, - 0x74, 0x47, 0xca, 0xbb, 0xb6, 0xbf, 0x4b, 0xb9, 0xa0, 0xeb, 0x30, 0xda, 0x51, 0xf5, 0xa6, 0x69, - 0xa9, 0x6d, 0x5c, 0x1c, 0xa7, 0x2c, 0x8f, 0xa5, 0x64, 0x37, 0x8f, 0xdb, 0xd2, 0x48, 0x47, 0xd5, - 0x6f, 0x13, 0x5a, 0xca, 0x48, 0x7e, 0xca, 0x19, 0x4d, 0x6c, 0x81, 0x91, 0xfc, 0x94, 0x31, 0xba, - 0x02, 0x39, 0xc6, 0x24, 0xdf, 0x37, 0x13, 0x46, 0x18, 0xb8, 0x10, 0x16, 0xa6, 0x85, 0xea, 0x48, - 0xef, 0x42, 0x48, 0x12, 0xf0, 0xb8, 0x3f, 0x86, 0xd0, 0xab, 0x30, 0x4a, 0x76, 0x13, 0x35, 0x2d, - 0xdf, 0xfb, 0xfb, 0x03, 0xdb, 0xcc, 0x75, 0x16, 0x31, 0x5a, 0x2f, 0xe2, 0x6c, 0x4c, 0xbe, 0xd1, - 0x65, 0x80, 0xe5, 0xae, 0xe1, 0x70, 0xf2, 0x4c, 0x3a, 0xf2, 0x51, 0x4a, 0x42, 0x06, 0xc4, 0x87, - 0x3c, 0x17, 0x5d, 0x93, 0xad, 0x4e, 0x2f, 0x5d, 0x44, 0x5f, 0xbe, 0xfd, 0x07, 0x5f, 0x26, 0x70, - 0xf0, 0xed, 0x85, 0xe1, 0x45, 0xca, 0x80, 0xef, 0x44, 0xfe, 0x25, 0x7e, 0x2c, 0x40, 0xfe, 0x4e, - 0x17, 0x77, 0xb1, 0xe2, 0xde, 0x7b, 0xd0, 0x12, 0x8c, 0x7a, 0x91, 0x94, 0xac, 0x6e, 0x9d, 0xe0, - 0xfd, 0xe5, 0xe7, 0x95, 0xa3, 0x29, 0x1c, 0x40, 0x08, 0xa4, 0x11, 0x37, 0xbc, 0x90, 0x04, 0x23, - 0x0a, 0x51, 0xa7, 0x29, 0x3b, 0xdc, 0x2e, 0xa5, 0x1a, 0x7b, 0xfd, 0xa8, 0xb9, 0xaf, 0x1f, 0xb5, - 0x7b, 0xee, 0xf3, 0x48, 0xe3, 0x00, 0x11, 0xf4, 0xc5, 0xf3, 0x4a, 0x61, 0x55, 0xee, 0x68, 0xb3, - 0xa2, 0x4b, 0x29, 0xbe, 0xf7, 0x79, 0x45, 0x90, 0x76, 0xd2, 0xcf, 0x39, 0x47, 0xfc, 0xa7, 0x7b, - 0x5c, 0xb9, 0xe6, 0xe2, 0xb9, 0xcb, 0x81, 0x49, 0xb9, 0xed, 0xa8, 0x4f, 0x70, 0x73, 0x3b, 0x75, - 0xcb, 0x33, 0x19, 0x9e, 0x29, 0xdf, 0x86, 0xc9, 0x65, 0x6a, 0x5c, 0x9f, 0xd4, 0x4c, 0x52, 0x09, - 0x1e, 0x74, 0x87, 0x5b, 0x62, 0x2e, 0x07, 0x46, 0xc5, 0x35, 0x7e, 0x67, 0x9d, 0x27, 0x09, 0x55, - 0x95, 0x35, 0xf5, 0x1d, 0x4f, 0x6a, 0x62, 0x11, 0x54, 0xf5, 0xa7, 0x0a, 0xb9, 0x63, 0x74, 0x75, - 0x87, 0x47, 0x8b, 0xb7, 0xf5, 0xe7, 0xe8, 0x68, 0xdc, 0xf1, 0xf8, 0x2d, 0x81, 0xdf, 0xca, 0x23, - 0xa5, 0x73, 0x8b, 0xcb, 0x90, 0x23, 0x02, 0xdc, 0xfa, 0x60, 0x13, 0x33, 0x9f, 0xe2, 0x66, 0xae, - 0xa6, 0x34, 0xb3, 0x2d, 0x31, 0xce, 0xe2, 0x59, 0x7e, 0xa4, 0xd2, 0xa7, 0x95, 0x05, 0xbd, 0x8d, - 0x75, 0x62, 0xfd, 0xa4, 0x07, 0xaa, 0x3f, 0xe7, 0x60, 0x82, 0x50, 0x78, 0x04, 0xf1, 0x96, 0xaa, - 0xc0, 0x58, 0x47, 0xb6, 0x1d, 0x6c, 0x51, 0xff, 0x51, 0x23, 0x8d, 0x48, 0xc0, 0x86, 0x08, 0x0b, - 0x74, 0x18, 0xf2, 0xed, 0x47, 0xaa, 0xc6, 0xfd, 0xab, 0x2a, 0xe4, 0xa0, 0x1b, 0xaa, 0x66, 0xa5, - 0x71, 0x3a, 0x4a, 0xa5, 0x28, 0x36, 0x32, 0x60, 0xc2, 0x31, 0x1c, 0x59, 0x6b, 0x5a, 0x78, 0x45, - 0xb6, 0x14, 0x9b, 0x1e, 0x72, 0x83, 0x8d, 0xbc, 0x71, 0x2a, 0x40, 0x62, 0xfc, 0xd1, 0x1a, 0xec, - 0x52, 0x54, 0xdb, 0xb1, 0xd4, 0x56, 0xd7, 0xc1, 0x8a, 0x27, 0x36, 0x37, 0x70, 0xb1, 0xc8, 0x27, - 0xc6, 0x15, 0xfe, 0x7f, 0xc0, 0xc0, 0x34, 0xb1, 0x69, 0xb4, 0x1f, 0xd9, 0xfc, 0x5c, 0x1d, 0xa3, - 0x63, 0x57, 0xe9, 0x10, 0xfa, 0x7f, 0x98, 0x58, 0x54, 0x35, 0x0d, 0x2b, 0xee, 0x1a, 0x76, 0x86, - 0x8e, 0xb3, 0x41, 0xbe, 0xe8, 0x5d, 0xc8, 0xd3, 0xd9, 0xa6, 0xfb, 0x02, 0x4a, 0x8f, 0x50, 0x82, - 0x3f, 0x9c, 0x24, 0xe6, 0xf9, 0x82, 0xc6, 0x6b, 0x04, 0xff, 0xbf, 0x9e, 0x57, 0x8a, 0x41, 0xc2, - 0x13, 0x46, 0x47, 0x75, 0x70, 0xc7, 0x74, 0x56, 0xbf, 0x78, 0x5e, 0xd9, 0xc3, 0xf2, 0x47, 0x70, - 0x85, 0xf8, 0x03, 0x92, 0x45, 0x26, 0xe8, 0xa0, 0xcb, 0x0d, 0x75, 0x60, 0x4a, 0xc7, 0x4f, 0x9d, - 0xa6, 0xa7, 0x23, 0xc1, 0x30, 0x9a, 0x98, 0xa8, 0x0e, 0xf3, 0x44, 0x55, 0x64, 0x82, 0x36, 0xb0, - 0x60, 0x19, 0x6b, 0x92, 0x8c, 0xcf, 0xfb, 0x86, 0x51, 0x19, 0xc6, 0x54, 0xbb, 0x69, 0xaf, 0xc8, - 0x66, 0x73, 0x11, 0x63, 0x7a, 0xbe, 0x8f, 0x48, 0xa3, 0xaa, 0x7d, 0x77, 0x45, 0x36, 0xaf, 0x61, - 0xec, 0x0b, 0xe7, 0x31, 0x7f, 0x38, 0x1b, 0xbe, 0x4d, 0xe0, 0xdf, 0x03, 0x7c, 0x1b, 0xde, 0xe6, - 0x25, 0x96, 0xea, 0x4d, 0xf1, 0x0d, 0x79, 0x74, 0xf3, 0xa2, 0xc3, 0x63, 0xc5, 0x92, 0x42, 0x8f, - 0xb3, 0x78, 0x93, 0xdf, 0xd9, 0x69, 0x86, 0x55, 0x52, 0x67, 0x9d, 0x98, 0xd7, 0x9a, 0x75, 0x0e, - 0x3f, 0xcc, 0x8d, 0xc3, 0xff, 0x3a, 0x64, 0xb7, 0x29, 0x57, 0x53, 0xbe, 0xe2, 0xfb, 0x02, 0xec, - 0xed, 0x95, 0xe5, 0x0d, 0xc3, 0x78, 0x9c, 0x90, 0x3e, 0xd0, 0x7e, 0x18, 0xe1, 0x55, 0xaf, 0x4d, - 0x73, 0x79, 0x56, 0xda, 0xc9, 0xca, 0x5e, 0x1b, 0x1d, 0x83, 0x29, 0x5a, 0x5e, 0x34, 0xbb, 0xba, - 0xea, 0x34, 0x4d, 0x63, 0x85, 0x5c, 0x8f, 0x48, 0x42, 0x98, 0x90, 0x0a, 0x74, 0xe2, 0xbe, 0xae, - 0x3a, 0xb7, 0xe9, 0x30, 0x3a, 0x00, 0xa3, 0x7a, 0xb7, 0xd3, 0x74, 0xd4, 0xf6, 0x63, 0x96, 0x0f, - 0x26, 0xa4, 0x11, 0xbd, 0xdb, 0xb9, 0x47, 0xbe, 0xc5, 0x45, 0xd8, 0xb7, 0x01, 0x14, 0x37, 0xc8, - 0x0d, 0xf7, 0x99, 0x8e, 0x9d, 0x23, 0xf5, 0xa4, 0x4b, 0x88, 0x61, 0x3c, 0xf6, 0x3f, 0x84, 0x05, - 0xde, 0xed, 0xc4, 0x67, 0x02, 0xec, 0x89, 0x5c, 0x16, 0x7f, 0x83, 0xba, 0x05, 0x40, 0x8b, 0x21, - 0x56, 0x80, 0x65, 0xfa, 0xae, 0x30, 0x49, 0x11, 0x46, 0xcb, 0x29, 0x56, 0xca, 0x49, 0x30, 0x46, - 0xef, 0x39, 0xcd, 0x16, 0xd1, 0x92, 0x1a, 0x6b, 0x6c, 0xe6, 0x78, 0x0a, 0xa5, 0x42, 0x0a, 0x81, - 0xe1, 0x99, 0x4a, 0xfc, 0x8f, 0x00, 0x53, 0x1b, 0xd6, 0x11, 0xe0, 0x3d, 0xe7, 0xb0, 0x3b, 0x56, - 0xff, 0xc0, 0x3d, 0x2f, 0x12, 0x3f, 0xd8, 0x58, 0xd3, 0xfa, 0xf1, 0x03, 0xf1, 0x6d, 0xd8, 0x0f, - 0x94, 0x07, 0x5a, 0x80, 0x6c, 0xab, 0xbb, 0xea, 0xaa, 0xbf, 0x45, 0x5e, 0x94, 0x85, 0xf8, 0x41, - 0xc6, 0xe7, 0x52, 0xff, 0x2a, 0x34, 0xef, 0x56, 0xcd, 0x5b, 0xd3, 0x9d, 0x57, 0xce, 0x0f, 0x60, - 0xaa, 0x6b, 0x63, 0xab, 0xc9, 0xbc, 0xe6, 0xab, 0x1e, 0xfa, 0xbf, 0x68, 0x14, 0x08, 0x23, 0x8a, - 0x95, 0x97, 0x1b, 0x0f, 0x60, 0x8a, 0xe6, 0x8e, 0x00, 0xef, 0xa1, 0xad, 0xf1, 0x26, 0x8c, 0x7c, - 0xbc, 0xc5, 0x0f, 0x33, 0x70, 0xe8, 0x1e, 0x39, 0x82, 0xe6, 0x68, 0x89, 0x36, 0xa7, 0x2b, 0xc1, - 0x3a, 0xcb, 0x8e, 0xcf, 0x5c, 0xef, 0xc2, 0x5e, 0x76, 0xa0, 0x6d, 0xa8, 0x20, 0x33, 0x03, 0xcf, - 0x4a, 0xbb, 0x9c, 0x1e, 0x46, 0xaf, 0x8c, 0xf4, 0x00, 0x6c, 0x28, 0x26, 0x87, 0xb6, 0x09, 0x40, - 0xd0, 0x36, 0xe2, 0x05, 0x28, 0xd3, 0x7c, 0x34, 0xa7, 0x69, 0xc1, 0x3c, 0x9d, 0x54, 0x6b, 0xfd, - 0x46, 0xe0, 0x75, 0x6a, 0x14, 0x25, 0x8f, 0xcb, 0x98, 0x3c, 0xbb, 0x0a, 0x87, 0x02, 0x56, 0x97, - 0x75, 0xc5, 0xd5, 0x9f, 0xd5, 0x95, 0x6c, 0xe3, 0x5d, 0x88, 0xdf, 0x2c, 0x9b, 0xba, 0x5b, 0xda, - 0xef, 0x44, 0x4c, 0xd3, 0xa9, 0x99, 0x3f, 0x96, 0x21, 0x47, 0x51, 0xa3, 0xef, 0x0a, 0x30, 0xcc, - 0x1a, 0x90, 0xe8, 0xc4, 0xa6, 0x15, 0x7b, 0xa8, 0x21, 0x5b, 0x3a, 0x99, 0x72, 0x35, 0xb3, 0x81, - 0x58, 0xfd, 0xe6, 0xb3, 0x7f, 0xbc, 0x9f, 0x11, 0xd1, 0x74, 0x3d, 0xa1, 0x8d, 0x8c, 0x7e, 0x27, - 0xc0, 0x44, 0xa0, 0x33, 0x8a, 0xce, 0x24, 0x88, 0x8a, 0x6a, 0xde, 0x96, 0xce, 0xf6, 0x47, 0xc4, - 0x61, 0x5e, 0xa2, 0x30, 0xcf, 0xa0, 0xd3, 0xf1, 0x30, 0x97, 0x18, 0x61, 0x93, 0xc1, 0xad, 0xaf, - 0x31, 0xd7, 0xae, 0xa3, 0xef, 0x09, 0x90, 0xa3, 0x75, 0x3a, 0x3a, 0x9e, 0x64, 0x1a, 0x5f, 0x4b, - 0xb7, 0x74, 0x22, 0xdd, 0x62, 0x8e, 0xef, 0x14, 0xc5, 0x77, 0x0c, 0x55, 0x37, 0x31, 0x23, 0x21, - 0xe8, 0xc1, 0xfa, 0x91, 0x00, 0x59, 0x5a, 0xc9, 0x1f, 0x4b, 0x21, 0xc8, 0x05, 0x75, 0x3c, 0xd5, - 0x5a, 0x8e, 0x69, 0x96, 0x62, 0x3a, 0x8b, 0x66, 0xd2, 0x62, 0xaa, 0xaf, 0xf1, 0x34, 0xb4, 0x8e, - 0x9e, 0x09, 0xb0, 0x3b, 0xaa, 0xf3, 0x89, 0x66, 0x53, 0x20, 0x88, 0x69, 0x97, 0xf6, 0x87, 0x5e, - 0xa2, 0xe8, 0x6f, 0xa2, 0x37, 0x53, 0xa3, 0x0f, 0xbd, 0xfc, 0xd5, 0xd7, 0x42, 0x03, 0xeb, 0xe8, - 0x33, 0x01, 0x76, 0x45, 0xf4, 0x5a, 0xd1, 0xa5, 0x54, 0x4a, 0x45, 0xf5, 0x67, 0xb7, 0x5b, 0xa7, - 0xd0, 0x23, 0x25, 0xf7, 0x50, 0x6f, 0x80, 0x87, 0x37, 0xed, 0x85, 0x26, 0x42, 0xf1, 0xb5, 0x80, - 0x93, 0xc3, 0xdb, 0xdf, 0xa2, 0x4d, 0x15, 0xde, 0x84, 0x20, 0x14, 0xde, 0xb2, 0x6a, 0x25, 0x87, - 0x77, 0xaf, 0xe1, 0x5a, 0x3a, 0x9e, 0x6a, 0x6d, 0x1f, 0xe1, 0x1d, 0xc0, 0x54, 0x5f, 0xe3, 0x85, - 0xe5, 0x3a, 0xfa, 0x58, 0x80, 0x42, 0xa8, 0x7b, 0x89, 0xce, 0x25, 0x08, 0x8f, 0xee, 0xc2, 0x96, - 0xce, 0xf7, 0x4b, 0xc6, 0xe1, 0xdf, 0xa0, 0xf0, 0xaf, 0xa2, 0xd7, 0xfb, 0xdf, 0x9d, 0xf5, 0x70, - 0x77, 0x15, 0x7d, 0x22, 0x40, 0x3e, 0x28, 0x08, 0x9d, 0xed, 0x0b, 0x97, 0xab, 0xcd, 0xb9, 0x3e, - 0xa9, 0xb8, 0x32, 0xb7, 0xa9, 0x32, 0x6f, 0xa2, 0x37, 0x06, 0xa0, 0x4c, 0x7d, 0x8d, 0x78, 0xe8, - 0x33, 0x01, 0x26, 0xc3, 0xbd, 0x42, 0x94, 0x64, 0xeb, 0x98, 0xae, 0x67, 0xe9, 0x42, 0xdf, 0x74, - 0x5c, 0xaf, 0x9b, 0x54, 0xaf, 0x6b, 0x68, 0x7e, 0x0b, 0x7a, 0x6d, 0xe8, 0x66, 0x92, 0xa4, 0x5a, - 0x08, 0x89, 0x4a, 0x8c, 0xba, 0xe8, 0x3e, 0x63, 0xe9, 0x7c, 0xbf, 0x64, 0x5c, 0xa1, 0x3b, 0x54, - 0xa1, 0x1b, 0x68, 0x61, 0x10, 0x0a, 0x31, 0x4f, 0xfd, 0x54, 0x80, 0x61, 0xd6, 0x5a, 0x4a, 0xac, - 0x54, 0x02, 0x8d, 0xc5, 0xc4, 0x4a, 0x25, 0xd8, 0xf7, 0x13, 0x5f, 0xa1, 0xd0, 0xcf, 0xa1, 0x33, - 0xf1, 0xd0, 0x59, 0x8b, 0x2f, 0x6a, 0xc3, 0xff, 0x4c, 0x80, 0x1c, 0xe5, 0x97, 0x98, 0x25, 0xfd, - 0xed, 0xbc, 0xd2, 0x89, 0x74, 0x8b, 0x39, 0xc2, 0x2b, 0x14, 0xe1, 0x2c, 0xba, 0xb8, 0x05, 0x84, - 0xcc, 0x96, 0xbf, 0x15, 0xa0, 0x10, 0x6a, 0xd3, 0x25, 0x46, 0x48, 0x74, 0x5b, 0xef, 0x7f, 0x61, - 0x5d, 0xde, 0x27, 0x5c, 0x47, 0xbf, 0x12, 0x60, 0x98, 0x3d, 0x7b, 0x27, 0x86, 0x40, 0xa0, 0x99, - 0x90, 0x08, 0x32, 0xf8, 0x96, 0x2e, 0xce, 0x53, 0x90, 0x97, 0xd1, 0xab, 0xf1, 0x20, 0x59, 0x77, - 0x21, 0x2a, 0x7c, 0xd7, 0xd8, 0xd4, 0x3a, 0xfa, 0xbb, 0x00, 0xbb, 0x22, 0xde, 0x8f, 0x13, 0xab, - 0x80, 0xf8, 0x17, 0xef, 0xd2, 0xec, 0x56, 0x48, 0xb9, 0x52, 0x77, 0xa9, 0x52, 0xb7, 0xd0, 0x8d, - 0x78, 0xa5, 0x94, 0x1e, 0x79, 0xa4, 0x66, 0xe1, 0x47, 0xf5, 0x75, 0xf4, 0xa1, 0x00, 0xf9, 0xe0, - 0xbb, 0x5c, 0x62, 0x1c, 0x45, 0xbf, 0x65, 0x97, 0xd2, 0x90, 0x6d, 0x7c, 0xfd, 0x4b, 0x5b, 0x7c, - 0xfa, 0x5e, 0x07, 0x7b, 0xb5, 0xc3, 0xef, 0x05, 0xc8, 0x07, 0xef, 0x6c, 0x89, 0xa7, 0x59, 0xe4, - 0x93, 0x60, 0x22, 0xf6, 0xe8, 0xa7, 0xbf, 0x34, 0xfb, 0x98, 0xc6, 0x12, 0xbb, 0x0f, 0x46, 0x95, - 0xcf, 0x9f, 0x08, 0x70, 0x70, 0xb3, 0x4b, 0x20, 0xba, 0x98, 0x80, 0x2c, 0xf6, 0xbe, 0x5b, 0xba, - 0xb4, 0x05, 0xca, 0xf4, 0x3e, 0x91, 0x35, 0xad, 0x19, 0xa5, 0x1b, 0xfa, 0x85, 0x00, 0xd0, 0x7b, - 0x14, 0x44, 0xa7, 0xd2, 0x64, 0x17, 0xff, 0xa3, 0x66, 0xe9, 0x74, 0x1f, 0x14, 0x1c, 0xef, 0x79, - 0x8a, 0xf7, 0x14, 0xaa, 0x25, 0xe4, 0x24, 0xf6, 0x84, 0xe7, 0x61, 0x6d, 0xdc, 0xfa, 0xe8, 0x45, - 0x59, 0xf8, 0xf4, 0x45, 0x59, 0xf8, 0xdb, 0x8b, 0xb2, 0xf0, 0xde, 0xcb, 0xf2, 0x8e, 0x4f, 0x5f, - 0x96, 0x77, 0xfc, 0xe5, 0x65, 0x79, 0xc7, 0x83, 0x33, 0x81, 0xc7, 0x08, 0xc2, 0xf3, 0xa4, 0xb1, - 0xb8, 0xa8, 0xb6, 0x55, 0x59, 0x73, 0x65, 0xf8, 0xa5, 0xd0, 0xd7, 0x89, 0xd6, 0x30, 0x7d, 0x6a, - 0x3f, 0xf3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1c, 0xc2, 0x6a, 0x91, 0x53, 0x2e, 0x00, 0x00, + // 2769 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xdd, 0x6f, 0x1c, 0x57, + 0x15, 0xcf, 0xac, 0x77, 0x1d, 0xfb, 0xd8, 0xde, 0xb5, 0x6f, 0xbe, 0x36, 0x9b, 0xc4, 0x6b, 0xa6, + 0xa1, 0x31, 0xf9, 0xd8, 0x4d, 0x9c, 0x6f, 0xb7, 0x8d, 0xea, 0xad, 0x93, 0xd4, 0x4d, 0x22, 0x92, + 0x49, 0xa2, 0x42, 0x15, 0x58, 0x66, 0x77, 0xae, 0x9d, 0x51, 0x66, 0x67, 0xc6, 0x33, 0xb3, 0x71, + 0xb6, 0x96, 0x55, 0x09, 0x89, 0x17, 0x84, 0x44, 0xa5, 0x02, 0x02, 0x21, 0x1e, 0x40, 0x48, 0x08, + 0x78, 0xe0, 0x01, 0x78, 0xe9, 0x0b, 0x12, 0x95, 0x50, 0x1e, 0xa8, 0xda, 0xaa, 0x2f, 0xa8, 0x0f, + 0x2e, 0x24, 0x20, 0x21, 0x5e, 0x90, 0xfa, 0x17, 0xa0, 0xfb, 0x31, 0xb3, 0x33, 0xe3, 0x99, 0x9d, + 0x59, 0x6b, 0xcd, 0x4b, 0x9c, 0xbd, 0x73, 0xcf, 0x3d, 0xbf, 0xf3, 0x3b, 0xe7, 0x9e, 0x7b, 0xee, + 0x3d, 0x70, 0xb4, 0x69, 0xb4, 0x14, 0xfc, 0xa4, 0xaa, 0xa9, 0xab, 0x6d, 0x55, 0x51, 0x9d, 0x4e, + 0xf5, 0xf1, 0x99, 0x06, 0x76, 0xe4, 0x33, 0xd5, 0xd5, 0x36, 0xb6, 0x3a, 0x15, 0xd3, 0x32, 0x1c, + 0x03, 0x15, 0xd9, 0xac, 0x8a, 0x37, 0xab, 0xc2, 0x67, 0x95, 0xf6, 0xae, 0x18, 0x2b, 0x06, 0x9d, + 0x54, 0x25, 0xff, 0x63, 0xf3, 0x4b, 0x87, 0x57, 0x0c, 0x63, 0x45, 0xc3, 0x55, 0xd9, 0x54, 0xab, + 0xb2, 0xae, 0x1b, 0x8e, 0xec, 0xa8, 0x86, 0x6e, 0xf3, 0xaf, 0xd3, 0x4d, 0xc3, 0x6e, 0x19, 0x76, + 0xb5, 0x21, 0xdb, 0xd8, 0x53, 0xd7, 0x34, 0x54, 0x9d, 0x7f, 0x3f, 0xee, 0xff, 0x4e, 0x61, 0x78, + 0xb3, 0x4c, 0x79, 0x45, 0xd5, 0xe9, 0x62, 0x7c, 0xee, 0x6c, 0x2c, 0xfe, 0x2e, 0x56, 0x36, 0xf3, + 0xcb, 0xb1, 0x33, 0x4d, 0xd9, 0x92, 0x5b, 0x2e, 0xb8, 0x32, 0x87, 0x4e, 0x7f, 0x35, 0xda, 0xcb, + 0x55, 0x47, 0x6d, 0x61, 0xdb, 0x91, 0x5b, 0xa6, 0x8b, 0x3e, 0x3c, 0x41, 0x69, 0x5b, 0x3e, 0x44, + 0xe2, 0x5e, 0x40, 0x77, 0x08, 0xe6, 0xdb, 0x74, 0x55, 0x09, 0xaf, 0xb6, 0xb1, 0xed, 0x88, 0xf7, + 0x61, 0x4f, 0x60, 0xd4, 0x36, 0x0d, 0xdd, 0xc6, 0xe8, 0x0a, 0x0c, 0x33, 0xed, 0x45, 0x61, 0x46, + 0x98, 0x1d, 0x9b, 0x9b, 0xa9, 0xc4, 0x31, 0x5d, 0x61, 0x92, 0xb5, 0xec, 0xd3, 0xcd, 0xf2, 0x2e, + 0x89, 0x4b, 0x89, 0x73, 0x70, 0x90, 0x2e, 0x7b, 0x1d, 0xeb, 0xd8, 0x52, 0x9b, 0x01, 0x9d, 0x68, + 0x1f, 0x0c, 0xcb, 0xa6, 0x59, 0x57, 0x15, 0xba, 0x78, 0x56, 0xca, 0xc9, 0xa6, 0xb9, 0xa4, 0x88, + 0x4d, 0x28, 0x45, 0xc9, 0x70, 0x44, 0x57, 0x43, 0x88, 0x8e, 0xc5, 0x23, 0x0a, 0x2c, 0x10, 0x02, + 0xf6, 0x2b, 0x01, 0xa6, 0x98, 0xc1, 0x86, 0xa1, 0x79, 0x88, 0x0e, 0xc0, 0x6e, 0x53, 0x56, 0xad, + 0x2e, 0xa4, 0x61, 0xf2, 0x73, 0x49, 0x41, 0x25, 0x18, 0x51, 0x54, 0x5b, 0x6e, 0x68, 0x58, 0x29, + 0x66, 0x66, 0x84, 0xd9, 0x51, 0xc9, 0xfb, 0x8d, 0xae, 0x01, 0x74, 0xdd, 0x5e, 0x1c, 0xa2, 0xa8, + 0x5e, 0xac, 0xb0, 0x18, 0xa9, 0x90, 0x18, 0xa9, 0xb0, 0x50, 0xed, 0x12, 0xb5, 0x82, 0xb9, 0x42, + 0xc9, 0x27, 0xe9, 0xa3, 0x23, 0xeb, 0xa7, 0xe3, 0xe7, 0x82, 0xeb, 0x30, 0x86, 0x94, 0xf3, 0x50, + 0x83, 0x9c, 0x49, 0x06, 0x8a, 0xc2, 0xcc, 0x10, 0x57, 0x18, 0xe7, 0x18, 0xc3, 0xd0, 0x5c, 0x31, + 0xce, 0x02, 0x13, 0x45, 0xd7, 0x03, 0xc8, 0x33, 0x1e, 0x9f, 0xbd, 0x91, 0xb3, 0x95, 0xfc, 0xd0, + 0xc5, 0x1a, 0x4c, 0x7a, 0x10, 0xfd, 0x5c, 0x1a, 0x86, 0xe6, 0xe7, 0xd2, 0x30, 0xb4, 0x25, 0xc5, + 0x67, 0x67, 0xc6, 0x6f, 0xe7, 0x7d, 0x9f, 0x43, 0x3c, 0x2b, 0x5f, 0x85, 0x2c, 0x91, 0xe2, 0xbe, + 0xee, 0xcf, 0x48, 0x2a, 0x29, 0x36, 0x60, 0xc6, 0x5b, 0xb6, 0xd6, 0x91, 0xb0, 0x8d, 0xad, 0xc7, + 0x78, 0x41, 0x51, 0x2c, 0x6c, 0x7b, 0x6e, 0x3f, 0x06, 0x05, 0x8b, 0x7d, 0xa8, 0xcb, 0xec, 0x0b, + 0x55, 0x38, 0x2a, 0xe5, 0xad, 0xc0, 0xfc, 0x38, 0xe8, 0xdf, 0x82, 0xb2, 0x4f, 0x07, 0xf9, 0xf7, + 0x35, 0x43, 0xd5, 0x17, 0xb1, 0x6e, 0xb4, 0x5c, 0x15, 0x2f, 0x42, 0x81, 0xb2, 0x41, 0xd2, 0x48, + 0x5d, 0x21, 0x5f, 0xb8, 0x8a, 0x09, 0xd3, 0x3f, 0x3d, 0x4e, 0xc3, 0x77, 0xbd, 0x70, 0x95, 0x55, + 0xcb, 0xc3, 0xbd, 0x1f, 0x86, 0xe9, 0x52, 0x2c, 0x08, 0x46, 0x25, 0xfe, 0x2b, 0x14, 0x91, 0x99, + 0x01, 0x44, 0xe4, 0x90, 0x1f, 0xcc, 0x4f, 0xbc, 0x88, 0x64, 0x60, 0xb8, 0xaf, 0xe6, 0x21, 0x47, + 0x76, 0x8b, 0x1b, 0x91, 0xd3, 0xbd, 0x52, 0x85, 0x6a, 0x79, 0x91, 0x48, 0x44, 0x76, 0x20, 0x12, + 0x65, 0xd5, 0x4a, 0xdc, 0xd5, 0x31, 0x64, 0xdf, 0xf2, 0x71, 0xed, 0x59, 0x77, 0x09, 0xb2, 0x44, + 0x8a, 0x47, 0x62, 0x3a, 0xe3, 0xa8, 0x84, 0xf8, 0x43, 0x01, 0x0e, 0xd1, 0xf5, 0x16, 0xb1, 0x69, + 0xd8, 0xaa, 0xc3, 0x61, 0xd9, 0xdb, 0xdc, 0x28, 0x83, 0xca, 0x37, 0xe2, 0x9f, 0x05, 0x38, 0x1c, + 0x8d, 0x8b, 0x9b, 0xfc, 0x75, 0x98, 0x54, 0xd8, 0xa7, 0xba, 0xc5, 0xbf, 0x71, 0xdf, 0xce, 0xc6, + 0x9b, 0x1f, 0x5c, 0x8c, 0x13, 0x51, 0x50, 0x82, 0x2a, 0x06, 0xe7, 0xef, 0x07, 0xfc, 0xb0, 0x08, + 0xaa, 0x4d, 0xa4, 0x36, 0x0f, 0x19, 0x8f, 0xd6, 0x8c, 0xaa, 0xc4, 0x45, 0xfa, 0xe3, 0x48, 0xcf, + 0x79, 0x04, 0xbd, 0x09, 0x85, 0x10, 0x41, 0x3c, 0x3c, 0xfa, 0xe5, 0x27, 0x1f, 0xe4, 0x47, 0xfc, + 0x91, 0xeb, 0x9a, 0x37, 0x55, 0xe7, 0xa1, 0x62, 0xc9, 0x6b, 0xa9, 0x63, 0x66, 0x87, 0xb7, 0xfe, + 0x5f, 0x04, 0x38, 0x12, 0x03, 0x8c, 0x73, 0xf2, 0x00, 0xa6, 0xd6, 0xf8, 0xb7, 0x70, 0xd4, 0x7c, + 0x25, 0x9e, 0x95, 0xd0, 0x72, 0x9c, 0x96, 0xc9, 0xb5, 0x90, 0x96, 0xc1, 0xc5, 0xcd, 0x37, 0xb8, + 0x67, 0x43, 0x8a, 0x07, 0x15, 0x38, 0x6f, 0x47, 0xfb, 0xcf, 0x63, 0xe9, 0x2d, 0x98, 0x0c, 0xb3, + 0xc4, 0x43, 0xa7, 0x6f, 0x92, 0x0a, 0x21, 0x92, 0xc4, 0xef, 0xb9, 0xe9, 0xf9, 0xab, 0x96, 0x82, + 0xad, 0xe4, 0xda, 0x66, 0x87, 0x43, 0xe6, 0x67, 0x02, 0x2f, 0x2d, 0x5d, 0x38, 0x9c, 0x82, 0x57, + 0x60, 0xd8, 0xa0, 0x23, 0x3c, 0x3a, 0xca, 0xf1, 0x86, 0x53, 0x49, 0xb7, 0x80, 0x63, 0x42, 0x83, + 0x8b, 0x84, 0xbb, 0x3c, 0xdb, 0x53, 0x25, 0x89, 0x64, 0xa5, 0xf4, 0xff, 0x1d, 0xbf, 0x0b, 0x3c, + 0x93, 0x5f, 0x82, 0x1c, 0x45, 0xcf, 0x5d, 0x9d, 0xd2, 0x62, 0x26, 0x23, 0xfe, 0xce, 0x3d, 0x46, + 0x18, 0x8f, 0x35, 0xf6, 0xb7, 0x0b, 0xb9, 0x08, 0xbb, 0x0d, 0x36, 0xc2, 0x2b, 0x0b, 0xf7, 0xa7, + 0xdf, 0x98, 0x4c, 0x0f, 0xcf, 0x0f, 0xbc, 0x72, 0xfd, 0x20, 0x07, 0xe3, 0x81, 0x6a, 0x8e, 0x91, + 0x27, 0x78, 0xe4, 0xc5, 0x02, 0x8b, 0x28, 0xc8, 0x86, 0x22, 0x0b, 0xb2, 0x88, 0xb2, 0x2a, 0x1b, + 0x55, 0x56, 0xbd, 0x0e, 0x23, 0x0d, 0x59, 0x93, 0xf5, 0x26, 0xb6, 0x8b, 0xb9, 0x34, 0xb5, 0x64, + 0x8d, 0xcf, 0xe6, 0x3e, 0xf0, 0xa4, 0xd1, 0x79, 0x38, 0xa0, 0xc9, 0xb6, 0x53, 0x0f, 0x25, 0x7e, + 0x62, 0xc3, 0x30, 0xb5, 0x61, 0x2f, 0xf9, 0x1c, 0xcc, 0xf2, 0x4b, 0x0a, 0xba, 0x08, 0x45, 0x2a, + 0x16, 0xde, 0xf5, 0x44, 0x6e, 0x37, 0x95, 0xdb, 0x47, 0xbe, 0x87, 0xb6, 0x78, 0xa0, 0x08, 0x18, + 0xf1, 0x17, 0x01, 0x17, 0x20, 0xeb, 0x74, 0x4c, 0x5c, 0x1c, 0x9d, 0x11, 0x66, 0xf3, 0x73, 0x62, + 0x6f, 0x63, 0xee, 0x75, 0x4c, 0x2c, 0xd1, 0xf9, 0x24, 0x4a, 0x9a, 0x16, 0x96, 0x1d, 0xc3, 0x2a, + 0x02, 0x8b, 0x12, 0xfe, 0x13, 0x5d, 0x87, 0xc9, 0x2e, 0x95, 0x76, 0xdb, 0x34, 0xb5, 0x4e, 0x71, + 0x8c, 0x4c, 0xa9, 0x1d, 0x21, 0x14, 0x7c, 0xb6, 0x59, 0xde, 0xc7, 0x22, 0xc3, 0x56, 0x1e, 0x55, + 0x54, 0xa3, 0xda, 0x92, 0x9d, 0x87, 0x95, 0x25, 0xdd, 0x91, 0xf2, 0x2e, 0xd5, 0x77, 0xa9, 0x10, + 0x7a, 0x19, 0x46, 0x5b, 0xaa, 0x5e, 0x37, 0x2d, 0xb5, 0x89, 0x8b, 0xe3, 0x74, 0x85, 0xf2, 0x67, + 0x9b, 0xe5, 0x43, 0x5b, 0xa5, 0x6f, 0xe2, 0x15, 0xb9, 0xd9, 0x59, 0xc4, 0x4d, 0x69, 0xa4, 0xa5, + 0xea, 0xb7, 0x89, 0x00, 0x95, 0x96, 0x9f, 0x70, 0xe9, 0x89, 0xb4, 0xd2, 0xf2, 0x13, 0x26, 0x7d, + 0x1e, 0x72, 0x4c, 0x32, 0x9f, 0x4e, 0x92, 0xcd, 0x0e, 0x5c, 0xef, 0x0a, 0x33, 0xc2, 0xec, 0x48, + 0xf7, 0x7a, 0x47, 0xd2, 0xe9, 0xb8, 0x3f, 0x22, 0x08, 0x42, 0xb2, 0x37, 0x28, 0x51, 0x7c, 0x27, + 0x1f, 0x0c, 0x6c, 0x1a, 0x97, 0x7a, 0xc2, 0x49, 0x37, 0x7e, 0x6c, 0x4c, 0x7e, 0xa3, 0x2b, 0x00, + 0xab, 0x6d, 0xc3, 0xe1, 0xe2, 0x99, 0x74, 0xe2, 0xa3, 0x54, 0x84, 0x0c, 0x88, 0x0f, 0x78, 0x66, + 0xb9, 0x26, 0x5b, 0xad, 0xee, 0xe6, 0x8f, 0xbe, 0x4a, 0xfb, 0x8f, 0xb1, 0x4c, 0xe0, 0x18, 0xdb, + 0x0f, 0xc3, 0xcb, 0x74, 0x01, 0xbe, 0xaf, 0xf8, 0x2f, 0xf1, 0x43, 0x01, 0xf2, 0x77, 0xda, 0xb8, + 0x8d, 0x15, 0xf7, 0x16, 0x83, 0x56, 0x60, 0xd4, 0x8b, 0x8b, 0x64, 0x73, 0xab, 0x04, 0xef, 0x6f, + 0x3e, 0x2f, 0x1f, 0x5b, 0x51, 0x9d, 0x87, 0xed, 0x06, 0x89, 0xcb, 0x2a, 0x7f, 0x2e, 0x61, 0x7f, + 0x4e, 0xd9, 0xca, 0xa3, 0x2a, 0x09, 0x45, 0x9b, 0x0a, 0x48, 0x23, 0x6e, 0xf4, 0x20, 0x09, 0x46, + 0x14, 0x62, 0x4e, 0x5d, 0x76, 0x38, 0x2f, 0xa5, 0x0a, 0x7b, 0xcb, 0xa8, 0xb8, 0x6f, 0x19, 0x95, + 0x7b, 0xee, 0x63, 0x47, 0xed, 0x10, 0x51, 0xf4, 0xc5, 0x66, 0xb9, 0xd0, 0x91, 0x5b, 0xda, 0xbc, + 0xe8, 0x4a, 0x8a, 0xef, 0x7e, 0x5e, 0x16, 0xa4, 0xdd, 0xf4, 0xe7, 0x82, 0x23, 0xfe, 0xcb, 0x3d, + 0x7c, 0x5c, 0xba, 0x78, 0x26, 0x72, 0x60, 0x52, 0x6e, 0x3a, 0xea, 0x63, 0x5c, 0xdf, 0x49, 0xdb, + 0xf2, 0x4c, 0x87, 0x47, 0xe5, 0xd7, 0x60, 0x72, 0x95, 0x92, 0xeb, 0xd3, 0x9a, 0x49, 0x2a, 0xa8, + 0x83, 0xee, 0x70, 0x0b, 0xc6, 0xd5, 0xc0, 0xa8, 0xb8, 0xce, 0x6f, 0xa0, 0x8b, 0x24, 0x3d, 0xaa, + 0xb2, 0xa6, 0xbe, 0xed, 0x69, 0x4d, 0x2c, 0x69, 0x66, 0xfd, 0x1b, 0x5f, 0x6e, 0x19, 0x6d, 0xdd, + 0xe1, 0xd1, 0xe2, 0xed, 0xec, 0x05, 0x3a, 0x1a, 0x77, 0xd8, 0x7d, 0x47, 0xe0, 0x77, 0xec, 0x48, + 0xed, 0x9c, 0x71, 0x19, 0x72, 0x44, 0x81, 0x7b, 0xda, 0xf7, 0xa0, 0xf9, 0x34, 0xa7, 0x79, 0x36, + 0x25, 0xcd, 0xb6, 0xc4, 0x56, 0x16, 0xcf, 0xf1, 0x03, 0x92, 0x3e, 0x94, 0x2c, 0xe9, 0x4d, 0xac, + 0x13, 0xf6, 0x93, 0x9e, 0x9b, 0xfe, 0x9a, 0x83, 0x09, 0x22, 0xe1, 0x09, 0xc4, 0x33, 0x55, 0x86, + 0xb1, 0x96, 0x6c, 0x3b, 0xd8, 0xa2, 0xfe, 0xa3, 0x24, 0x8d, 0x48, 0xc0, 0x86, 0xc8, 0x12, 0xe8, + 0x28, 0xe4, 0x9b, 0x0f, 0x55, 0x8d, 0xfb, 0x57, 0x55, 0xc8, 0xb1, 0x35, 0x34, 0x9b, 0x95, 0xc6, + 0xe9, 0x28, 0xd5, 0xa2, 0xd8, 0xc8, 0x80, 0x09, 0xc7, 0x70, 0x64, 0xad, 0x6e, 0xe1, 0x35, 0xd9, + 0x52, 0x6c, 0x7a, 0x64, 0x0d, 0x36, 0xf2, 0xc6, 0xa9, 0x02, 0x89, 0xad, 0x8f, 0xd6, 0x61, 0x8f, + 0xa2, 0xda, 0x8e, 0xa5, 0x36, 0xda, 0x0e, 0x56, 0x3c, 0xb5, 0xb9, 0x81, 0xab, 0x45, 0x3e, 0x35, + 0xae, 0xf2, 0x2f, 0x01, 0x03, 0x53, 0xc7, 0xa6, 0xd1, 0x7c, 0x68, 0xf3, 0x53, 0x72, 0x8c, 0x8e, + 0x5d, 0xa5, 0x43, 0xe8, 0x05, 0x98, 0x58, 0x56, 0x35, 0x0d, 0x2b, 0xee, 0x1c, 0x76, 0x22, 0x8e, + 0xb3, 0x41, 0x3e, 0xe9, 0x1d, 0xc8, 0xd3, 0xaf, 0x75, 0xf7, 0x3d, 0x93, 0x1e, 0x88, 0x04, 0x7f, + 0x38, 0x49, 0x2c, 0xf2, 0x09, 0xb5, 0x57, 0x08, 0xfe, 0xff, 0x6c, 0x96, 0x8b, 0x41, 0xc1, 0x93, + 0x46, 0x4b, 0x75, 0x70, 0xcb, 0x74, 0x3a, 0x5f, 0x6c, 0x96, 0xf7, 0xb1, 0xfc, 0x11, 0x9c, 0x21, + 0xfe, 0x98, 0x64, 0x91, 0x09, 0x3a, 0xe8, 0xae, 0x86, 0x5a, 0x30, 0xa5, 0xe3, 0x27, 0x4e, 0xdd, + 0xb3, 0x91, 0x60, 0x18, 0x4d, 0x4c, 0x54, 0x47, 0x79, 0xa2, 0x2a, 0x32, 0x45, 0x5b, 0x96, 0x60, + 0x19, 0x6b, 0x92, 0x8c, 0x2f, 0xfa, 0x86, 0xd1, 0x34, 0x8c, 0xa9, 0x76, 0xdd, 0x5e, 0x93, 0xcd, + 0xfa, 0x32, 0xc6, 0xf4, 0xb4, 0x1e, 0x91, 0x46, 0x55, 0xfb, 0xee, 0x9a, 0x6c, 0x5e, 0xc3, 0xd8, + 0x17, 0xce, 0x63, 0xfe, 0x70, 0x36, 0x7c, 0x9b, 0xc0, 0xbf, 0x07, 0xf8, 0x36, 0xbc, 0xcd, 0x0b, + 0x26, 0xd5, 0xfb, 0xc4, 0x37, 0xe4, 0xb1, 0xde, 0x25, 0x84, 0xb7, 0x14, 0x4b, 0x0a, 0xdd, 0x95, + 0xc5, 0x9b, 0xfc, 0x06, 0x4e, 0x33, 0xac, 0x92, 0x3a, 0xeb, 0xc4, 0xbc, 0xbd, 0x6c, 0x70, 0xf8, + 0xe1, 0xd5, 0x38, 0xfc, 0x6f, 0x42, 0x76, 0x87, 0x72, 0x35, 0x5d, 0x57, 0x7c, 0x4f, 0x80, 0xfd, + 0xdd, 0x22, 0xbb, 0x66, 0x18, 0x8f, 0x12, 0xd2, 0x07, 0x3a, 0x08, 0x23, 0xbc, 0x86, 0xb5, 0x69, + 0x2e, 0xcf, 0x4a, 0xbb, 0x59, 0x11, 0x6b, 0xa3, 0xe3, 0x30, 0x45, 0xcb, 0x8b, 0x7a, 0x5b, 0x57, + 0x9d, 0xba, 0x69, 0xac, 0x91, 0xcb, 0x0e, 0x49, 0x08, 0x13, 0x52, 0x81, 0x7e, 0xb8, 0xaf, 0xab, + 0xce, 0x6d, 0x3a, 0x8c, 0x0e, 0xc1, 0xa8, 0xde, 0x6e, 0xd5, 0x1d, 0xb5, 0xf9, 0x88, 0xe5, 0x83, + 0x09, 0x69, 0x44, 0x6f, 0xb7, 0xee, 0x91, 0xdf, 0xe2, 0x32, 0x1c, 0xd8, 0x02, 0x8a, 0x13, 0x72, + 0xc3, 0x7d, 0x74, 0x63, 0xe7, 0x48, 0x35, 0xe9, 0x4a, 0x61, 0x18, 0x8f, 0xfc, 0xcf, 0x5a, 0x81, + 0x57, 0x38, 0xf1, 0xa9, 0x00, 0xfb, 0x22, 0xa7, 0xc5, 0xdf, 0x87, 0x6a, 0x00, 0xb4, 0x18, 0x62, + 0x55, 0x17, 0x7d, 0x1a, 0xaf, 0xbd, 0xc0, 0xeb, 0xc5, 0x9e, 0x95, 0x17, 0xad, 0xa1, 0x58, 0xd1, + 0x26, 0xc1, 0x18, 0xbd, 0xaa, 0xd4, 0x1b, 0xc4, 0x34, 0xca, 0xd0, 0xd8, 0xdc, 0x89, 0x14, 0x96, + 0x84, 0xac, 0x00, 0xc3, 0xe3, 0x47, 0xfc, 0xaf, 0x00, 0x53, 0x5b, 0xe6, 0x11, 0xb4, 0x5d, 0x8f, + 0xb0, 0x6b, 0x52, 0x4a, 0xb4, 0x9e, 0xbf, 0x08, 0xe3, 0x36, 0xd6, 0xb4, 0x7e, 0x18, 0x27, 0x5e, + 0x0c, 0x33, 0x4e, 0xd7, 0x40, 0x4b, 0x90, 0x6d, 0xb4, 0x3b, 0xae, 0xcd, 0xdb, 0x5c, 0x8b, 0x2e, + 0x21, 0xfe, 0xdb, 0xef, 0x3c, 0xff, 0x2c, 0x74, 0xd9, 0x2d, 0x8a, 0xfb, 0x30, 0x98, 0x17, 0xc6, + 0x4b, 0x30, 0xd5, 0xb6, 0xb1, 0x55, 0x67, 0xfe, 0xf1, 0x15, 0x07, 0x89, 0xb7, 0x82, 0x02, 0x91, + 0xa3, 0x78, 0x78, 0xf1, 0xb0, 0x04, 0x53, 0x34, 0x13, 0x04, 0x96, 0x1a, 0x4a, 0xb5, 0x14, 0x91, + 0xf3, 0x2d, 0x25, 0xbe, 0x9f, 0x81, 0x23, 0xf7, 0xc8, 0xf9, 0xb1, 0x40, 0xeb, 0xab, 0x05, 0x5d, + 0x09, 0x16, 0x49, 0x76, 0x7c, 0xda, 0x79, 0x07, 0xf6, 0xb3, 0xd3, 0x68, 0x4b, 0xf9, 0x97, 0x19, + 0x78, 0x4a, 0xd9, 0xe3, 0x74, 0x31, 0x7a, 0x35, 0xa0, 0x07, 0x60, 0x4b, 0x25, 0x38, 0xb4, 0x43, + 0x00, 0x82, 0xdc, 0x88, 0x17, 0x61, 0x9a, 0x26, 0x93, 0x05, 0x4d, 0x0b, 0x26, 0xd9, 0xa4, 0x42, + 0xe9, 0xf7, 0x02, 0x2f, 0x32, 0xa3, 0x24, 0x79, 0xa8, 0xc5, 0x24, 0xc9, 0x0e, 0x1c, 0x09, 0xb0, + 0x2e, 0xeb, 0x8a, 0x6b, 0x3f, 0x2b, 0x0a, 0xd9, 0x5e, 0xba, 0x18, 0x1f, 0xff, 0x3d, 0xdd, 0x2d, + 0x1d, 0x74, 0x22, 0x3e, 0xd3, 0x4f, 0x73, 0x1f, 0x4c, 0x43, 0x8e, 0xa2, 0x46, 0xdf, 0x17, 0x60, + 0x98, 0xf5, 0x02, 0xd1, 0xc9, 0x9e, 0xe5, 0x76, 0xa8, 0x37, 0x5a, 0x3a, 0x95, 0x72, 0x36, 0xe3, + 0x40, 0x9c, 0xfd, 0xf6, 0xa7, 0xff, 0x7c, 0x2f, 0x23, 0xa2, 0x99, 0x6a, 0x42, 0x47, 0x17, 0xfd, + 0x51, 0x80, 0x89, 0x40, 0x93, 0x12, 0x9d, 0x4d, 0x50, 0x15, 0xd5, 0x47, 0x2d, 0x9d, 0xeb, 0x4f, + 0x88, 0xc3, 0xbc, 0x4c, 0x61, 0x9e, 0x45, 0x67, 0xe2, 0x61, 0xae, 0x30, 0xc1, 0x3a, 0x83, 0x5b, + 0x5d, 0x67, 0xae, 0xdd, 0x40, 0x3f, 0x10, 0x20, 0x47, 0x8b, 0x6c, 0x74, 0x22, 0x89, 0x1a, 0x5f, + 0x77, 0xb5, 0x74, 0x32, 0xdd, 0x64, 0x8e, 0xef, 0x34, 0xc5, 0x77, 0x1c, 0xcd, 0xf6, 0xa0, 0x91, + 0x08, 0x74, 0x61, 0xfd, 0x54, 0x80, 0x2c, 0x2d, 0xc3, 0x8f, 0xa7, 0x50, 0xe4, 0x82, 0x3a, 0x91, + 0x6a, 0x2e, 0xc7, 0x34, 0x4f, 0x31, 0x9d, 0x43, 0x73, 0x69, 0x31, 0x55, 0xd7, 0x79, 0x1a, 0xda, + 0x40, 0x9f, 0x0a, 0xb0, 0x37, 0xaa, 0x09, 0x89, 0xe6, 0x53, 0x20, 0x88, 0xe9, 0x5c, 0xf6, 0x87, + 0x5e, 0xa2, 0xe8, 0x6f, 0xa2, 0x37, 0x52, 0xa3, 0x0f, 0x3d, 0xc2, 0x55, 0xd7, 0x43, 0x03, 0x1b, + 0xe8, 0x13, 0x01, 0xf6, 0x44, 0xb4, 0x3d, 0xd1, 0xe5, 0x54, 0x46, 0x45, 0xb5, 0x4a, 0x77, 0xda, + 0xa6, 0xd0, 0x7b, 0x21, 0xf7, 0x50, 0x77, 0x80, 0x87, 0x37, 0x6d, 0x4b, 0x26, 0x42, 0xf1, 0x75, + 0x63, 0x93, 0xc3, 0xdb, 0xdf, 0x2d, 0x4d, 0x15, 0xde, 0x44, 0x20, 0x14, 0xde, 0xb2, 0x6a, 0x25, + 0x87, 0x77, 0xb7, 0xf7, 0x59, 0x3a, 0x91, 0x6a, 0x6e, 0x1f, 0xe1, 0x1d, 0xc0, 0x54, 0x5d, 0xe7, + 0x55, 0xe1, 0x06, 0xfa, 0x50, 0x80, 0x42, 0xa8, 0x91, 0x88, 0xce, 0x27, 0x28, 0x8f, 0x6e, 0x88, + 0x96, 0x2e, 0xf4, 0x2b, 0xc6, 0xe1, 0xdf, 0xa0, 0xf0, 0xaf, 0xa2, 0xd7, 0xfa, 0xdf, 0x9d, 0xd5, + 0x70, 0xa3, 0x13, 0x7d, 0x24, 0x40, 0x3e, 0xa8, 0x08, 0x9d, 0xeb, 0x0b, 0x97, 0x6b, 0xcd, 0xf9, + 0x3e, 0xa5, 0xb8, 0x31, 0xb7, 0xa9, 0x31, 0x6f, 0xa0, 0xd7, 0x07, 0x60, 0x4c, 0x75, 0x9d, 0x78, + 0xe8, 0x13, 0x01, 0x26, 0xc3, 0x6d, 0x3b, 0x94, 0xc4, 0x75, 0x4c, 0x03, 0xb2, 0x74, 0xb1, 0x6f, + 0x39, 0x6e, 0xd7, 0x4d, 0x6a, 0xd7, 0x35, 0xb4, 0xb8, 0x0d, 0xbb, 0xb6, 0x34, 0x16, 0x49, 0x52, + 0x2d, 0x84, 0x54, 0x25, 0x46, 0x5d, 0x74, 0xcb, 0xaf, 0x74, 0xa1, 0x5f, 0x31, 0x6e, 0xd0, 0x1d, + 0x6a, 0xd0, 0x0d, 0xb4, 0x34, 0x08, 0x83, 0x98, 0xa7, 0x7e, 0x21, 0xc0, 0x30, 0xeb, 0xf2, 0x24, + 0x56, 0x2a, 0x81, 0x1e, 0x5f, 0x62, 0xa5, 0x12, 0x6c, 0xc1, 0x89, 0x2f, 0x51, 0xe8, 0xe7, 0xd1, + 0xd9, 0x78, 0xe8, 0xac, 0xdb, 0x16, 0xb5, 0xe1, 0x7f, 0x29, 0x40, 0x8e, 0xae, 0x97, 0x98, 0x25, + 0xfd, 0x9d, 0xb5, 0xd2, 0xc9, 0x74, 0x93, 0x39, 0xc2, 0x57, 0x29, 0xc2, 0x79, 0x74, 0x69, 0x1b, + 0x08, 0x19, 0x97, 0x7f, 0x10, 0xa0, 0x10, 0xea, 0x98, 0x25, 0x46, 0x48, 0x74, 0x87, 0xed, 0xff, + 0xc1, 0x2e, 0x6f, 0xd9, 0x6d, 0xa0, 0xdf, 0x0a, 0x30, 0xcc, 0xde, 0xac, 0x13, 0x43, 0x20, 0xd0, + 0x09, 0x48, 0x04, 0x19, 0x7c, 0x08, 0x17, 0x17, 0x29, 0xc8, 0x2b, 0xe8, 0xe5, 0x78, 0x90, 0xac, + 0x35, 0x10, 0x15, 0xbe, 0xeb, 0xec, 0xd3, 0x06, 0xfa, 0x87, 0x00, 0x7b, 0x22, 0x1e, 0x7f, 0x13, + 0xab, 0x80, 0xf8, 0xe7, 0xea, 0xd2, 0xfc, 0x76, 0x44, 0xb9, 0x51, 0x77, 0xa9, 0x51, 0xb7, 0xd0, + 0x8d, 0x78, 0xa3, 0x94, 0xae, 0x78, 0xa4, 0x65, 0xe1, 0x17, 0xf1, 0x0d, 0xf4, 0xbe, 0x00, 0xf9, + 0xe0, 0xa3, 0x5a, 0x62, 0x1c, 0x45, 0x3f, 0x44, 0x97, 0xd2, 0x88, 0x6d, 0x7d, 0xba, 0x4b, 0x5b, + 0x7c, 0xfa, 0x9e, 0xf6, 0xba, 0xb5, 0xc3, 0x9f, 0x04, 0xc8, 0x07, 0xef, 0x6c, 0x89, 0xa7, 0x59, + 0xe4, 0x7b, 0x5e, 0x22, 0xf6, 0xe8, 0x77, 0xbb, 0x34, 0xfb, 0x98, 0xc6, 0x12, 0xbb, 0x0f, 0x46, + 0x95, 0xcf, 0x1f, 0x09, 0x70, 0xb8, 0xd7, 0x25, 0x10, 0x5d, 0x4a, 0x40, 0x16, 0x7b, 0xdf, 0x2d, + 0x5d, 0xde, 0x86, 0x64, 0x7a, 0x9f, 0xc8, 0x9a, 0x56, 0x8f, 0xb2, 0x0d, 0xfd, 0x5a, 0x00, 0xe8, + 0xbe, 0xe8, 0xa1, 0xd3, 0x69, 0xb2, 0x8b, 0xff, 0x45, 0xb2, 0x74, 0xa6, 0x0f, 0x09, 0x8e, 0xf7, + 0x02, 0xc5, 0x7b, 0x1a, 0x55, 0x12, 0x72, 0x12, 0x7b, 0x8a, 0xf3, 0xb0, 0xd6, 0x6e, 0x3d, 0x7d, + 0x36, 0x2d, 0x7c, 0xfc, 0x6c, 0x5a, 0xf8, 0xfb, 0xb3, 0x69, 0xe1, 0xdd, 0xe7, 0xd3, 0xbb, 0x3e, + 0x7e, 0x3e, 0xbd, 0xeb, 0x6f, 0xcf, 0xa7, 0x77, 0xbd, 0x75, 0x36, 0xf0, 0x18, 0x41, 0xd6, 0x3c, + 0x65, 0x2c, 0x2f, 0xab, 0x4d, 0x55, 0xd6, 0x5c, 0x1d, 0x7e, 0x2d, 0xf4, 0x75, 0xa2, 0x31, 0x4c, + 0xdf, 0xc9, 0xcf, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x18, 0x73, 0xd9, 0xfc, 0xde, 0x2d, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5032,7 +5035,7 @@ func (m *QueuedPoolCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n22, err22 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.DequeAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.DequeAt):]) + n22, err22 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.DequeAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DequeAt):]) if err22 != nil { return 0, err22 } @@ -5238,7 +5241,7 @@ func (m *PoolIncentive) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x50 } - n25, err25 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.NextDistribution, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.NextDistribution):]) + n25, err25 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.NextDistribution, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.NextDistribution):]) if err25 != nil { return 0, err25 } @@ -5246,7 +5249,7 @@ func (m *PoolIncentive) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(n25)) i-- dAtA[i] = 0x4a - n26, err26 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EpochDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EpochDuration):]) + n26, err26 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.EpochDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.EpochDuration):]) if err26 != nil { return 0, err26 } @@ -6356,7 +6359,7 @@ func (m *QueuedPoolCoin) Size() (n int) { _ = l l = m.PoolCoin.Size() n += 1 + l + sovQuery(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.DequeAt) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DequeAt) n += 1 + l + sovQuery(uint64(l)) return n } @@ -6452,9 +6455,9 @@ func (m *PoolIncentive) Size() (n int) { if m.FilledEpochs != 0 { n += 1 + sovQuery(uint64(m.FilledEpochs)) } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.EpochDuration) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.EpochDuration) n += 1 + l + sovQuery(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.NextDistribution) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.NextDistribution) n += 1 + l + sovQuery(uint64(l)) if m.IsSwapFee { n += 2 @@ -9816,7 +9819,7 @@ func (m *PoolResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.MinPrice = &v if err := m.MinPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -9852,7 +9855,7 @@ func (m *PoolResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.MaxPrice = &v if err := m.MaxPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -9888,7 +9891,7 @@ func (m *PoolResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v cosmossdk_io_math.LegacyDec m.Price = &v if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -10262,7 +10265,7 @@ func (m *QueuedPoolCoin) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.DequeAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.DequeAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10941,7 +10944,7 @@ func (m *PoolIncentive) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.EpochDuration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.EpochDuration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10974,7 +10977,7 @@ func (m *PoolIncentive) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.NextDistribution, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.NextDistribution, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/liquidity/types/request_test.go b/x/liquidity/types/request_test.go index 7638d959d..96662835e 100644 --- a/x/liquidity/types/request_test.go +++ b/x/liquidity/types/request_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" + "github.com/cometbft/cometbft/crypto" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/liquidity/types" diff --git a/x/liquidity/types/tx.pb.go b/x/liquidity/types/tx.pb.go index c6fec1943..47f6ae112 100644 --- a/x/liquidity/types/tx.pb.go +++ b/x/liquidity/types/tx.pb.go @@ -5,13 +5,14 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -204,9 +205,9 @@ type MsgCreateRangedPool struct { PairId uint64 `protobuf:"varint,3,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` // deposit_coins specifies the amount of coins to deposit. DepositCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=deposit_coins,json=depositCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit_coins"` - MinPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=min_price,json=minPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_price"` - MaxPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=max_price,json=maxPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_price"` - InitialPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=initial_price,json=initialPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"initial_price"` + MinPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=min_price,json=minPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_price"` + MaxPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=max_price,json=maxPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_price"` + InitialPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=initial_price,json=initialPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"initial_price"` } func (m *MsgCreateRangedPool) Reset() { *m = MsgCreateRangedPool{} } @@ -454,9 +455,9 @@ type MsgLimitOrder struct { // demand_coin_denom specifies the demand coin denom DemandCoinDenom string `protobuf:"bytes,5,opt,name=demand_coin_denom,json=demandCoinDenom,proto3" json:"demand_coin_denom,omitempty"` // price specifies the order price - Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` + Price cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"` // amount specifies the amount of base coin the orderer wants to buy or sell - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` + Amount cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` // order_lifespan specifies the order lifespan OrderLifespan time.Duration `protobuf:"bytes,8,opt,name=order_lifespan,json=orderLifespan,proto3,stdduration" json:"order_lifespan"` AppId uint64 `protobuf:"varint,9,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` @@ -545,7 +546,7 @@ type MsgMarketOrder struct { // demand_coin_denom specifies the demand coin denom DemandCoinDenom string `protobuf:"bytes,5,opt,name=demand_coin_denom,json=demandCoinDenom,proto3" json:"demand_coin_denom,omitempty"` // amount specifies the amount of base coin the orderer wants to buy or sell - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` + Amount cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` // order_lifespan specifies the order lifespan OrderLifespan time.Duration `protobuf:"bytes,7,opt,name=order_lifespan,json=orderLifespan,proto3,stdduration" json:"order_lifespan"` AppId uint64 `protobuf:"varint,8,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` @@ -629,17 +630,17 @@ type MsgMMOrder struct { // pair_id specifies the pair id PairId uint64 `protobuf:"varint,3,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` // max_sell_price specifies the maximum sell price - MaxSellPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=max_sell_price,json=maxSellPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_sell_price"` + MaxSellPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=max_sell_price,json=maxSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_sell_price"` // min_sell_price specifies the minimum sell price - MinSellPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=min_sell_price,json=minSellPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_sell_price"` + MinSellPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=min_sell_price,json=minSellPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_sell_price"` // sell_amount specifies the total amount of base coin of sell orders - SellAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=sell_amount,json=sellAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"sell_amount"` + SellAmount cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=sell_amount,json=sellAmount,proto3,customtype=cosmossdk.io/math.Int" json:"sell_amount"` // max_buy_price specifies the maximum buy price - MaxBuyPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=max_buy_price,json=maxBuyPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_buy_price"` + MaxBuyPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=max_buy_price,json=maxBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_buy_price"` // min_buy_price specifies the minimum buy price - MinBuyPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=min_buy_price,json=minBuyPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_buy_price"` + MinBuyPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=min_buy_price,json=minBuyPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_buy_price"` // buy_amount specifies the total amount of base coin of buy orders - BuyAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=buy_amount,json=buyAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"buy_amount"` + BuyAmount cosmossdk_io_math.Int `protobuf:"bytes,9,opt,name=buy_amount,json=buyAmount,proto3,customtype=cosmossdk.io/math.Int" json:"buy_amount"` // order_lifespan specifies the order lifespan OrderLifespan time.Duration `protobuf:"bytes,10,opt,name=order_lifespan,json=orderLifespan,proto3,stdduration" json:"order_lifespan"` } @@ -1302,96 +1303,97 @@ func init() { func init() { proto.RegisterFile("comdex/liquidity/v1beta1/tx.proto", fileDescriptor_2d6c7fd717524583) } var fileDescriptor_2d6c7fd717524583 = []byte{ - // 1425 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xc6, 0x8e, 0x63, 0xbf, 0xd4, 0x49, 0xb3, 0xfd, 0xe5, 0x6c, 0xfb, 0x75, 0x52, 0x7f, - 0xa1, 0x35, 0x6d, 0xb3, 0x6e, 0x53, 0xe0, 0x80, 0x10, 0x52, 0xd2, 0xa8, 0x52, 0x68, 0xad, 0x96, - 0x6d, 0x11, 0x52, 0x05, 0x4a, 0xd7, 0xde, 0xf1, 0x76, 0xd4, 0xdd, 0x1d, 0x77, 0x77, 0x4d, 0x1d, - 0xf1, 0x4f, 0xa0, 0x1e, 0x50, 0x25, 0x6e, 0x1c, 0xf9, 0x0b, 0x38, 0x72, 0xac, 0x04, 0x87, 0x4a, - 0x5c, 0x10, 0x87, 0x14, 0x5a, 0x09, 0x6e, 0x1c, 0xb8, 0xc1, 0x09, 0xcd, 0xec, 0xec, 0xec, 0x38, - 0x8e, 0xed, 0xb5, 0x1b, 0x24, 0x50, 0x4f, 0xf6, 0xec, 0x7c, 0xde, 0xe7, 0xbd, 0xcf, 0xbc, 0xb7, - 0xf3, 0x66, 0x16, 0x4e, 0x37, 0x89, 0x6b, 0xa1, 0x6e, 0xcd, 0xc1, 0x0f, 0x3a, 0xd8, 0xc2, 0xe1, - 0x4e, 0xed, 0xd3, 0x4b, 0x0d, 0x14, 0x9a, 0x97, 0x6a, 0x61, 0x57, 0x6f, 0xfb, 0x24, 0x24, 0x6a, - 0x29, 0x82, 0xe8, 0x02, 0xa2, 0x73, 0x88, 0x76, 0xd4, 0x26, 0x36, 0x61, 0xa0, 0x1a, 0xfd, 0x17, - 0xe1, 0xb5, 0x72, 0x93, 0x04, 0x2e, 0x09, 0x6a, 0x0d, 0x33, 0x40, 0x82, 0xad, 0x49, 0xb0, 0x17, - 0xcf, 0xdb, 0x84, 0xd8, 0x0e, 0xaa, 0xb1, 0x51, 0xa3, 0xd3, 0xaa, 0x59, 0x1d, 0xdf, 0x0c, 0x31, - 0x89, 0xe7, 0xab, 0x03, 0x43, 0x4a, 0x22, 0x60, 0xc8, 0xca, 0x23, 0x05, 0x8a, 0xf5, 0xc0, 0xbe, - 0xe2, 0x23, 0x33, 0x44, 0x37, 0x4d, 0xec, 0xab, 0x25, 0x98, 0x6d, 0xd2, 0x11, 0xf1, 0x4b, 0xca, - 0x8a, 0x52, 0x2d, 0x18, 0xf1, 0x50, 0x3d, 0x03, 0x0b, 0x34, 0xa0, 0x6d, 0x1a, 0xc8, 0xb6, 0x85, - 0x3c, 0xe2, 0x96, 0xa6, 0x19, 0xa2, 0x48, 0x1f, 0x5f, 0x21, 0xd8, 0xdb, 0xa4, 0x0f, 0xd5, 0x2a, - 0x1c, 0x7e, 0xd0, 0x21, 0x61, 0x0f, 0x30, 0xc3, 0x80, 0xf3, 0xec, 0x79, 0x82, 0x3c, 0x06, 0x39, - 0xb3, 0xdd, 0xde, 0xc6, 0x56, 0x29, 0xbb, 0xa2, 0x54, 0xb3, 0xc6, 0x8c, 0xd9, 0x6e, 0x6f, 0x59, - 0x95, 0x13, 0x70, 0xac, 0x27, 0x26, 0x03, 0x05, 0x6d, 0xe2, 0x05, 0xa8, 0xf2, 0x5d, 0x4f, 0xb4, - 0x84, 0x38, 0x43, 0xa2, 0x3d, 0x01, 0xb3, 0x6d, 0x13, 0xfb, 0x94, 0x7c, 0x9a, 0x91, 0xe7, 0xe8, - 0x70, 0xcb, 0x52, 0xdb, 0x50, 0xb4, 0x50, 0x9b, 0x04, 0x38, 0x64, 0x01, 0x06, 0xa5, 0xcc, 0x4a, - 0xa6, 0x3a, 0xb7, 0xb6, 0xa4, 0x47, 0x8b, 0xae, 0x53, 0x31, 0x71, 0x7e, 0x74, 0x1a, 0xeb, 0xc6, - 0xc5, 0x27, 0xbb, 0xcb, 0x53, 0x5f, 0x3f, 0x5b, 0xae, 0xda, 0x38, 0xbc, 0xd7, 0x69, 0xe8, 0x4d, - 0xe2, 0xd6, 0x78, 0x86, 0xa2, 0x9f, 0xd5, 0xc0, 0xba, 0x5f, 0x0b, 0x77, 0xda, 0x28, 0x60, 0x06, - 0x81, 0x71, 0x88, 0x7b, 0x60, 0xa3, 0x54, 0x32, 0x09, 0x71, 0x84, 0xcc, 0x6f, 0x33, 0x70, 0x44, - 0xcc, 0x18, 0xa6, 0x67, 0x23, 0x6b, 0x84, 0xd8, 0xc4, 0xc3, 0xb4, 0xe4, 0x41, 0x5e, 0x83, 0xcc, - 0xf0, 0x35, 0xc8, 0xfe, 0xd3, 0x6b, 0x70, 0x0d, 0x0a, 0x2e, 0xf6, 0xb6, 0xdb, 0x3e, 0x6e, 0xa2, - 0xd2, 0x0c, 0x8d, 0x7e, 0x43, 0xa7, 0x94, 0x3f, 0xed, 0x2e, 0x9f, 0x49, 0x41, 0xb9, 0x89, 0x9a, - 0x46, 0xde, 0xc5, 0xde, 0x4d, 0x6a, 0xcf, 0xc8, 0xcc, 0x2e, 0x27, 0xcb, 0x4d, 0x48, 0x66, 0x76, - 0x23, 0xb2, 0x5b, 0x50, 0xc4, 0x1e, 0x0e, 0xb1, 0xe9, 0x70, 0xc2, 0xd9, 0x89, 0x08, 0x0f, 0x71, - 0x12, 0x46, 0x5a, 0xf9, 0x1f, 0x9c, 0xdc, 0x27, 0x83, 0x22, 0xc3, 0xdf, 0x2b, 0x00, 0xf5, 0xc0, - 0xde, 0x8c, 0x56, 0x48, 0x3d, 0x05, 0x05, 0xbe, 0x58, 0x22, 0xb5, 0xc9, 0x03, 0x96, 0x45, 0x42, - 0x1c, 0xb9, 0x92, 0x09, 0x71, 0xfe, 0x4d, 0x95, 0x7c, 0x14, 0xd4, 0x44, 0x8d, 0x10, 0xf9, 0xa5, - 0x02, 0x73, 0xf5, 0xc0, 0xfe, 0x08, 0x87, 0xf7, 0x2c, 0xdf, 0x7c, 0xa8, 0x96, 0x01, 0x1e, 0xf2, - 0xff, 0x28, 0x96, 0x29, 0x3d, 0x19, 0xac, 0xf3, 0x5d, 0x28, 0xb0, 0x09, 0x2a, 0x92, 0x15, 0xf2, - 0x50, 0x8d, 0x59, 0xaa, 0xd1, 0xc8, 0x53, 0x0b, 0x3a, 0x1e, 0x14, 0xf3, 0x31, 0xf6, 0x8e, 0xc5, - 0xc1, 0x89, 0xa0, 0x7f, 0xcb, 0xb0, 0x2d, 0xe6, 0x3a, 0x76, 0x71, 0x78, 0xc3, 0xb7, 0x10, 0xdb, - 0x10, 0x09, 0xfd, 0x23, 0x62, 0x8e, 0x87, 0x83, 0xb7, 0x98, 0xab, 0x50, 0xb0, 0xb0, 0x8f, 0x9a, - 0x74, 0x4b, 0x66, 0x01, 0xcf, 0xaf, 0x55, 0xf5, 0x41, 0x3d, 0x40, 0x67, 0x6e, 0x36, 0x63, 0xbc, - 0x91, 0x98, 0xaa, 0xef, 0x01, 0x90, 0x56, 0x0b, 0xf9, 0x91, 0xf2, 0x6c, 0x3a, 0xe5, 0x05, 0x66, - 0xc2, 0xa4, 0x9f, 0x83, 0x45, 0x0b, 0xb9, 0xa6, 0x67, 0xc9, 0x5b, 0x31, 0x7b, 0xf9, 0x8c, 0x85, - 0x68, 0x22, 0xd9, 0x8b, 0x37, 0x61, 0xe6, 0x65, 0xde, 0xa7, 0xc8, 0x58, 0xbd, 0x0a, 0x39, 0xd3, - 0x25, 0x1d, 0x2f, 0x9c, 0xe0, 0x2d, 0xda, 0xf2, 0x42, 0x83, 0x5b, 0xab, 0xef, 0xc3, 0x3c, 0x5b, - 0xe5, 0x6d, 0x07, 0xb7, 0x50, 0xd0, 0x36, 0xbd, 0x52, 0x9e, 0xab, 0x8f, 0x5a, 0x9f, 0x1e, 0xb7, - 0x3e, 0x7d, 0x93, 0xb7, 0xbe, 0x8d, 0x3c, 0x75, 0xf5, 0xf8, 0xd9, 0xb2, 0x62, 0x14, 0x99, 0xe9, - 0x75, 0x6e, 0x29, 0x15, 0x40, 0xa1, 0x7f, 0xfb, 0x4d, 0x12, 0x2d, 0x4a, 0xe0, 0xab, 0x0c, 0xcc, - 0xd7, 0x03, 0xbb, 0x6e, 0xfa, 0xf7, 0xd1, 0xab, 0x55, 0x03, 0x49, 0xf6, 0x72, 0x07, 0x9c, 0xbd, - 0xd9, 0x03, 0xc8, 0x5e, 0x5e, 0xce, 0x5e, 0x09, 0x8e, 0xf7, 0xe6, 0x48, 0xa4, 0xef, 0x8b, 0x19, - 0xb6, 0xb7, 0xd6, 0xeb, 0xa3, 0x52, 0x37, 0x6e, 0xd3, 0xbc, 0x0d, 0xf3, 0xb4, 0xeb, 0x04, 0xc8, - 0x89, 0x3b, 0x45, 0x76, 0xb2, 0x4e, 0xe1, 0x9a, 0xdd, 0x5b, 0xc8, 0x89, 0x3a, 0x05, 0x63, 0xc5, - 0x9e, 0xcc, 0x3a, 0x33, 0x21, 0x2b, 0xf6, 0x12, 0xd6, 0x1b, 0x30, 0xc7, 0x18, 0x5f, 0x2a, 0x9d, - 0x40, 0x29, 0xd6, 0xa3, 0x94, 0x1a, 0x50, 0xa4, 0xe2, 0x1b, 0x9d, 0x9d, 0x97, 0xea, 0x92, 0x73, - 0xae, 0xd9, 0xdd, 0xe8, 0xec, 0x44, 0x41, 0x52, 0x4e, 0xec, 0x49, 0x9c, 0xf9, 0x09, 0x39, 0xb1, - 0x27, 0x38, 0xeb, 0x00, 0x94, 0x8f, 0xeb, 0x2e, 0x4c, 0xa4, 0xbb, 0xd0, 0xe8, 0xec, 0xac, 0x0f, - 0xaa, 0x64, 0x98, 0xb4, 0x92, 0x79, 0x97, 0xe4, 0x75, 0x29, 0xca, 0xb5, 0xc3, 0x36, 0x9b, 0x2b, - 0xa6, 0xd7, 0x44, 0xce, 0xc4, 0x9b, 0xcd, 0x12, 0xe4, 0xa3, 0x30, 0x45, 0xd1, 0x46, 0x36, 0x5b, - 0xd6, 0xa0, 0xf6, 0x17, 0xbd, 0x3f, 0x92, 0x5b, 0x11, 0xd0, 0x5d, 0x16, 0x66, 0x34, 0xb3, 0xee, - 0x44, 0x93, 0xc1, 0x90, 0xa0, 0x96, 0x20, 0xcf, 0x83, 0x0a, 0x4a, 0xd3, 0x2b, 0x19, 0xea, 0x3b, - 0x8a, 0x4a, 0x3e, 0x2e, 0x64, 0x64, 0xdf, 0xa7, 0x40, 0xeb, 0xf7, 0x20, 0xfc, 0x7f, 0x0c, 0x87, - 0xc5, 0xec, 0x81, 0xbf, 0xc4, 0x15, 0x0d, 0x4a, 0x7b, 0xd9, 0x85, 0xe7, 0x5f, 0x15, 0x98, 0xad, - 0x07, 0xf6, 0x55, 0xd3, 0x97, 0xaf, 0x26, 0xca, 0x5e, 0xde, 0x7d, 0xcf, 0x28, 0xc7, 0x21, 0xd7, - 0x32, 0x7d, 0x17, 0xf9, 0xfc, 0xaa, 0xc3, 0x47, 0xea, 0x23, 0x05, 0x16, 0xe9, 0x5f, 0xec, 0xd9, - 0xdb, 0xc9, 0x21, 0x66, 0xe4, 0x36, 0x7e, 0x8d, 0x16, 0xd1, 0x1f, 0xbb, 0xcb, 0xa5, 0x1d, 0xd3, - 0x75, 0xde, 0xa9, 0xf4, 0x31, 0x54, 0xfe, 0xda, 0x5d, 0x3e, 0x9b, 0xf2, 0x10, 0x67, 0x2c, 0x70, - 0xf3, 0x9b, 0xfc, 0x48, 0x54, 0x59, 0x84, 0x05, 0xae, 0x53, 0x68, 0xff, 0x5d, 0x81, 0x42, 0x3d, - 0xb0, 0x3f, 0xf4, 0x5a, 0x07, 0xa9, 0xfe, 0xb1, 0x02, 0x47, 0x3a, 0xde, 0x04, 0xfa, 0xeb, 0x5c, - 0xbf, 0x16, 0xe9, 0xdf, 0x87, 0x63, 0xac, 0x15, 0x58, 0x14, 0x04, 0x62, 0x0d, 0x8e, 0xc0, 0xa2, - 0xd0, 0x2b, 0x56, 0xe1, 0x07, 0x85, 0x3d, 0xe5, 0x27, 0xd9, 0x75, 0xcf, 0x62, 0xb5, 0xf0, 0x5f, - 0x3f, 0x9e, 0x9f, 0x84, 0xa5, 0x3e, 0x51, 0x42, 0xf2, 0x9f, 0x0a, 0x1c, 0x15, 0x0b, 0xb1, 0xee, - 0x59, 0xe2, 0xb8, 0xfe, 0x0a, 0xd4, 0x40, 0x19, 0x4e, 0xed, 0x27, 0x3d, 0x5e, 0x9b, 0xb5, 0x6f, - 0x0e, 0x41, 0xa6, 0x1e, 0xd8, 0x6a, 0x0b, 0x40, 0xfa, 0x42, 0x72, 0x76, 0xf0, 0x31, 0xae, 0xe7, - 0xb3, 0x85, 0x56, 0x4b, 0x09, 0x8c, 0xfd, 0x49, 0x7e, 0xe8, 0x75, 0x3f, 0x95, 0x1f, 0x42, 0x9c, - 0x74, 0x7e, 0xa4, 0xeb, 0xa7, 0xda, 0x85, 0xc3, 0x7d, 0x1f, 0x17, 0x56, 0x53, 0x90, 0x24, 0x70, - 0xed, 0xad, 0xb1, 0xe0, 0xc2, 0xf3, 0x27, 0x30, 0x1b, 0x5f, 0x7a, 0x5f, 0x1b, 0xca, 0xc0, 0x51, - 0xda, 0x85, 0x34, 0x28, 0x41, 0x7f, 0x17, 0xf2, 0xa2, 0x7e, 0x5f, 0x1f, 0x6a, 0x19, 0xc3, 0xb4, - 0xd5, 0x54, 0x30, 0x39, 0x45, 0xd2, 0xdd, 0x70, 0x78, 0x8a, 0x12, 0xe0, 0x88, 0x14, 0xf5, 0x5f, - 0x42, 0x54, 0x0c, 0x73, 0xf2, 0x05, 0xa4, 0x3a, 0xd4, 0x5e, 0x42, 0x6a, 0x17, 0xd3, 0x22, 0xe5, - 0x9c, 0xc4, 0x7d, 0x76, 0x78, 0x4e, 0x38, 0x6a, 0x44, 0x4e, 0xf6, 0x74, 0x55, 0xaa, 0x44, 0x3e, - 0xdd, 0x0c, 0x57, 0x22, 0x21, 0x47, 0x28, 0xd9, 0xe7, 0xe8, 0xa2, 0x76, 0x60, 0x61, 0xef, 0xb9, - 0xe5, 0x42, 0x0a, 0x12, 0x81, 0xd6, 0xde, 0x1c, 0x07, 0x2d, 0xdc, 0x12, 0x28, 0xf6, 0x1e, 0x57, - 0xce, 0xa5, 0xa0, 0x89, 0x17, 0x73, 0x2d, 0x3d, 0x56, 0x38, 0xbc, 0x0d, 0x59, 0xd6, 0x98, 0x4e, - 0x0f, 0xb5, 0xa5, 0x10, 0xed, 0x8d, 0x91, 0x10, 0xc1, 0x7a, 0x07, 0x72, 0xbc, 0xfd, 0xff, 0x7f, - 0xa8, 0x51, 0x04, 0xd2, 0xce, 0xa7, 0x00, 0x09, 0x6e, 0x1f, 0xe6, 0xf7, 0x34, 0xd5, 0xf3, 0x69, - 0x5e, 0x6c, 0x0e, 0xd6, 0x2e, 0x8f, 0x01, 0x16, 0x3e, 0x3f, 0x83, 0xc5, 0xfe, 0xae, 0xa6, 0xa7, - 0x88, 0x5a, 0xc2, 0x6b, 0x6f, 0x8f, 0x87, 0x8f, 0x9d, 0x6f, 0x7c, 0xf0, 0xe4, 0x97, 0xf2, 0xd4, - 0x93, 0xe7, 0x65, 0xe5, 0xe9, 0xf3, 0xb2, 0xf2, 0xf3, 0xf3, 0xb2, 0xf2, 0xf9, 0x8b, 0xf2, 0xd4, - 0xd3, 0x17, 0xe5, 0xa9, 0x1f, 0x5f, 0x94, 0xa7, 0xee, 0x5c, 0xee, 0x69, 0x5a, 0x94, 0x7f, 0x95, - 0xb4, 0x5a, 0xb8, 0x89, 0x4d, 0x87, 0x8f, 0x6b, 0xf2, 0xd7, 0x7b, 0xd6, 0xc5, 0x1a, 0x39, 0x76, - 0xd7, 0xb8, 0xfc, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xe3, 0x8f, 0xe0, 0x71, 0x18, 0x00, + // 1441 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0xc1, 0x6f, 0x1b, 0x45, + 0x17, 0xcf, 0xc6, 0x8e, 0x63, 0xbf, 0xd4, 0x49, 0xb3, 0x6d, 0x5a, 0x67, 0xdb, 0x3a, 0xa9, 0xfb, + 0x7d, 0x5f, 0xfd, 0xb5, 0xcd, 0xba, 0x4d, 0x29, 0x12, 0xa8, 0xaa, 0x48, 0x1a, 0x15, 0x02, 0xb5, + 0x28, 0x06, 0x84, 0x54, 0x81, 0xd2, 0xb1, 0x77, 0xbc, 0x1d, 0x75, 0x77, 0xc7, 0xdd, 0x5d, 0x53, + 0x5b, 0xfc, 0x13, 0xd0, 0x53, 0x25, 0x0e, 0xdc, 0xf9, 0x0b, 0xf8, 0x13, 0x22, 0xc1, 0xa1, 0x12, + 0x17, 0xc4, 0x21, 0x85, 0x56, 0xe2, 0xc8, 0x81, 0x1b, 0x9c, 0xd0, 0xcc, 0xce, 0xce, 0xae, 0xe3, + 0xd8, 0xde, 0x2d, 0x45, 0x02, 0xf5, 0xe4, 0x9d, 0x9d, 0xdf, 0xfb, 0xbd, 0xf7, 0x9b, 0x37, 0xfb, + 0xde, 0x8c, 0xe1, 0x74, 0x8b, 0xda, 0x06, 0xee, 0xd5, 0x2c, 0x72, 0xbf, 0x4b, 0x0c, 0xe2, 0xf7, + 0x6b, 0x9f, 0x5e, 0x6a, 0x62, 0x1f, 0x5d, 0xaa, 0xf9, 0x3d, 0xbd, 0xe3, 0x52, 0x9f, 0xaa, 0xa5, + 0x00, 0xa2, 0x4b, 0x88, 0x2e, 0x20, 0xda, 0x51, 0x93, 0x9a, 0x94, 0x83, 0x6a, 0xec, 0x29, 0xc0, + 0x6b, 0xe5, 0x16, 0xf5, 0x6c, 0xea, 0xd5, 0x9a, 0xc8, 0xc3, 0x92, 0xad, 0x45, 0x89, 0x13, 0xce, + 0x9b, 0x94, 0x9a, 0x16, 0xae, 0xf1, 0x51, 0xb3, 0xdb, 0xae, 0x19, 0x5d, 0x17, 0xf9, 0x84, 0x86, + 0xf3, 0xd5, 0x91, 0x21, 0x45, 0x11, 0x70, 0x64, 0xe5, 0xa1, 0x02, 0xc5, 0xba, 0x67, 0x5e, 0x77, + 0x31, 0xf2, 0xf1, 0x2d, 0x44, 0x5c, 0xb5, 0x04, 0xb3, 0x2d, 0x36, 0xa2, 0x6e, 0x49, 0x59, 0x55, + 0xaa, 0x85, 0x46, 0x38, 0x54, 0xff, 0x07, 0x0b, 0x2c, 0xa0, 0x1d, 0x16, 0xc8, 0x8e, 0x81, 0x1d, + 0x6a, 0x97, 0xa6, 0x39, 0xa2, 0xc8, 0x5e, 0x5f, 0xa7, 0xc4, 0xd9, 0x62, 0x2f, 0xd5, 0x2a, 0x1c, + 0xbe, 0xdf, 0xa5, 0xfe, 0x00, 0x30, 0xc3, 0x81, 0xf3, 0xfc, 0x7d, 0x84, 0x5c, 0x82, 0x1c, 0xea, + 0x74, 0x76, 0x88, 0x51, 0xca, 0xae, 0x2a, 0xd5, 0x6c, 0x63, 0x06, 0x75, 0x3a, 0xdb, 0x46, 0xe5, + 0x38, 0x2c, 0x0d, 0xc4, 0xd4, 0xc0, 0x5e, 0x87, 0x3a, 0x1e, 0xae, 0x7c, 0x3b, 0x10, 0x2d, 0xa5, + 0xd6, 0x98, 0x68, 0x8f, 0xc3, 0x6c, 0x07, 0x11, 0x97, 0x91, 0x4f, 0x73, 0xf2, 0x1c, 0x1b, 0x6e, + 0x1b, 0x6a, 0x07, 0x8a, 0x06, 0xee, 0x50, 0x8f, 0xf8, 0x3c, 0x40, 0xaf, 0x94, 0x59, 0xcd, 0x54, + 0xe7, 0xd6, 0x97, 0xf5, 0x60, 0xd1, 0x75, 0x26, 0x26, 0xcc, 0x8f, 0xce, 0x62, 0xdd, 0xbc, 0xb8, + 0xbb, 0xb7, 0x32, 0xf5, 0xf5, 0x93, 0x95, 0xaa, 0x49, 0xfc, 0xbb, 0xdd, 0xa6, 0xde, 0xa2, 0x76, + 0x4d, 0x64, 0x28, 0xf8, 0x59, 0xf3, 0x8c, 0x7b, 0x35, 0xbf, 0xdf, 0xc1, 0x1e, 0x37, 0xf0, 0x1a, + 0x87, 0x84, 0x07, 0x3e, 0x4a, 0x24, 0x93, 0x52, 0x4b, 0xca, 0xfc, 0x2a, 0x03, 0x47, 0xe4, 0x4c, + 0x03, 0x39, 0x26, 0x36, 0x26, 0x88, 0x8d, 0x3c, 0x4c, 0xc7, 0x3c, 0xc4, 0xd7, 0x20, 0x33, 0x7e, + 0x0d, 0xb2, 0x7f, 0xf7, 0x1a, 0xbc, 0x01, 0x05, 0x9b, 0x38, 0x3b, 0x1d, 0x97, 0xb4, 0x70, 0x69, + 0x86, 0x45, 0xbf, 0x79, 0x86, 0x51, 0xfe, 0xb8, 0xb7, 0x72, 0x22, 0x20, 0xf0, 0x8c, 0x7b, 0x3a, + 0xa1, 0x35, 0x1b, 0xf9, 0x77, 0xf5, 0x9b, 0xd8, 0x44, 0xad, 0xfe, 0x16, 0x6e, 0x35, 0xf2, 0x36, + 0x71, 0x6e, 0x31, 0x23, 0xce, 0x80, 0x7a, 0x82, 0x21, 0x97, 0x86, 0x01, 0xf5, 0x02, 0x86, 0xb7, + 0xa0, 0x48, 0x1c, 0xe2, 0x13, 0x64, 0x09, 0x96, 0xd9, 0xe4, 0x2c, 0x87, 0x84, 0x25, 0x67, 0xaa, + 0x9c, 0x82, 0x13, 0x07, 0x24, 0x48, 0x26, 0xf0, 0x3b, 0x05, 0xa0, 0xee, 0x99, 0x5b, 0xc1, 0x02, + 0xa8, 0x27, 0xa1, 0x20, 0xd6, 0x42, 0x66, 0x2e, 0x7a, 0xc1, 0x93, 0x44, 0xa9, 0x15, 0xdf, 0xa8, + 0x94, 0x5a, 0xff, 0xa4, 0x8d, 0x7a, 0x14, 0xd4, 0x48, 0x8d, 0x14, 0xf9, 0xa5, 0x02, 0x73, 0x75, + 0xcf, 0xfc, 0x88, 0xf8, 0x77, 0x0d, 0x17, 0x3d, 0x50, 0xcb, 0x00, 0x0f, 0xc4, 0x33, 0x0e, 0x65, + 0xc6, 0xde, 0x8c, 0xd6, 0x79, 0x15, 0x0a, 0x7c, 0x82, 0x89, 0xe4, 0xfb, 0x74, 0xac, 0xc6, 0x2c, + 0xd3, 0xd8, 0xc8, 0x33, 0x0b, 0x36, 0x1e, 0x15, 0xf3, 0x12, 0xff, 0x84, 0xc2, 0xe0, 0xa2, 0x0a, + 0x92, 0xe1, 0x15, 0xe4, 0x26, 0xb1, 0x89, 0xff, 0xae, 0x6b, 0x60, 0x5e, 0xef, 0x28, 0x7b, 0x90, + 0x31, 0x87, 0xc3, 0xd1, 0x15, 0xe4, 0x06, 0x14, 0x0c, 0xe2, 0xe2, 0x16, 0xab, 0xb8, 0x3c, 0xe0, + 0xf9, 0xf5, 0xaa, 0x3e, 0xaa, 0xc4, 0xeb, 0xdc, 0xcd, 0x56, 0x88, 0x6f, 0x44, 0xa6, 0xea, 0x35, + 0x00, 0xda, 0x6e, 0x63, 0x37, 0x50, 0x9e, 0x4d, 0xa6, 0xbc, 0xc0, 0x4d, 0xb8, 0xf4, 0x73, 0xb0, + 0x68, 0x60, 0x1b, 0x39, 0x46, 0xbc, 0xd2, 0xf2, 0x6f, 0xab, 0xb1, 0x10, 0x4c, 0x44, 0xa5, 0xf6, + 0x35, 0x98, 0x49, 0xfd, 0xe5, 0x04, 0x16, 0xea, 0x15, 0xc8, 0x21, 0x9b, 0x76, 0x1d, 0x5f, 0x7c, + 0x2f, 0xa7, 0x84, 0xed, 0xd2, 0xb0, 0xed, 0xb6, 0xe3, 0x37, 0x04, 0x58, 0x7d, 0x1b, 0xe6, 0xf9, + 0x4a, 0xee, 0x58, 0xa4, 0x8d, 0xbd, 0x0e, 0x72, 0x4a, 0x79, 0xa1, 0x30, 0xe8, 0x5e, 0x7a, 0xd8, + 0xbd, 0xf4, 0x2d, 0xd1, 0xbd, 0x36, 0xf3, 0x8c, 0xf9, 0xd1, 0x93, 0x15, 0xa5, 0x51, 0xe4, 0xa6, + 0x37, 0x85, 0x65, 0x2c, 0xc9, 0x85, 0xe1, 0x0a, 0x1a, 0x25, 0x53, 0xa6, 0xf9, 0x8b, 0x0c, 0xcc, + 0xd7, 0x3d, 0xb3, 0x8e, 0xdc, 0x7b, 0xf8, 0xe5, 0xca, 0x73, 0x94, 0xac, 0xdc, 0x5f, 0x4b, 0xd6, + 0xec, 0x0b, 0x48, 0x56, 0x3e, 0x9e, 0xac, 0x12, 0x1c, 0x1b, 0x4c, 0x89, 0xcc, 0xd6, 0x6e, 0x96, + 0x97, 0xcb, 0x7a, 0x7d, 0x52, 0xa6, 0xd2, 0xb6, 0xb9, 0x6d, 0x98, 0x67, 0x2d, 0xc3, 0xc3, 0x56, + 0x58, 0xf1, 0xb3, 0x29, 0x2a, 0xbe, 0x8d, 0x7a, 0xef, 0x63, 0x2b, 0xa8, 0xf8, 0x9c, 0x8a, 0x38, + 0x71, 0xaa, 0x99, 0x34, 0x54, 0xc4, 0x89, 0xa8, 0xae, 0xc1, 0x1c, 0xa7, 0x49, 0x93, 0x27, 0x60, + 0x16, 0x1b, 0x41, 0xae, 0xde, 0x84, 0x22, 0x53, 0xd5, 0xec, 0xf6, 0xd3, 0xb7, 0xb1, 0x39, 0x1b, + 0xf5, 0x36, 0xbb, 0xfd, 0x20, 0x10, 0x46, 0x44, 0x9c, 0x18, 0x51, 0x3e, 0x0d, 0x11, 0x71, 0x24, + 0xd1, 0x55, 0x00, 0x46, 0x22, 0x04, 0x15, 0x92, 0x08, 0x2a, 0x34, 0xbb, 0xfd, 0x8d, 0x51, 0x7b, + 0x0f, 0x9e, 0x77, 0xef, 0x89, 0x56, 0x25, 0x76, 0x92, 0xdc, 0x60, 0x5d, 0x5e, 0x0d, 0xae, 0x23, + 0xa7, 0x85, 0xad, 0xe7, 0xae, 0x06, 0xcb, 0x90, 0x0f, 0xc2, 0x94, 0xdb, 0x2c, 0xb0, 0xd9, 0x36, + 0x46, 0xf5, 0xa0, 0x60, 0xc7, 0xc7, 0xdc, 0xca, 0x80, 0xee, 0xf0, 0x30, 0x83, 0x99, 0x0d, 0x2b, + 0x98, 0xf4, 0xc6, 0x04, 0xb5, 0x0c, 0x79, 0x11, 0x94, 0x57, 0x9a, 0x5e, 0xcd, 0x30, 0xdf, 0x41, + 0x54, 0xf1, 0x9e, 0x9d, 0x89, 0xfb, 0x3e, 0x09, 0xda, 0xb0, 0x07, 0xe9, 0xff, 0x63, 0x38, 0x2c, + 0x67, 0x5f, 0xf8, 0x67, 0x57, 0xd1, 0xa0, 0xb4, 0x9f, 0x5d, 0x7a, 0xfe, 0x45, 0x81, 0xd9, 0xba, + 0x67, 0xde, 0x40, 0x6e, 0xfc, 0xf8, 0xaf, 0xec, 0xe7, 0x3d, 0xf0, 0xa0, 0x70, 0x0c, 0x72, 0x6d, + 0xe4, 0xda, 0xd8, 0x15, 0xd7, 0x09, 0x31, 0x52, 0x1f, 0x2a, 0xb0, 0xc8, 0x1e, 0x89, 0x63, 0xee, + 0x44, 0x27, 0x89, 0x89, 0x75, 0xf6, 0x1d, 0xb6, 0x89, 0x7e, 0xdb, 0x5b, 0x29, 0xf5, 0x91, 0x6d, + 0xbd, 0x5e, 0x19, 0x62, 0xa8, 0xfc, 0xb1, 0xb7, 0x72, 0x36, 0xe1, 0x49, 0xaa, 0xb1, 0x20, 0xcc, + 0x6f, 0x89, 0x73, 0x49, 0x65, 0x11, 0x16, 0x84, 0x4e, 0xa9, 0xfd, 0x57, 0x05, 0x0a, 0x75, 0xcf, + 0xfc, 0xd0, 0x69, 0xbf, 0x48, 0xf5, 0x8f, 0x14, 0x38, 0xd2, 0x75, 0x9e, 0x43, 0x7f, 0x5d, 0xe8, + 0xd7, 0x02, 0xfd, 0x07, 0x70, 0xa4, 0x5a, 0x81, 0x45, 0x49, 0x20, 0xd7, 0xe0, 0x08, 0x2c, 0x4a, + 0xbd, 0x72, 0x15, 0xbe, 0x57, 0xf8, 0x5b, 0x71, 0x9c, 0xdc, 0x70, 0x0c, 0xbe, 0x17, 0xfe, 0xed, + 0x67, 0xe4, 0x13, 0xb0, 0x3c, 0x24, 0x4a, 0x4a, 0xfe, 0x5d, 0x81, 0xa3, 0x72, 0x21, 0x36, 0x1c, + 0x43, 0x9e, 0x99, 0x5f, 0x82, 0x3d, 0x50, 0x86, 0x93, 0x07, 0x49, 0x0f, 0xd7, 0x66, 0xfd, 0x9b, + 0x43, 0x90, 0xa9, 0x7b, 0xa6, 0xda, 0x06, 0x88, 0xfd, 0x0b, 0x71, 0x76, 0xf4, 0x39, 0x6b, 0xe0, + 0xaf, 0x01, 0xad, 0x96, 0x10, 0x18, 0xfa, 0x8b, 0xf9, 0x61, 0x57, 0xea, 0x44, 0x7e, 0x28, 0xb5, + 0x92, 0xf9, 0x89, 0xdd, 0x01, 0xd5, 0x1e, 0x1c, 0x1e, 0xba, 0xc0, 0xaf, 0x25, 0x20, 0x89, 0xe0, + 0xda, 0x95, 0x54, 0x70, 0xe9, 0xf9, 0x13, 0x98, 0x0d, 0x6f, 0x9e, 0xff, 0x19, 0xcb, 0x20, 0x50, + 0xda, 0x85, 0x24, 0x28, 0x49, 0x7f, 0x07, 0xf2, 0x72, 0xff, 0xfe, 0x77, 0xac, 0x65, 0x08, 0xd3, + 0xd6, 0x12, 0xc1, 0xe2, 0x29, 0x8a, 0x5d, 0xd0, 0xc6, 0xa7, 0x28, 0x02, 0x4e, 0x48, 0xd1, 0xf0, + 0x2d, 0x41, 0x25, 0x30, 0x17, 0xbf, 0x21, 0x54, 0xc7, 0xda, 0xc7, 0x90, 0xda, 0xc5, 0xa4, 0xc8, + 0x78, 0x4e, 0xc2, 0x3e, 0x3b, 0x3e, 0x27, 0x02, 0x35, 0x21, 0x27, 0xfb, 0xba, 0x2a, 0x53, 0x12, + 0x3f, 0xdd, 0x8c, 0x57, 0x12, 0x43, 0x4e, 0x50, 0x72, 0xc0, 0xd1, 0x45, 0xed, 0xc2, 0xc2, 0xfe, + 0x73, 0xcb, 0x85, 0x04, 0x24, 0x12, 0xad, 0xbd, 0x92, 0x06, 0x2d, 0xdd, 0x52, 0x28, 0x0e, 0x1e, + 0x57, 0xce, 0x25, 0xa0, 0x09, 0x17, 0x73, 0x3d, 0x39, 0x56, 0x3a, 0xfc, 0x00, 0xb2, 0xbc, 0x31, + 0x9d, 0x1e, 0x6b, 0xcb, 0x20, 0xda, 0xff, 0x27, 0x42, 0x24, 0xeb, 0x6d, 0xc8, 0x89, 0xf6, 0x7f, + 0x66, 0xac, 0x51, 0x00, 0xd2, 0xce, 0x27, 0x00, 0x49, 0x6e, 0x17, 0xe6, 0xf7, 0x35, 0xd5, 0xf3, + 0x49, 0x3e, 0x6c, 0x01, 0xd6, 0x2e, 0xa7, 0x00, 0x4b, 0x9f, 0x9f, 0xc1, 0xe2, 0x70, 0x57, 0xd3, + 0x13, 0x44, 0x1d, 0xc3, 0x6b, 0xaf, 0xa6, 0xc3, 0x87, 0xce, 0x37, 0xdf, 0xdb, 0xfd, 0xb9, 0x3c, + 0xb5, 0xfb, 0xb4, 0xac, 0x3c, 0x7e, 0x5a, 0x56, 0x7e, 0x7a, 0x5a, 0x56, 0x3e, 0x7f, 0x56, 0x9e, + 0x7a, 0xfc, 0xac, 0x3c, 0xf5, 0xc3, 0xb3, 0xf2, 0xd4, 0xed, 0xcb, 0x03, 0x4d, 0x8b, 0xf1, 0xaf, + 0xd1, 0x76, 0x9b, 0xb4, 0x08, 0xb2, 0xc4, 0xb8, 0x16, 0xff, 0x87, 0x9c, 0x77, 0xb1, 0x66, 0x8e, + 0xdf, 0x35, 0x2e, 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0x78, 0x24, 0xce, 0x28, 0xd5, 0x17, 0x00, 0x00, } @@ -2440,7 +2442,7 @@ func (m *MsgLimitOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x48 } - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.OrderLifespan, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.OrderLifespan):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.OrderLifespan, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.OrderLifespan):]) if err2 != nil { return 0, err2 } @@ -2553,7 +2555,7 @@ func (m *MsgMarketOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x40 } - n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.OrderLifespan, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.OrderLifespan):]) + n4, err4 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.OrderLifespan, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.OrderLifespan):]) if err4 != nil { return 0, err4 } @@ -2651,7 +2653,7 @@ func (m *MsgMMOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n6, err6 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.OrderLifespan, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.OrderLifespan):]) + n6, err6 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.OrderLifespan, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.OrderLifespan):]) if err6 != nil { return 0, err6 } @@ -3473,7 +3475,7 @@ func (m *MsgLimitOrder) Size() (n int) { n += 1 + l + sovTx(uint64(l)) l = m.Amount.Size() n += 1 + l + sovTx(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.OrderLifespan) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.OrderLifespan) n += 1 + l + sovTx(uint64(l)) if m.AppId != 0 { n += 1 + sovTx(uint64(m.AppId)) @@ -3514,7 +3516,7 @@ func (m *MsgMarketOrder) Size() (n int) { } l = m.Amount.Size() n += 1 + l + sovTx(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.OrderLifespan) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.OrderLifespan) n += 1 + l + sovTx(uint64(l)) if m.AppId != 0 { n += 1 + sovTx(uint64(m.AppId)) @@ -3559,7 +3561,7 @@ func (m *MsgMMOrder) Size() (n int) { n += 1 + l + sovTx(uint64(l)) l = m.BuyAmount.Size() n += 1 + l + sovTx(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.OrderLifespan) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.OrderLifespan) n += 1 + l + sovTx(uint64(l)) return n } @@ -5187,7 +5189,7 @@ func (m *MsgLimitOrder) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.OrderLifespan, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.OrderLifespan, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5508,7 +5510,7 @@ func (m *MsgMarketOrder) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.OrderLifespan, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.OrderLifespan, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5934,7 +5936,7 @@ func (m *MsgMMOrder) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.OrderLifespan, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.OrderLifespan, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/liquidity/types/util.go b/x/liquidity/types/util.go index 13b266bc9..2fe43a878 100644 --- a/x/liquidity/types/util.go +++ b/x/liquidity/types/util.go @@ -4,10 +4,10 @@ import ( "strconv" "strings" + "github.com/cometbft/cometbft/crypto" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/tendermint/tendermint/crypto" "github.com/comdex-official/comdex/x/liquidity/amm" "github.com/comdex-official/comdex/x/liquidity/expected" @@ -100,7 +100,7 @@ func NewPoolResponse(pool Pool, rx, ry sdk.Coin, poolCoinSupply sdk.Int) PoolRes // IsTooSmallOrderAmount returns whether the order amount is too small for // matching, based on the order price. func IsTooSmallOrderAmount(amt sdk.Int, price sdk.Dec) bool { - return amt.LT(amm.MinCoinAmount) || price.MulInt(amt).LT(amm.MinCoinAmount.ToDec()) + return amt.LT(amm.MinCoinAmount) || price.MulInt(amt).LT(sdk.NewDec(amm.MinCoinAmount.Int64())) } // PriceLimits returns the lowest and the highest price limits with given last price diff --git a/x/locker/keeper/keeper.go b/x/locker/keeper/keeper.go index 0f6b058ea..b54447405 100644 --- a/x/locker/keeper/keeper.go +++ b/x/locker/keeper/keeper.go @@ -3,19 +3,20 @@ package keeper import ( "fmt" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/libs/log" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/comdex-official/comdex/x/locker/expected" "github.com/comdex-official/comdex/x/locker/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) type Keeper struct { cdc codec.BinaryCodec - key sdk.StoreKey + key storetypes.StoreKey paramstore paramtypes.Subspace bank expected.BankKeeper asset expected.AssetKeeper @@ -24,7 +25,7 @@ type Keeper struct { rewards expected.RewardsKeeper } -func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, ps paramtypes.Subspace, bank expected.BankKeeper, asset expected.AssetKeeper, collector expected.CollectorKeeper, esm expected.EsmKeeper, rewards expected.RewardsKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, ps paramtypes.Subspace, bank expected.BankKeeper, asset expected.AssetKeeper, collector expected.CollectorKeeper, esm expected.EsmKeeper, rewards expected.RewardsKeeper) Keeper { return Keeper{ cdc: cdc, key: key, diff --git a/x/locker/keeper/keeper_test.go b/x/locker/keeper/keeper_test.go index da0d6d0df..23b87c364 100644 --- a/x/locker/keeper/keeper_test.go +++ b/x/locker/keeper/keeper_test.go @@ -1,16 +1,17 @@ package keeper_test import ( - rewardsKeeper "github.com/comdex-official/comdex/x/rewards/keeper" "testing" "time" + rewardsKeeper "github.com/comdex-official/comdex/x/rewards/keeper" + collectorKeeper "github.com/comdex-official/comdex/x/collector/keeper" "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" assetKeeper "github.com/comdex-official/comdex/x/asset/keeper" @@ -36,7 +37,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.lockerKeeper = s.app.LockerKeeper s.assetKeeper = s.app.AssetKeeper diff --git a/x/locker/keeper/locker.go b/x/locker/keeper/locker.go index deef83381..2fea6e84f 100644 --- a/x/locker/keeper/locker.go +++ b/x/locker/keeper/locker.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" esmtypes "github.com/comdex-official/comdex/x/esm/types" diff --git a/x/locker/module.go b/x/locker/module.go index 4d84488a5..854244981 100644 --- a/x/locker/module.go +++ b/x/locker/module.go @@ -9,7 +9,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -119,19 +119,9 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/locker/module_simulation.go b/x/locker/module_simulation.go index 3ca7db8ee..e3aaeaae9 100644 --- a/x/locker/module_simulation.go +++ b/x/locker/module_simulation.go @@ -1,10 +1,8 @@ package locker import ( - "math/rand" - "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -40,9 +38,9 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RandomizedParams creates randomized param changes for the simulator. -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} -} +// func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +// return []simtypes.ParamChange{} +// } // RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/locker/types/codec.go b/x/locker/types/codec.go index 475185723..daca08c7c 100644 --- a/x/locker/types/codec.go +++ b/x/locker/types/codec.go @@ -38,5 +38,6 @@ var ( func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/locker/types/events.pb.go b/x/locker/types/events.pb.go index 46af8e43c..40abab732 100644 --- a/x/locker/types/events.pb.go +++ b/x/locker/types/events.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" math "math" ) diff --git a/x/locker/types/genesis.pb.go b/x/locker/types/genesis.pb.go index f9102635f..cb276d942 100644 --- a/x/locker/types/genesis.pb.go +++ b/x/locker/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/locker/types/locker.pb.go b/x/locker/types/locker.pb.go index 3111cbc4c..3004734cc 100644 --- a/x/locker/types/locker.pb.go +++ b/x/locker/types/locker.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -29,7 +29,7 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -//locker_id will be the key which will be derived from the LockerLookUpTable +// locker_id will be the key which will be derived from the LockerLookUpTable type Locker struct { LockerId uint64 `protobuf:"varint,1,opt,name=locker_id,json=lockerId,proto3" json:"locker_id,omitempty" yaml:"locker_id"` Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty" yaml:"depositor"` @@ -197,7 +197,7 @@ func (m *LockerLookupTableData) XXX_DiscardUnknown() { var xxx_messageInfo_LockerLookupTableData proto.InternalMessageInfo -//Key is app_mapping_id +// Key is app_mapping_id type LockerProductAssetMapping struct { AppId uint64 `protobuf:"varint,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" yaml:"app_id"` AssetId uint64 `protobuf:"varint,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty" yaml:"asset_id"` @@ -410,7 +410,7 @@ func (m *Locker) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) if err1 != nil { return 0, err1 } @@ -443,7 +443,7 @@ func (m *Locker) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err2 != nil { return 0, err2 } @@ -565,7 +565,7 @@ func (m *UserTxData) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.TxTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.TxTime):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.TxTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.TxTime):]) if err3 != nil { return 0, err3 } @@ -806,7 +806,7 @@ func (m *Locker) Size() (n int) { n += 1 + l + sovLocker(uint64(l)) l = m.NetBalance.Size() n += 1 + l + sovLocker(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovLocker(uint64(l)) if m.AssetDepositId != 0 { n += 1 + sovLocker(uint64(m.AssetDepositId)) @@ -820,7 +820,7 @@ func (m *Locker) Size() (n int) { if m.BlockHeight != 0 { n += 1 + sovLocker(uint64(m.BlockHeight)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) n += 1 + l + sovLocker(uint64(l)) return n } @@ -867,7 +867,7 @@ func (m *UserTxData) Size() (n int) { n += 1 + l + sovLocker(uint64(l)) l = m.Balance.Size() n += 1 + l + sovLocker(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.TxTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.TxTime) n += 1 + l + sovLocker(uint64(l)) return n } @@ -1125,7 +1125,7 @@ func (m *Locker) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1235,7 +1235,7 @@ func (m *Locker) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1591,7 +1591,7 @@ func (m *UserTxData) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.TxTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.TxTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/locker/types/params.pb.go b/x/locker/types/params.pb.go index 238974230..ecaa336e2 100644 --- a/x/locker/types/params.pb.go +++ b/x/locker/types/params.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/locker/types/query.pb.go b/x/locker/types/query.pb.go index abdb531d8..522aaf55e 100644 --- a/x/locker/types/query.pb.go +++ b/x/locker/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" types "github.com/comdex-official/comdex/x/asset/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/locker/types/tx.pb.go b/x/locker/types/tx.pb.go index 8e6cb2206..ecfa3f9e4 100644 --- a/x/locker/types/tx.pb.go +++ b/x/locker/types/tx.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/market/abci.go b/x/market/abci.go index 67ef3a206..4cfdfdc47 100644 --- a/x/market/abci.go +++ b/x/market/abci.go @@ -6,9 +6,9 @@ import ( bandoraclemoduletypes "github.com/comdex-official/comdex/x/bandoracle/types" "github.com/comdex-official/comdex/x/market/keeper" "github.com/comdex-official/comdex/x/market/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" ) func BeginBlocker(ctx sdk.Context, _ abci.RequestBeginBlock, k keeper.Keeper, bandKeeper bandkeeper.Keeper, assetKeeper assetkeeper.Keeper) { @@ -17,8 +17,8 @@ func BeginBlocker(ctx sdk.Context, _ abci.RequestBeginBlock, k keeper.Keeper, ba if bandKeeper.GetOracleValidationResult(ctx) { block := bandKeeper.GetLastBlockHeight(ctx) if block != types.Int64Zero { - // if ctx.BlockHeight()%types.Int64Twenty == types.Int64Zero && ctx.BlockHeight() != block && bandKeeper.GetCheckFlag(ctx) { - if ctx.BlockHeight()%types.Int64Twenty == types.Int64Zero { + // if ctx.BlockHeight()%types.Int64Forty == types.Int64Zero && ctx.BlockHeight() != block && bandKeeper.GetCheckFlag(ctx) { + if ctx.BlockHeight()%types.Int64Forty == types.Int64Zero { discardData := bandKeeper.GetDiscardData(ctx) if discardData.DiscardBool { allTwa := k.GetAllTwa(ctx) diff --git a/x/market/expected/keeper.go b/x/market/expected/keeper.go index 976ea49ea..be4f42dda 100644 --- a/x/market/expected/keeper.go +++ b/x/market/expected/keeper.go @@ -3,8 +3,8 @@ package expected import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v4/modules/core/exported" + ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + // ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" assettypes "github.com/comdex-official/comdex/x/asset/types" "github.com/comdex-official/comdex/x/bandoracle/types" @@ -14,7 +14,7 @@ type ChannelKeeper interface { ChanCloseInit(ctx sdk.Context, portID, channelID string, capability *capabilitytypes.Capability) error GetChannel(ctx sdk.Context, srcPort, srcChannel string) (ibcchanneltypes.Channel, bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) - SendPacket(ctx sdk.Context, cap *capabilitytypes.Capability, packet ibcexported.PacketI) error + // SendPacket(ctx sdk.Context, cap *capabilitytypes.Capability, packet ibcexported.PacketI) error } type PortKeeper interface { diff --git a/x/market/keeper/keeper.go b/x/market/keeper/keeper.go index c7736815c..4d9cf58db 100644 --- a/x/market/keeper/keeper.go +++ b/x/market/keeper/keeper.go @@ -6,19 +6,20 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" assetkeeper "github.com/comdex-official/comdex/x/asset/keeper" + storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/comdex-official/comdex/x/market/expected" ) type Keeper struct { cdc codec.BinaryCodec - key sdk.StoreKey + key storetypes.StoreKey params paramstypes.Subspace scoped expected.ScopedKeeper assetKeeper assetkeeper.Keeper bandoraclekeeper expected.BandOracleKeeper } -func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, params paramstypes.Subspace, scoped expected.ScopedKeeper, assetKeeper assetkeeper.Keeper, bandoraclekeeper expected.BandOracleKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, params paramstypes.Subspace, scoped expected.ScopedKeeper, assetKeeper assetkeeper.Keeper, bandoraclekeeper expected.BandOracleKeeper) Keeper { return Keeper{ cdc: cdc, key: key, diff --git a/x/market/keeper/keeper_test.go b/x/market/keeper/keeper_test.go index 5aa826106..116b29f89 100644 --- a/x/market/keeper/keeper_test.go +++ b/x/market/keeper/keeper_test.go @@ -70,7 +70,7 @@ func TestFucn2(t *testing.T) { intPerBlockFactor := math.Pow(factor1.MustFloat64(), yearsElapsed.MustFloat64()) intAccPerBlock := intPerBlockFactor - rewardtypes.Float64One - amtFloat := amount.ToDec().MustFloat64() + amtFloat := sdk.NewDec(amount.Int64()).MustFloat64() newAmount := intAccPerBlock * amtFloat fmt.Println("yearsElapsed", yearsElapsed) diff --git a/x/market/module.go b/x/market/module.go index 790075616..1cef4485e 100644 --- a/x/market/module.go +++ b/x/market/module.go @@ -3,8 +3,8 @@ package market import ( "context" "encoding/json" - "math/rand" + abcitypes "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -14,7 +14,6 @@ import ( "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abcitypes "github.com/tendermint/tendermint/abci/types" assetkeeper "github.com/comdex-official/comdex/x/asset/keeper" bandkeeper "github.com/comdex-official/comdex/x/bandoracle/keeper" @@ -109,16 +108,10 @@ func (a AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawM func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -func (a AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(a.keeper)) -} - func (a AppModule) QuerierRoute() string { return types.QuerierRoute } -func (a AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return nil } - func (a AppModule) RegisterServices(configurator module.Configurator) { types.RegisterQueryServer(configurator.QueryServer(), keeper.NewQueryServer(a.keeper)) } @@ -137,9 +130,9 @@ func (a AppModule) ProposalContents(_ module.SimulationState) []simulation.Weigh return nil } -func (a AppModule) RandomizedParams(_ *rand.Rand) []simulation.ParamChange { - return nil -} +// func (a AppModule) RandomizedParams(_ *rand.Rand) []simulation.ParamChange { +// return nil +// } func (a AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/market/types/codec.go b/x/market/types/codec.go index 3e3e8ac44..2f780d2ea 100644 --- a/x/market/types/codec.go +++ b/x/market/types/codec.go @@ -6,7 +6,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} diff --git a/x/market/types/genesis.pb.go b/x/market/types/genesis.pb.go index 8d021c418..9f34ac5f8 100644 --- a/x/market/types/genesis.pb.go +++ b/x/market/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/market/types/gov.pb.go b/x/market/types/gov.pb.go index 6f6a3d9c5..969000dca 100644 --- a/x/market/types/gov.pb.go +++ b/x/market/types/gov.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" math "math" ) diff --git a/x/market/types/market.pb.go b/x/market/types/market.pb.go index 4db082de3..656151384 100644 --- a/x/market/types/market.pb.go +++ b/x/market/types/market.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/market/types/packet.pb.go b/x/market/types/packet.pb.go index 60982042b..87bf7478a 100644 --- a/x/market/types/packet.pb.go +++ b/x/market/types/packet.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/market/types/params.go b/x/market/types/params.go index 64a21c639..e5db92736 100644 --- a/x/market/types/params.go +++ b/x/market/types/params.go @@ -7,6 +7,7 @@ import ( var _ paramstypes.ParamSet = (*Params)(nil) const ( + Int64Forty = int64(40) Int64Twenty = int64(20) Int64TwentyOne = int64(21) Int64Ten = int64(10) diff --git a/x/market/types/params.pb.go b/x/market/types/params.pb.go index 484478cce..a65e6cc34 100644 --- a/x/market/types/params.pb.go +++ b/x/market/types/params.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/market/types/query.pb.go b/x/market/types/query.pb.go index 1f9305f92..28ee9070d 100644 --- a/x/market/types/query.pb.go +++ b/x/market/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/rewards/abci.go b/x/rewards/abci.go index d53f19766..14d686756 100644 --- a/x/rewards/abci.go +++ b/x/rewards/abci.go @@ -1,9 +1,9 @@ package rewards import ( + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" utils "github.com/comdex-official/comdex/types" "github.com/comdex-official/comdex/x/rewards/keeper" diff --git a/x/rewards/client/cli/tx.go b/x/rewards/client/cli/tx.go index 213f9aa2e..98b686f5c 100644 --- a/x/rewards/client/cli/tx.go +++ b/x/rewards/client/cli/tx.go @@ -50,7 +50,11 @@ func NewCreateGaugeCmd() *cobra.Command { return err } - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()).WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + txf, err := tx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) gaugeTypeID, err := strconv.ParseUint(args[0], 10, 64) if err != nil { diff --git a/x/rewards/genesis_test.go b/x/rewards/genesis_test.go index 182ec5393..20546d6dc 100644 --- a/x/rewards/genesis_test.go +++ b/x/rewards/genesis_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/comdex-official/comdex/app" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/comdex-official/comdex/x/rewards" "github.com/comdex-official/comdex/x/rewards/types" @@ -12,7 +12,7 @@ import ( ) func TestGenesis(t *testing.T) { - comdexApp := app.Setup(false) + comdexApp := app.Setup(t, false) ctx := comdexApp.BaseApp.NewContext(false, tmproto.Header{}) genesisState := types.GenesisState{ diff --git a/x/rewards/keeper/grpc_query_params_test.go b/x/rewards/keeper/grpc_query_params_test.go index 724837f92..fe4b324ab 100644 --- a/x/rewards/keeper/grpc_query_params_test.go +++ b/x/rewards/keeper/grpc_query_params_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/comdex-official/comdex/app" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/comdex-official/comdex/x/rewards/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,7 +12,7 @@ import ( ) func TestParamsQuery(t *testing.T) { - comdexApp := app.Setup(false) + comdexApp := app.Setup(t, false) ctx := comdexApp.BaseApp.NewContext(false, tmproto.Header{}) wctx := sdk.WrapSDKContext(ctx) diff --git a/x/rewards/keeper/iter.go b/x/rewards/keeper/iter.go index 020dce216..1d55b6530 100644 --- a/x/rewards/keeper/iter.go +++ b/x/rewards/keeper/iter.go @@ -58,11 +58,11 @@ func (k Keeper) DistributeExtRewardLocker(ctx sdk.Context) error { continue } } - userShare := (locker.NetBalance.ToDec()).Quo(totalShare.ToDec()) // getting share percentage + userShare := (sdk.NewDec(locker.NetBalance.Int64())).Quo(sdk.NewDec(totalShare.Int64())) // getting share percentage availableRewards := v.AvailableRewards // Available Rewards Duration := v.DurationDays - int64(epoch.Count) // duration left (total duration - current count) - epochRewards := availableRewards.Amount.ToDec().Quo(sdk.NewDec(Duration)) + epochRewards := sdk.NewDec(availableRewards.Amount.Int64()).Quo(sdk.NewDec(Duration)) dailyRewards := userShare.Mul(epochRewards) user, _ := sdk.AccAddressFromBech32(locker.Depositor) finalDailyRewards := dailyRewards.TruncateInt() @@ -139,9 +139,9 @@ func (k Keeper) DistributeExtRewardVault(ctx sdk.Context) error { continue } } - individualUserShare := userVault.AmountOut.ToDec().Quo(sdk.NewDecFromInt(appExtPairVaultData.TokenMintedAmount)) // getting share percentage + individualUserShare := sdk.NewDec(userVault.AmountOut.Int64()).Quo(sdk.NewDecFromInt(appExtPairVaultData.TokenMintedAmount)) // getting share percentage Duration := v.DurationDays - int64(epoch.Count) // duration left (total duration - current count) - epochRewards := (totalRewards.Amount.ToDec()).Quo(sdk.NewDec(Duration)) + epochRewards := (sdk.NewDec(totalRewards.Amount.Int64())).Quo(sdk.NewDec(Duration)) dailyRewards := individualUserShare.Mul(epochRewards) finalDailyRewards := dailyRewards.TruncateInt() @@ -194,7 +194,7 @@ func (k Keeper) CalculationOfRewards( factor1 := a.Add(b) intPerBlockFactor := math.Pow(factor1.MustFloat64(), yearsElapsed.MustFloat64()) intAccPerBlock := intPerBlockFactor - types.Float64One - amtFloat := amount.ToDec().MustFloat64() + amtFloat := sdk.NewDec(amount.Int64()).MustFloat64() newAmount := intAccPerBlock * amtFloat // s := fmt.Sprint(newAmount) @@ -453,9 +453,9 @@ func (k Keeper) DistributeExtRewardStableVault(ctx sdk.Context) error { } } - individualUserShare := eligibleRewardAmt.ToDec().Quo(sdk.NewDecFromInt(totalMintedData)) // getting share percentage + individualUserShare := sdk.NewDec(eligibleRewardAmt.Int64()).Quo(sdk.NewDecFromInt(totalMintedData)) // getting share percentage Duration := extRew.DurationDays - int64(epoch.Count) // duration left (total duration - current count) - epochRewards := (totalRewards.Amount.ToDec()).Quo(sdk.NewDec(Duration)) + epochRewards := (sdk.NewDec(totalRewards.Amount.Int64())).Quo(sdk.NewDec(Duration)) dailyRewards := individualUserShare.Mul(epochRewards) finalDailyRewards := dailyRewards.TruncateInt() diff --git a/x/rewards/keeper/keeper.go b/x/rewards/keeper/keeper.go index 7cd353c16..c61efea71 100644 --- a/x/rewards/keeper/keeper.go +++ b/x/rewards/keeper/keeper.go @@ -11,9 +11,10 @@ import ( esmtypes "github.com/comdex-official/comdex/x/esm/types" "github.com/comdex-official/comdex/x/rewards/expected" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -23,8 +24,8 @@ import ( type ( Keeper struct { cdc codec.BinaryCodec - storeKey sdk.StoreKey - memKey sdk.StoreKey + storeKey storetypes.StoreKey + memKey storetypes.StoreKey paramstore paramtypes.Subspace locker expected.LockerKeeper collector expected.CollectorKeeper @@ -41,7 +42,7 @@ type ( func NewKeeper( cdc codec.BinaryCodec, storeKey, - memKey sdk.StoreKey, + memKey storetypes.StoreKey, ps paramtypes.Subspace, locker expected.LockerKeeper, collector expected.CollectorKeeper, diff --git a/x/rewards/keeper/keeper_test.go b/x/rewards/keeper/keeper_test.go index 801edafe9..25105b063 100644 --- a/x/rewards/keeper/keeper_test.go +++ b/x/rewards/keeper/keeper_test.go @@ -19,8 +19,8 @@ import ( "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" assetKeeper "github.com/comdex-official/comdex/x/asset/keeper" @@ -48,7 +48,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.assetKeeper = s.app.AssetKeeper s.lockerKeeper = s.app.LockerKeeper diff --git a/x/rewards/keeper/msg_server_test.go b/x/rewards/keeper/msg_server_test.go index 08ba14f59..f640fafb4 100644 --- a/x/rewards/keeper/msg_server_test.go +++ b/x/rewards/keeper/msg_server_test.go @@ -18,8 +18,8 @@ import ( "github.com/comdex-official/comdex/x/rewards/types" vaultkeeper "github.com/comdex-official/comdex/x/vault/keeper" vaulttypes "github.com/comdex-official/comdex/x/vault/types" + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" ) func (s *KeeperTestSuite) AddAppAsset() { diff --git a/x/rewards/keeper/params_test.go b/x/rewards/keeper/params_test.go index 4a8049788..ecc84f5a5 100644 --- a/x/rewards/keeper/params_test.go +++ b/x/rewards/keeper/params_test.go @@ -4,14 +4,14 @@ import ( "testing" "github.com/comdex-official/comdex/app" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/comdex-official/comdex/x/rewards/types" "github.com/stretchr/testify/require" ) func TestGetParams(t *testing.T) { - comdexApp := app.Setup(false) + comdexApp := app.Setup(t, false) ctx := comdexApp.BaseApp.NewContext(false, tmproto.Header{}) params := types.DefaultParams() diff --git a/x/rewards/keeper/rewards.go b/x/rewards/keeper/rewards.go index 1a88eccdd..d1f38b341 100644 --- a/x/rewards/keeper/rewards.go +++ b/x/rewards/keeper/rewards.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" assettypes "github.com/comdex-official/comdex/x/asset/types" collectortypes "github.com/comdex-official/comdex/x/collector/types" diff --git a/x/rewards/keeper/store.go b/x/rewards/keeper/store.go index 80daab2f6..2872e23b1 100644 --- a/x/rewards/keeper/store.go +++ b/x/rewards/keeper/store.go @@ -4,7 +4,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" "github.com/comdex-official/comdex/x/rewards/types" ) diff --git a/x/rewards/module.go b/x/rewards/module.go index 3018cd60f..e5b6e4c25 100644 --- a/x/rewards/module.go +++ b/x/rewards/module.go @@ -9,7 +9,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -121,19 +121,9 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/rewards/module_simulation.go b/x/rewards/module_simulation.go index 1f665e633..ba5a95cbd 100644 --- a/x/rewards/module_simulation.go +++ b/x/rewards/module_simulation.go @@ -1,10 +1,9 @@ package rewards import ( - "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -42,9 +41,9 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP } // RandomizedParams creates randomized param changes for the simulator. -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{} -} +// func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { +// return []simtypes.ParamChange{} +// } // RegisterStoreDecoder registers a decoder. func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/rewards/types/codec.go b/x/rewards/types/codec.go index e26c7167a..9382b7138 100644 --- a/x/rewards/types/codec.go +++ b/x/rewards/types/codec.go @@ -30,11 +30,12 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { var ( amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) + ModuleCdc = codec.NewAminoCodec(amino) ) func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/rewards/types/epochs.pb.go b/x/rewards/types/epochs.pb.go index 361e58b0b..bbf2e46db 100644 --- a/x/rewards/types/epochs.pb.go +++ b/x/rewards/types/epochs.pb.go @@ -5,9 +5,9 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" @@ -166,7 +166,7 @@ func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CurrentEpochStartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CurrentEpochStartTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CurrentEpochStartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentEpochStartTime):]) if err1 != nil { return 0, err1 } @@ -179,7 +179,7 @@ func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration):]) if err2 != nil { return 0, err2 } @@ -187,7 +187,7 @@ func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEpochs(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x1a - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err3 != nil { return 0, err3 } @@ -215,14 +215,14 @@ func (m *EpochInfo) Size() (n int) { } var l int _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovEpochs(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration) n += 1 + l + sovEpochs(uint64(l)) if m.CurrentEpoch != 0 { n += 1 + sovEpochs(uint64(m.CurrentEpoch)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CurrentEpochStartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentEpochStartTime) n += 1 + l + sovEpochs(uint64(l)) if m.CurrentEpochStartHeight != 0 { n += 1 + sovEpochs(uint64(m.CurrentEpochStartHeight)) @@ -294,7 +294,7 @@ func (m *EpochInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -327,7 +327,7 @@ func (m *EpochInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -379,7 +379,7 @@ func (m *EpochInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CurrentEpochStartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CurrentEpochStartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/rewards/types/gauge.pb.go b/x/rewards/types/gauge.pb.go index ec3c14ff3..78ba884df 100644 --- a/x/rewards/types/gauge.pb.go +++ b/x/rewards/types/gauge.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" @@ -104,6 +104,7 @@ type Gauge struct { IsActive bool `protobuf:"varint,11,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` ForSwapFee bool `protobuf:"varint,12,opt,name=for_swap_fee,json=forSwapFee,proto3" json:"for_swap_fee,omitempty"` // Types that are valid to be assigned to Kind: + // // *Gauge_LiquidityMetaData Kind isGauge_Kind `protobuf_oneof:"kind"` AppId uint64 `protobuf:"varint,14,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` @@ -519,7 +520,7 @@ func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x3a - n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TriggerDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TriggerDuration):]) + n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TriggerDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TriggerDuration):]) if err5 != nil { return 0, err5 } @@ -532,7 +533,7 @@ func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err6 != nil { return 0, err6 } @@ -540,7 +541,7 @@ func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGauge(dAtA, i, uint64(n6)) i-- dAtA[i] = 0x22 - n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err7 != nil { return 0, err7 } @@ -622,7 +623,7 @@ func (m *GaugeByTriggerDuration) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x12 } - n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TriggerDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TriggerDuration):]) + n11, err11 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TriggerDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TriggerDuration):]) if err11 != nil { return 0, err11 } @@ -679,14 +680,14 @@ func (m *Gauge) Size() (n int) { if l > 0 { n += 1 + l + sovGauge(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovGauge(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovGauge(uint64(l)) if m.GaugeTypeId != 0 { n += 1 + sovGauge(uint64(m.GaugeTypeId)) } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.TriggerDuration) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TriggerDuration) n += 1 + l + sovGauge(uint64(l)) l = m.DepositAmount.Size() n += 1 + l + sovGauge(uint64(l)) @@ -731,7 +732,7 @@ func (m *GaugeByTriggerDuration) Size() (n int) { } var l int _ = l - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.TriggerDuration) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TriggerDuration) n += 1 + l + sovGauge(uint64(l)) if len(m.GaugeIds) > 0 { l = 0 @@ -1023,7 +1024,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1056,7 +1057,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1108,7 +1109,7 @@ func (m *Gauge) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.TriggerDuration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.TriggerDuration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1389,7 +1390,7 @@ func (m *GaugeByTriggerDuration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.TriggerDuration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.TriggerDuration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/rewards/types/genesis.pb.go b/x/rewards/types/genesis.pb.go index 1b5ba5d23..872c83f8d 100644 --- a/x/rewards/types/genesis.pb.go +++ b/x/rewards/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/rewards/types/params.pb.go b/x/rewards/types/params.pb.go index f41aa4f63..0a3435690 100644 --- a/x/rewards/types/params.pb.go +++ b/x/rewards/types/params.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/rewards/types/query.pb.go b/x/rewards/types/query.pb.go index 7c99520bb..18fbf34b4 100644 --- a/x/rewards/types/query.pb.go +++ b/x/rewards/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/rewards/types/rewards.pb.go b/x/rewards/types/rewards.pb.go index 739c2cffa..a2f91f5fa 100644 --- a/x/rewards/types/rewards.pb.go +++ b/x/rewards/types/rewards.pb.go @@ -7,9 +7,9 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -1114,7 +1114,7 @@ func (m *LockerExternalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x58 } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTimestamp):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTimestamp):]) if err1 != nil { return 0, err1 } @@ -1122,7 +1122,7 @@ func (m *LockerExternalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintRewards(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x52 - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimestamp):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTimestamp):]) if err2 != nil { return 0, err2 } @@ -1220,7 +1220,7 @@ func (m *VaultExternalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x58 } - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTimestamp):]) + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTimestamp):]) if err5 != nil { return 0, err5 } @@ -1228,7 +1228,7 @@ func (m *VaultExternalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintRewards(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x52 - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimestamp):]) + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTimestamp):]) if err6 != nil { return 0, err6 } @@ -1369,7 +1369,7 @@ func (m *LendExternalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x60 } - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTimestamp):]) + n9, err9 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTimestamp):]) if err9 != nil { return 0, err9 } @@ -1377,7 +1377,7 @@ func (m *LendExternalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintRewards(dAtA, i, uint64(n9)) i-- dAtA[i] = 0x5a - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimestamp):]) + n10, err10 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTimestamp):]) if err10 != nil { return 0, err10 } @@ -1543,7 +1543,7 @@ func (m *StableVaultExternalRewards) MarshalToSizedBuffer(dAtA []byte) (int, err i-- dAtA[i] = 0x60 } - n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTimestamp):]) + n16, err16 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTimestamp):]) if err16 != nil { return 0, err16 } @@ -1551,7 +1551,7 @@ func (m *StableVaultExternalRewards) MarshalToSizedBuffer(dAtA []byte) (int, err i = encodeVarintRewards(dAtA, i, uint64(n16)) i-- dAtA[i] = 0x5a - n17, err17 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimestamp):]) + n17, err17 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTimestamp):]) if err17 != nil { return 0, err17 } @@ -1713,9 +1713,9 @@ func (m *LockerExternalRewards) Size() (n int) { if l > 0 { n += 1 + l + sovRewards(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTimestamp) n += 1 + l + sovRewards(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTimestamp) n += 1 + l + sovRewards(uint64(l)) if m.MinLockupTimeSeconds != 0 { n += 1 + sovRewards(uint64(m.MinLockupTimeSeconds)) @@ -1755,9 +1755,9 @@ func (m *VaultExternalRewards) Size() (n int) { if l > 0 { n += 1 + l + sovRewards(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTimestamp) n += 1 + l + sovRewards(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTimestamp) n += 1 + l + sovRewards(uint64(l)) if m.MinLockupTimeSeconds != 0 { n += 1 + sovRewards(uint64(m.MinLockupTimeSeconds)) @@ -1822,9 +1822,9 @@ func (m *LendExternalRewards) Size() (n int) { if l > 0 { n += 1 + l + sovRewards(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTimestamp) n += 1 + l + sovRewards(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTimestamp) n += 1 + l + sovRewards(uint64(l)) if m.MinLockupTimeSeconds != 0 { n += 1 + sovRewards(uint64(m.MinLockupTimeSeconds)) @@ -1892,9 +1892,9 @@ func (m *StableVaultExternalRewards) Size() (n int) { if l > 0 { n += 1 + l + sovRewards(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTimestamp) n += 1 + l + sovRewards(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTimestamp) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTimestamp) n += 1 + l + sovRewards(uint64(l)) if m.AcceptedBlockHeight != 0 { n += 1 + sovRewards(uint64(m.AcceptedBlockHeight)) @@ -2495,7 +2495,7 @@ func (m *LockerExternalRewards) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2528,7 +2528,7 @@ func (m *LockerExternalRewards) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2843,7 +2843,7 @@ func (m *VaultExternalRewards) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2876,7 +2876,7 @@ func (m *VaultExternalRewards) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3353,7 +3353,7 @@ func (m *LendExternalRewards) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3386,7 +3386,7 @@ func (m *LendExternalRewards) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3903,7 +3903,7 @@ func (m *StableVaultExternalRewards) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3936,7 +3936,7 @@ func (m *StableVaultExternalRewards) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/rewards/types/tx.pb.go b/x/rewards/types/tx.pb.go index 14dbdaecc..dea6f7efe 100644 --- a/x/rewards/types/tx.pb.go +++ b/x/rewards/types/tx.pb.go @@ -8,10 +8,10 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -1463,7 +1463,7 @@ func (m *MsgCreateGauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) if err1 != nil { return 0, err1 } @@ -1486,7 +1486,7 @@ func (m *MsgCreateGauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x22 - n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TriggerDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TriggerDuration):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TriggerDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TriggerDuration):]) if err3 != nil { return 0, err3 } @@ -2189,14 +2189,14 @@ func (m *MsgCreateGauge) Size() (n int) { if m.GaugeTypeId != 0 { n += 1 + sovTx(uint64(m.GaugeTypeId)) } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.TriggerDuration) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TriggerDuration) n += 1 + l + sovTx(uint64(l)) l = m.DepositAmount.Size() n += 1 + l + sovTx(uint64(l)) if m.TotalTriggers != 0 { n += 1 + sovTx(uint64(m.TotalTriggers)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) n += 1 + l + sovTx(uint64(l)) if m.Kind != nil { n += m.Kind.Size() @@ -2612,7 +2612,7 @@ func (m *MsgCreateGauge) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.TriggerDuration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.TriggerDuration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2697,7 +2697,7 @@ func (m *MsgCreateGauge) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/tokenmint/client/cli/tx.go b/x/tokenmint/client/cli/tx.go index e2409b781..4ac8021c6 100644 --- a/x/tokenmint/client/cli/tx.go +++ b/x/tokenmint/client/cli/tx.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" + "strconv" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" @@ -41,15 +41,15 @@ func txMint() *cobra.Command { if err != nil { return err } - appID, err := sdk.ParseUint(args[0]) + appID, err := strconv.ParseUint(args[0], 10, 64) if err != nil { return err } - assetID, err := sdk.ParseUint(args[1]) + assetID, err := strconv.ParseUint(args[1], 10, 64) if err != nil { return err } - msg := types.NewMsgMintNewTokensRequest(ctx.GetFromAddress().String(), appID.Uint64(), assetID.Uint64()) + msg := types.NewMsgMintNewTokensRequest(ctx.GetFromAddress().String(), appID, assetID) return tx.GenerateOrBroadcastTxCLI(ctx, cmd.Flags(), msg) }, diff --git a/x/tokenmint/genesis_test.go b/x/tokenmint/genesis_test.go index 752e92422..9616f7598 100644 --- a/x/tokenmint/genesis_test.go +++ b/x/tokenmint/genesis_test.go @@ -1,17 +1,18 @@ package tokenmint_test import ( + "testing" + "github.com/comdex-official/comdex/app" "github.com/comdex-official/comdex/x/tokenmint" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/comdex-official/comdex/x/tokenmint/types" "github.com/stretchr/testify/require" ) func TestGenesis(t *testing.T) { - comdexApp := app.Setup(false) + comdexApp := app.Setup(t, false) ctx := comdexApp.BaseApp.NewContext(false, tmproto.Header{}) genesisState := types.GenesisState{ diff --git a/x/tokenmint/handler_test.go b/x/tokenmint/handler_test.go index 67258e093..f956bd70a 100644 --- a/x/tokenmint/handler_test.go +++ b/x/tokenmint/handler_test.go @@ -1,21 +1,22 @@ package tokenmint_test import ( + "strings" + "testing" + "github.com/comdex-official/comdex/app" "github.com/comdex-official/comdex/x/tokenmint" "github.com/comdex-official/comdex/x/tokenmint/keeper" "github.com/comdex-official/comdex/x/tokenmint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "strings" - "testing" ) func TestInvalidMsg(t *testing.T) { - app1 := app.Setup(false) + app1 := app.Setup(t, false) app1.TokenmintKeeper = keeper.NewKeeper( app1.AppCodec(), app1.GetKey(types.StoreKey), app1.BankKeeper, &app1.AssetKeeper) diff --git a/x/tokenmint/keeper/keeper.go b/x/tokenmint/keeper/keeper.go index 887b247ff..2bb136dc5 100644 --- a/x/tokenmint/keeper/keeper.go +++ b/x/tokenmint/keeper/keeper.go @@ -3,22 +3,23 @@ package keeper import ( "fmt" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/libs/log" "github.com/comdex-official/comdex/x/tokenmint/expected" "github.com/comdex-official/comdex/x/tokenmint/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) type Keeper struct { cdc codec.BinaryCodec - key sdk.StoreKey + key storetypes.StoreKey bank expected.BankKeeper asset expected.AssetKeeper } -func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, bank expected.BankKeeper, asset expected.AssetKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, bank expected.BankKeeper, asset expected.AssetKeeper) Keeper { return Keeper{ cdc: cdc, key: key, diff --git a/x/tokenmint/keeper/keeper_test.go b/x/tokenmint/keeper/keeper_test.go index 19573c193..015e66562 100644 --- a/x/tokenmint/keeper/keeper_test.go +++ b/x/tokenmint/keeper/keeper_test.go @@ -2,17 +2,18 @@ package keeper_test import ( "encoding/binary" - assettypes "github.com/comdex-official/comdex/x/asset/types" - markettypes "github.com/comdex-official/comdex/x/market/types" "testing" "time" + assettypes "github.com/comdex-official/comdex/x/asset/types" + markettypes "github.com/comdex-official/comdex/x/market/types" + collectorTypes "github.com/comdex-official/comdex/x/collector/types" "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" assetKeeper "github.com/comdex-official/comdex/x/asset/keeper" @@ -40,7 +41,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.collectorKeeper = s.app.CollectorKeeper s.assetKeeper = s.app.AssetKeeper diff --git a/x/tokenmint/module.go b/x/tokenmint/module.go index 4681828bf..55f67e3aa 100644 --- a/x/tokenmint/module.go +++ b/x/tokenmint/module.go @@ -9,7 +9,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -119,22 +119,13 @@ func (am AppModule) Name() string { return am.AppModuleBasic.Name() } -// Route returns the capability module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the capability module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns the capability module's Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServer(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) } diff --git a/x/tokenmint/module_simulation.go b/x/tokenmint/module_simulation.go index ca70afff5..e773234ab 100644 --- a/x/tokenmint/module_simulation.go +++ b/x/tokenmint/module_simulation.go @@ -7,7 +7,7 @@ package tokenmint // tokenmintsimulation "github.com/comdex-official/comdex/x/tokenmint/simulation" // "github.com/comdex-official/comdex/x/tokenmint/types" // "github.com/cosmos/cosmos-sdk/baseapp" -// simappparams "github.com/cosmos/cosmos-sdk/simapp/params" +// simappparams "github.com/cosmos/cosmos-sdk/testutil/sims" // sdk "github.com/cosmos/cosmos-sdk/types" // "github.com/cosmos/cosmos-sdk/types/module" // simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/tokenmint/module_test.go b/x/tokenmint/module_test.go index 18936aa35..9ad35f5bf 100644 --- a/x/tokenmint/module_test.go +++ b/x/tokenmint/module_test.go @@ -4,8 +4,8 @@ import ( "encoding/binary" "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -30,7 +30,7 @@ func TestModuleTestSuite(t *testing.T) { } func (suite *ModuleTestSuite) SetupTest() { - app := chain.Setup(false) + app := chain.Setup(suite.T(), false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) suite.app = app diff --git a/x/tokenmint/types/codec.go b/x/tokenmint/types/codec.go index d9bf5f83d..707f44761 100644 --- a/x/tokenmint/types/codec.go +++ b/x/tokenmint/types/codec.go @@ -23,11 +23,12 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { var ( amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) + ModuleCdc = codec.NewAminoCodec(amino) ) func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/tokenmint/types/genesis.pb.go b/x/tokenmint/types/genesis.pb.go index 0966b8b29..c95fe3af4 100644 --- a/x/tokenmint/types/genesis.pb.go +++ b/x/tokenmint/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/tokenmint/types/mint.pb.go b/x/tokenmint/types/mint.pb.go index e6a0c4721..f2d9bed47 100644 --- a/x/tokenmint/types/mint.pb.go +++ b/x/tokenmint/types/mint.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -28,7 +28,7 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -//app_vault_type_id will be the key for the KVStore for this value. +// app_vault_type_id will be the key for the KVStore for this value. type TokenMint struct { AppId uint64 `protobuf:"varint,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" yaml:"app_id"` MintedTokens []*MintedTokens `protobuf:"bytes,2,rep,name=minted_tokens,json=mintedTokens,proto3" json:"minted_tokens,omitempty" yaml:"minted_tokens"` @@ -221,7 +221,7 @@ func (m *MintedTokens) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x22 - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err1 != nil { return 0, err1 } @@ -287,7 +287,7 @@ func (m *MintedTokens) Size() (n int) { } l = m.GenesisSupply.Size() n += 1 + l + sovMint(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovMint(uint64(l)) l = m.CurrentSupply.Size() n += 1 + l + sovMint(uint64(l)) @@ -514,7 +514,7 @@ func (m *MintedTokens) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/tokenmint/types/params.pb.go b/x/tokenmint/types/params.pb.go index 4cb593af1..a84d5a95b 100644 --- a/x/tokenmint/types/params.pb.go +++ b/x/tokenmint/types/params.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/tokenmint/types/query.pb.go b/x/tokenmint/types/query.pb.go index 2cd1a5cec..ffa830915 100644 --- a/x/tokenmint/types/query.pb.go +++ b/x/tokenmint/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/tokenmint/types/tx.pb.go b/x/tokenmint/types/tx.pb.go index bd298c240..097c83ea4 100644 --- a/x/tokenmint/types/tx.pb.go +++ b/x/tokenmint/types/tx.pb.go @@ -6,9 +6,9 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -28,7 +28,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -//Will become governance proposal- will trigger token minting & sending +// Will become governance proposal- will trigger token minting & sending type MsgMintNewTokensRequest struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty" yaml:"from"` AppId uint64 `protobuf:"varint,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" yaml:"app_id"` diff --git a/x/vault/client/rest/query.go b/x/vault/client/rest/query.go deleted file mode 100644 index ff6f75eb1..000000000 --- a/x/vault/client/rest/query.go +++ /dev/null @@ -1,35 +0,0 @@ -package rest - -import ( - "context" - "net/http" - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" - - "github.com/comdex-official/comdex/x/vault/types" -) - -func queryVault(ctx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - vars := mux.Vars(r) - - qc := types.NewQueryClient(ctx) - idParam := vars["id"] - - id, _ := strconv.ParseUint(idParam, 10, 64) - - res, err := qc.QueryVault(context.Background(), - &types.QueryVaultRequest{ - Id: id, - }) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - rest.PostProcessResponse(w, ctx, res) - } -} diff --git a/x/vault/client/rest/rest.go b/x/vault/client/rest/rest.go deleted file mode 100644 index 6ba1499c4..000000000 --- a/x/vault/client/rest/rest.go +++ /dev/null @@ -1,19 +0,0 @@ -package rest - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/gorilla/mux" -) - -func registerQueryRoutes(ctx client.Context, router *mux.Router) { - router.HandleFunc("/vaults/id", queryVault(ctx)). - Methods("GET") -} - -func registerTxRoutes(ctx client.Context, router *mux.Router) { -} - -func RegisterRoutes(ctx client.Context, router *mux.Router) { - registerQueryRoutes(ctx, router) - registerTxRoutes(ctx, router) -} diff --git a/x/vault/client/rest/tx.go b/x/vault/client/rest/tx.go deleted file mode 100644 index 0062e0ca8..000000000 --- a/x/vault/client/rest/tx.go +++ /dev/null @@ -1 +0,0 @@ -package rest diff --git a/x/vault/client/testutil/helpers.go b/x/vault/client/testutil/helpers.go index ae633c6a2..b267cd74c 100644 --- a/x/vault/client/testutil/helpers.go +++ b/x/vault/client/testutil/helpers.go @@ -20,7 +20,7 @@ import ( var commonArgs = []string{ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 10)).String()), } diff --git a/x/vault/client/testutil/suite.go b/x/vault/client/testutil/suite.go index 28c1a5aa0..2a0a5b7c6 100644 --- a/x/vault/client/testutil/suite.go +++ b/x/vault/client/testutil/suite.go @@ -11,17 +11,19 @@ import ( vaultKeeper "github.com/comdex-official/comdex/x/vault/keeper" "github.com/comdex-official/comdex/x/vault/types" + "github.com/comdex-official/comdex/testutil/network" "github.com/cosmos/cosmos-sdk/baseapp" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" - store "github.com/cosmos/cosmos-sdk/store/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" + // store "github.com/cosmos/cosmos-sdk/store/types" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - "github.com/cosmos/cosmos-sdk/testutil/network" + networkI "github.com/cosmos/cosmos-sdk/testutil/network" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - tmcli "github.com/tendermint/tendermint/libs/cli" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" + tmcli "github.com/cometbft/cometbft/libs/cli" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ) type VaultIntegrationTestSuite struct { @@ -35,13 +37,13 @@ type VaultIntegrationTestSuite struct { msgServer types.MsgServer } -func NewAppConstructor() network.AppConstructor { - return func(val network.Validator) servertypes.Application { +func NewAppConstructor() networkI.AppConstructor { + return func(val networkI.ValidatorI) servertypes.Application { return chain.New( - val.Ctx.Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), val.Ctx.Config.RootDir, 0, - chain.MakeEncodingConfig(), simapp.EmptyAppOptions{}, chain.GetWasmEnabledProposals(), chain.EmptyWasmOpts, - baseapp.SetPruning(store.NewPruningOptionsFromString(val.AppConfig.Pruning)), - baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), + val.GetCtx().Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), val.GetCtx().Config.RootDir, 0, + chain.MakeEncodingConfig(), simtestutil.EmptyAppOptions{}, chain.GetWasmEnabledProposals(), chain.EmptyWasmOpts, + baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), + baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices), ) } } @@ -53,7 +55,7 @@ func (s *VaultIntegrationTestSuite) SetupSuite() { s.T().Skip("skipping test in unit-tests mode.") } - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.msgServer = vaultKeeper.NewMsgServer(s.app.VaultKeeper) diff --git a/x/vault/genesis_test.go b/x/vault/genesis_test.go index 12b038b8a..88d22185e 100644 --- a/x/vault/genesis_test.go +++ b/x/vault/genesis_test.go @@ -1,16 +1,17 @@ package vault_test import ( + "testing" + "github.com/comdex-official/comdex/app" "github.com/comdex-official/comdex/x/vault" "github.com/comdex-official/comdex/x/vault/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "testing" ) func TestGenesis(t *testing.T) { - comdexApp := app.Setup(false) + comdexApp := app.Setup(t, false) ctx := comdexApp.BaseApp.NewContext(false, tmproto.Header{}) genesisState := types.GenesisState{ diff --git a/x/vault/handler_test.go b/x/vault/handler_test.go index 708f1d58b..ea38d42a5 100644 --- a/x/vault/handler_test.go +++ b/x/vault/handler_test.go @@ -10,15 +10,15 @@ import ( "github.com/comdex-official/comdex/x/vault" "github.com/comdex-official/comdex/x/vault/keeper" "github.com/comdex-official/comdex/x/vault/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) func TestInvalidMsg(t *testing.T) { - app1 := app.Setup(false) + app1 := app.Setup(t, false) app1.VaultKeeper = keeper.NewKeeper( app1.AppCodec(), app1.GetKey(types.StoreKey), app1.BankKeeper, &app1.AssetKeeper, &app1.MarketKeeper, &app1.CollectorKeeper, &app1.EsmKeeper, diff --git a/x/vault/keeper/keeper.go b/x/vault/keeper/keeper.go index 356ca329d..547464972 100644 --- a/x/vault/keeper/keeper.go +++ b/x/vault/keeper/keeper.go @@ -5,15 +5,16 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/comdex-official/comdex/x/vault/expected" "github.com/comdex-official/comdex/x/vault/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" ) type Keeper struct { cdc codec.BinaryCodec - key sdk.StoreKey + key storetypes.StoreKey bank expected.BankKeeper asset expected.AssetKeeper oracle expected.MarketKeeper @@ -23,7 +24,7 @@ type Keeper struct { rewards expected.RewardsKeeper } -func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, bank expected.BankKeeper, asset expected.AssetKeeper, oracle expected.MarketKeeper, collector expected.CollectorKeeper, esm expected.EsmKeeper, tokenmint expected.TokenMintKeeper, rewards expected.RewardsKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, bank expected.BankKeeper, asset expected.AssetKeeper, oracle expected.MarketKeeper, collector expected.CollectorKeeper, esm expected.EsmKeeper, tokenmint expected.TokenMintKeeper, rewards expected.RewardsKeeper) Keeper { return Keeper{ cdc: cdc, key: key, diff --git a/x/vault/keeper/keeper_test.go b/x/vault/keeper/keeper_test.go index 5821c8cd3..eb09966e6 100644 --- a/x/vault/keeper/keeper_test.go +++ b/x/vault/keeper/keeper_test.go @@ -2,14 +2,15 @@ package keeper_test import ( "encoding/binary" - rewardsKeeper "github.com/comdex-official/comdex/x/rewards/keeper" "testing" + rewardsKeeper "github.com/comdex-official/comdex/x/rewards/keeper" + "github.com/comdex-official/comdex/app/wasm/bindings" "github.com/stretchr/testify/suite" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" chain "github.com/comdex-official/comdex/app" "github.com/comdex-official/comdex/x/vault/keeper" @@ -35,7 +36,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (s *KeeperTestSuite) SetupTest() { - s.app = chain.Setup(false) + s.app = chain.Setup(s.T(), false) s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{}) s.keeper = s.app.VaultKeeper s.querier = keeper.QueryServer{Keeper: s.keeper} diff --git a/x/vault/keeper/msg_server.go b/x/vault/keeper/msg_server.go index bdefa6d30..b5d726343 100644 --- a/x/vault/keeper/msg_server.go +++ b/x/vault/keeper/msg_server.go @@ -164,7 +164,7 @@ func (k msgServer) MsgCreate(c context.Context, msg *types.MsgCreateRequest) (*t newVault.AmountIn = msg.AmountIn // closingFeeVal := msg.AmountOut.Mul(sdk.Int(extendedPairVault.ClosingFee)).Quo(sdk.Int(sdk.OneDec())) - closingFeeVal := msg.AmountOut.ToDec().Mul(extendedPairVault.ClosingFee).TruncateInt() + closingFeeVal := sdk.NewDec(msg.AmountOut.Int64()).Mul(extendedPairVault.ClosingFee).TruncateInt() newVault.ClosingFeeAccumulated = closingFeeVal newVault.AmountOut = msg.AmountOut diff --git a/x/vault/keeper/msg_server_test.go b/x/vault/keeper/msg_server_test.go index 681dd8736..7a9356730 100644 --- a/x/vault/keeper/msg_server_test.go +++ b/x/vault/keeper/msg_server_test.go @@ -138,7 +138,7 @@ func (s *KeeperTestSuite) TestMsgCreate() { Msg: *types.NewMsgCreateRequest( addr1, appID1, extendedVaultPairID1, newInt(1000000000), newInt(200000000), ), - ExpErr: fmt.Errorf(fmt.Sprintf("0uasset1 is smaller than %duasset1: insufficient funds", 1000000000)), + ExpErr: fmt.Errorf(fmt.Sprintf("spendable balance is smaller than %duasset1: insufficient funds", 1000000000)), ExpResp: nil, QueryResponseIndex: 0, QueryResponse: nil, @@ -399,7 +399,7 @@ func (s *KeeperTestSuite) TestMsgDeposit() { Msg: *types.NewMsgDepositRequest( addr1, appID1, extendedVaultPairID1, 1, newInt(69000000), ), - ExpErr: fmt.Errorf(fmt.Sprintf("0uasset1 is smaller than %duasset1: insufficient funds", 69000000)), + ExpErr: fmt.Errorf(fmt.Sprintf("spendable balance is smaller than %duasset1: insufficient funds", 69000000)), ExpResp: nil, QueryResponseIndex: 0, QueryResponse: nil, diff --git a/x/vault/keeper/vault.go b/x/vault/keeper/vault.go index 119ec6e0c..002cf130b 100644 --- a/x/vault/keeper/vault.go +++ b/x/vault/keeper/vault.go @@ -5,7 +5,7 @@ import ( assettypes "github.com/comdex-official/comdex/x/asset/types" sdk "github.com/cosmos/cosmos-sdk/types" - protobuftypes "github.com/gogo/protobuf/types" + protobuftypes "github.com/cosmos/gogoproto/types" tokenminttypes "github.com/comdex-official/comdex/x/tokenmint/types" "github.com/comdex-official/comdex/x/vault/types" @@ -652,12 +652,12 @@ func (k Keeper) WasmMsgAddEmissionRewards(ctx sdk.Context, appID uint64, amount for j, extP := range extPair { extPairVaultMappingData, found := k.GetAppExtendedPairVaultMappingData(ctx, appID, extP) individualVote := votingRatio[j] - votingR := individualVote.ToDec().Quo(totalVote.ToDec()) - shareByExtPair := votingR.Mul(amount.ToDec()) + votingR := sdk.NewDec(individualVote.Int64()).Quo(sdk.NewDec(totalVote.Int64())) + shareByExtPair := votingR.Mul(sdk.NewDec(amount.Int64())) if !found || extPairVaultMappingData.TokenMintedAmount.IsZero() { continue } - perUserShareByAmtDec := shareByExtPair.Quo(extPairVaultMappingData.TokenMintedAmount.ToDec()) + perUserShareByAmtDec := shareByExtPair.Quo(sdk.NewDec(extPairVaultMappingData.TokenMintedAmount.Int64())) vaultsData, _ = k.GetAppExtendedPairVaultMappingData(ctx, appID, extP) for _, vaultID := range vaultsData.VaultIds { diff --git a/x/vault/module.go b/x/vault/module.go index 0cbd94292..e7fe7ccec 100644 --- a/x/vault/module.go +++ b/x/vault/module.go @@ -3,8 +3,8 @@ package vault import ( "context" "encoding/json" - "math/rand" + abcitypes "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -14,7 +14,6 @@ import ( "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abcitypes "github.com/tendermint/tendermint/abci/types" "github.com/comdex-official/comdex/x/vault/client/cli" "github.com/comdex-official/comdex/x/vault/keeper" @@ -99,18 +98,12 @@ func (a AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawM func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -func (a AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(a.k)) -} - func (a AppModule) QuerierRoute() string { return types.QuerierRoute } -func (a AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { return nil } - func (a AppModule) RegisterServices(configurator module.Configurator) { - types.RegisterMsgServer(configurator.QueryServer(), keeper.NewMsgServer(a.k)) + types.RegisterMsgServer(configurator.MsgServer(), keeper.NewMsgServer(a.k)) types.RegisterQueryServer(configurator.QueryServer(), keeper.NewQueryServer(a.k)) } @@ -126,9 +119,9 @@ func (a AppModule) ProposalContents(_ module.SimulationState) []simulation.Weigh return nil } -func (a AppModule) RandomizedParams(_ *rand.Rand) []simulation.ParamChange { - return nil -} +// func (a AppModule) RandomizedParams(_ *rand.Rand) []simulation.ParamChange { +// return nil +// } func (a AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/vault/module_test.go b/x/vault/module_test.go index f946e2a75..f566f6f9e 100644 --- a/x/vault/module_test.go +++ b/x/vault/module_test.go @@ -4,8 +4,8 @@ import ( "encoding/binary" "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -32,7 +32,7 @@ func TestModuleTestSuite(t *testing.T) { } func (suite *ModuleTestSuite) SetupTest() { - app := chain.Setup(false) + app := chain.Setup(suite.T(), false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) suite.app = app diff --git a/x/vault/types/codec.go b/x/vault/types/codec.go index 2375c26cb..73c162e50 100644 --- a/x/vault/types/codec.go +++ b/x/vault/types/codec.go @@ -50,5 +50,6 @@ var ( func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) + // sdk.RegisterLegacyAminoCodec(amino) amino.Seal() } diff --git a/x/vault/types/events.pb.go b/x/vault/types/events.pb.go index a673d6c99..459ae8c4b 100644 --- a/x/vault/types/events.pb.go +++ b/x/vault/types/events.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/vault/types/genesis.pb.go b/x/vault/types/genesis.pb.go index b409b5df8..3953d53b9 100644 --- a/x/vault/types/genesis.pb.go +++ b/x/vault/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/vault/types/query.pb.go b/x/vault/types/query.pb.go index 9beee496c..1f7c33531 100644 --- a/x/vault/types/query.pb.go +++ b/x/vault/types/query.pb.go @@ -8,9 +8,9 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/vault/types/tx.pb.go b/x/vault/types/tx.pb.go index 846478ccc..81222ee83 100644 --- a/x/vault/types/tx.pb.go +++ b/x/vault/types/tx.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/vault/types/vault.pb.go b/x/vault/types/vault.pb.go index 5438430ab..171745700 100644 --- a/x/vault/types/vault.pb.go +++ b/x/vault/types/vault.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -28,7 +28,7 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -//app_vault_type_id will be the key for the KVStore for this value +// app_vault_type_id will be the key for the KVStore for this value type Vault struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` AppId uint64 `protobuf:"varint,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" yaml:"app_id"` @@ -463,7 +463,7 @@ func (m *Vault) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime):]) if err1 != nil { return 0, err1 } @@ -496,7 +496,7 @@ func (m *Vault) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x42 - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err2 != nil { return 0, err2 } @@ -765,7 +765,7 @@ func (m *StableMintVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err5 != nil { return 0, err5 } @@ -962,7 +962,7 @@ func (m *Vault) Size() (n int) { n += 1 + l + sovVault(uint64(l)) l = m.AmountOut.Size() n += 1 + l + sovVault(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovVault(uint64(l)) l = m.InterestAccumulated.Size() n += 1 + l + sovVault(uint64(l)) @@ -971,7 +971,7 @@ func (m *Vault) Size() (n int) { if m.BlockHeight != 0 { n += 1 + sovVault(uint64(m.BlockHeight)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.BlockTime) n += 1 + l + sovVault(uint64(l)) return n } @@ -1073,7 +1073,7 @@ func (m *StableMintVault) Size() (n int) { if m.ExtendedPairVaultID != 0 { n += 1 + sovVault(uint64(m.ExtendedPairVaultID)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovVault(uint64(l)) return n } @@ -1347,7 +1347,7 @@ func (m *Vault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1467,7 +1467,7 @@ func (m *Vault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.BlockTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2278,7 +2278,7 @@ func (m *StableMintVault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex